Browse Source

修改企业资质名称回显问题

master
parent
commit
0402506b46
  1. 22
      App.vue
  2. 1
      pages.json
  3. 13
      pages/login.vue
  4. 9
      sub/enterprise/detail.vue
  5. 44
      sub/invite/addEnterprise.vue
  6. 35
      sub/invite/enterpriseIntroduce.vue
  7. 28
      sub/invite/index.vue
  8. 1
      sub/task/detail.vue
  9. 363
      uni_modules/uview-ui/components/u-textarea/u-textarea.vue
  10. 4
      utils/ruoyi.js

22
App.vue

@ -6,6 +6,26 @@ export default {
return {}
},
async onLaunch(options) {
// const updateManager = uni.getUpdateManager()
// updateManager.onCheckForUpdate(function (res) {
// //
// console.log(res.hasUpdate)
// })
// updateManager.onUpdateReady(function (res) {
// uni.showModal({
// title: '',
// content: '',
// showCancel: false,
// confirmText: '',
// confirmColor: '#1890FF',
// success(res) {
// if (res.confirm) {
// // applyUpdate
// updateManager.applyUpdate()
// }
// }
// })
// })
await this.initApp()
},
methods: {
@ -35,4 +55,4 @@ export default {
<style lang="scss">
@import '@/uni_modules/windi-css-uniapp/index.scss';
@import '@/static/scss/index.scss';
</style>
</style>

1
pages.json

@ -194,6 +194,7 @@
"path": "invite/index",
"style": {
"navigationBarTitleText": "我的企业",
"enablePullDownRefresh": true,
"componentPlaceholder": {
"u-modal": "view",
"uni-easyinput": "view"

13
pages/login.vue

@ -102,16 +102,13 @@ export default {
return
}
if (user.userType) {
switch (user.userType) {
case 2:
uni.reLaunch({
url: `/sub/invite/index`
})
break
}
if (user.userType == 2) {
uni.reLaunch({
url: `/sub/invite/index`
})
return
}
//
if (user.audit == null || user.audit == 1) {
//

9
sub/enterprise/detail.vue

@ -93,7 +93,6 @@
<view class="wd-flex" style="gap: 8px; align-items: center">
<text class="label">资质时限</text>
<view>
{{ $util.formatDate(prove.handleDate, 'YYYY/M/D') }} ~
{{ $util.formatDate(prove.expiryDate, 'YYYY/M/D') }}
</view>
</view>
@ -200,7 +199,8 @@ export default {
'enterprises_type',
'enterprises_area',
'enterprises_status',
'enterprise_qualification_status'
'enterprise_qualification_status',
'enterprise_qua'
].join(',')
})
this.dictMap = {
@ -229,7 +229,8 @@ export default {
this.$util.viewPosition({
lat: position[0],
lng: position[1],
name: enterprise.enterprisesName
name: enterprise.enterprisesName,
addree: enterprise.address
})
},
postApi() {
@ -369,4 +370,4 @@ export default {
color: #99a1b7;
}
}
</style>
</style>

44
sub/invite/addEnterprise.vue

@ -265,31 +265,29 @@ export default {
this.form.id = res.id
this.init()
}
//
uni.$off('enterpriseIntroduce')
uni.$off('enterpriseTag')
uni.$off('prove')
//
uni.$on('enterpriseIntroduce', data => {
this.form.introduction = data.introduce
})
uni.$on('enterpriseTag', data => {
this.form.tags = data
})
uni.$on('prove', data => {
console.log('资质', this.prove)
console.log('资质返回', data)
if (this.form.id != '') {
this.getProve()
} else {
this.prove.push(data)
}
})
},
onShow() {
//
uni.$off('enterpriseIntroduce')
uni.$off('enterpriseTag')
uni.$off('prove')
//
uni.$on('enterpriseIntroduce', data => {
this.form.introduction = data.introduce
})
uni.$on('enterpriseTag', data => {
this.form.tags = data
})
uni.$on('prove', data => {
console.log('资质', this.prove)
console.log('资质返回', data)
if (this.form.id != '') {
this.getProve()
} else {
this.prove.push(data)
}
})
},
onShow() {},
methods: {
proofName(v) {
if (v.detail.value == '') return

35
sub/invite/enterpriseIntroduce.vue

@ -1,12 +1,33 @@
<template>
<view class="view">
<u--textarea
v-model="introduce"
placeholder="请输入..."
maxlength="500"
count
:autoHeight="true"
></u--textarea>
<view
class=""
style="
background-color: #f9f9f9;
border: 1px solid #f1f1f4;
border-radius: 24rpx;
padding: 16rpx;
"
>
<uni-easyinput
type="textarea"
v-model="introduce"
placeholder="请输入..."
placeholderStyle="font-size:28rpx"
:maxlength="500"
:input-border="false"
:adjust-position="true"
:autoHeight="true"
cursorSpacing="32"
:styles="{
backgroundColor: 'transparent',
borderColor: 'none'
}"
></uni-easyinput>
<view style="color: #78829d; text-align: right">
{{ introduce.length }}/500
</view>
</view>
<cs-bottom-wrapper>
<view class="operation">
<button class="btn green" @tap="submit">保存</button>

28
sub/invite/index.vue

@ -1,12 +1,5 @@
<template>
<scroll-view
class="view-container"
direction="vertical"
:show-scrollbar="false"
@refresherrefresh="onRefresh"
:refresher-enabled="true"
:refresher-triggered="isRefreshing"
>
<scroll-view class="view-container">
<view class="emty" v-if="list.length == 0">
<image
src="/static/images/emty.png"
@ -15,7 +8,6 @@
></image>
<text>暂无数据</text>
</view>
<view
class="enterprise"
v-for="enterprise in list"
@ -95,7 +87,7 @@
</view>
</view>
<cs-bottom-wrapper>
<cs-bottom-wrapper v-if="inviteId">
<view class="operation">
<button class="btn green" @tap="addEnterprise">新增企业</button>
</view>
@ -112,7 +104,6 @@ export default {
inviteId: '',
list: [],
dictMap: {},
isRefreshing: false,
share: {
title: '企业变更管理', //
path: `/sub/invite/index?inviteId=${this.$store.getters.userId}`,
@ -133,14 +124,10 @@ export default {
onShareAppMessage() {
return this.share
},
onPullDownRefresh() {
this.getList()
},
methods: {
onRefresh(e) {
this.isRefreshing = true
this.getList()
setTimeout(() => {
this.isRefreshing = false
}, 1000)
},
getList() {
uni.showLoading({
title: '加载中...'
@ -148,6 +135,7 @@ export default {
vertifyName({ enterpriseUserId: this.$store.getters.userId }).then(
res => {
this.list = res.data.list
uni.stopPullDownRefresh()
uni.hideLoading()
}
)
@ -197,12 +185,14 @@ export default {
padding: 0 24rpx;
display: flex;
flex-flow: column nowrap;
height: calc(100vh - env(safe-area-inset-bottom));
position: relative;
padding-bottom: 13vh;
&::-webkit-scrollbar {
display: none;
}
}
.emty {
margin-top: 24rpx;
border-radius: 8px;
height: 550rpx;
display: flex;

1
sub/task/detail.vue

@ -376,6 +376,7 @@ export default {
taskId: this.detail.id
})
this.list.push(...data.list)
uni.stopPullDownRefresh()
this.load = 'loadmore'
if (this.list.length == data.total) {
this.load = 'nomore'

363
uni_modules/uview-ui/components/u-textarea/u-textarea.vue

@ -1,47 +1,47 @@
<template>
<view class="u-textarea" :class="textareaClass" :style="[textareaStyle]">
<textarea
class="u-textarea__field"
:value="innerValue"
:style="{ height: $u.addUnit(height) }"
:placeholder="placeholder"
:placeholder-style="$u.addStyle(placeholderStyle, 'string')"
:placeholder-class="placeholderClass"
:disabled="disabled"
:focus="focus"
:autoHeight="autoHeight"
:fixed="fixed"
:cursorSpacing="cursorSpacing"
:cursor="cursor"
:showConfirmBar="showConfirmBar"
:selectionStart="selectionStart"
:selectionEnd="selectionEnd"
:adjustPosition="adjustPosition"
:disableDefaultPadding="disableDefaultPadding"
:holdKeyboard="holdKeyboard"
:maxlength="maxlength"
:confirmType="confirmType"
:ignoreCompositionEvent="ignoreCompositionEvent"
@focus="onFocus"
@blur="onBlur"
@linechange="onLinechange"
@input="onInput"
@confirm="onConfirm"
@keyboardheightchange="onKeyboardheightchange"
></textarea>
<text
class="u-textarea__count"
:style="{
'background-color': disabled ? 'transparent' : '#fff',
}"
v-if="count"
>{{ innerValue.length }}/{{ maxlength }}</text
>
</view>
<view class="u-textarea" :class="textareaClass" :style="[textareaStyle]">
<textarea
class="u-textarea__field"
:value="innerValue"
:placeholder="placeholder"
:placeholder-style="$u.addStyle(placeholderStyle, 'string')"
:placeholder-class="placeholderClass"
:disabled="disabled"
:focus="focus"
:autoHeight="autoHeight"
:fixed="fixed"
:cursorSpacing="cursorSpacing"
:cursor="cursor"
:showConfirmBar="showConfirmBar"
:selectionStart="selectionStart"
:selectionEnd="selectionEnd"
:adjustPosition="adjustPosition"
:disableDefaultPadding="disableDefaultPadding"
:holdKeyboard="holdKeyboard"
:maxlength="maxlength"
:confirmType="confirmType"
:ignoreCompositionEvent="ignoreCompositionEvent"
@focus="onFocus"
@blur="onBlur"
@linechange="onLinechange"
@input="onInput"
@confirm="onConfirm"
@keyboardheightchange="onKeyboardheightchange"
></textarea>
<text
class="u-textarea__count"
:style="{
'background-color': disabled ? 'transparent' : '#fff'
}"
v-if="count"
>
{{ innerValue.length }}/{{ maxlength }}
</text>
</view>
</template>
<script>
import props from "./props.js";
import props from './props.js'
/**
* Textarea 文本域
* @description 文本域此组件满足了可能出现的表单信息补充编辑等实际逻辑的功能内置了字数校验等
@ -80,160 +80,157 @@ import props from "./props.js";
* @example <u--textarea v-model="value1" placeholder="请输入内容" ></u--textarea>
*/
export default {
name: "u-textarea",
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
data() {
return {
//
innerValue: "",
//
focused: false,
// valuewatchimmediatevalue
firstChange: true,
// value
changeFromInner: false,
//
innerFormatter: value => value
}
},
watch: {
value: {
immediate: true,
handler(newVal, oldVal) {
this.innerValue = newVal;
/* #ifdef H5 */
// H5valueinput@input
if (
this.firstChange === false &&
this.changeFromInner === false
) {
this.valueChange();
}
/* #endif */
this.firstChange = false;
// changeFromInnerfalse
this.changeFromInner = false;
},
},
},
computed: {
//
textareaClass() {
let classes = [],
{ border, disabled, shape } = this;
border === "surround" &&
(classes = classes.concat(["u-border", "u-textarea--radius"]));
border === "bottom" &&
(classes = classes.concat([
"u-border-bottom",
"u-textarea--no-radius",
]));
disabled && classes.push("u-textarea--disabled");
return classes.join(" ");
},
//
textareaStyle() {
const style = {};
// #ifdef APP-NVUE
// textareanvue
if (uni.$u.os() === "android") {
style.paddingTop = "6px";
style.paddingLeft = "9px";
style.paddingBottom = "3px";
style.paddingRight = "6px";
}
// #endif
return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
},
name: 'u-textarea',
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
data() {
return {
//
innerValue: '',
//
focused: false,
// valuewatchimmediatevalue
firstChange: true,
// value
changeFromInner: false,
//
innerFormatter: value => value
}
},
watch: {
value: {
immediate: true,
handler(newVal, oldVal) {
this.innerValue = newVal
/* #ifdef H5 */
// H5valueinput@input
if (this.firstChange === false && this.changeFromInner === false) {
this.valueChange()
}
/* #endif */
this.firstChange = false
// changeFromInnerfalse
this.changeFromInner = false
}
}
},
computed: {
//
textareaClass() {
let classes = [],
{ border, disabled, shape } = this
border === 'surround' &&
(classes = classes.concat(['u-border', 'u-textarea--radius']))
border === 'bottom' &&
(classes = classes.concat([
'u-border-bottom',
'u-textarea--no-radius'
]))
disabled && classes.push('u-textarea--disabled')
return classes.join(' ')
},
//
textareaStyle() {
const style = {}
// #ifdef APP-NVUE
// textareanvue
if (uni.$u.os() === 'android') {
style.paddingTop = '6px'
style.paddingLeft = '9px'
style.paddingBottom = '3px'
style.paddingRight = '6px'
}
// #endif
return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))
}
},
methods: {
// propsref
setFormatter(e) {
this.innerFormatter = e
},
onFocus(e) {
this.$emit('focus', e)
},
methods: {
// propsref
setFormatter(e) {
this.innerFormatter = e
},
onFocus(e) {
this.$emit("focus", e);
},
onBlur(e) {
this.$emit("blur", e);
// u-form
uni.$u.formValidate(this, "blur");
},
onLinechange(e) {
this.$emit("linechange", e);
},
onInput(e) {
let { value = "" } = e.detail || {};
//
const formatter = this.formatter || this.innerFormatter
const formatValue = formatter(value)
// propsinnerValue$nextTick
this.innerValue = value
this.$nextTick(() => {
this.innerValue = formatValue;
this.valueChange();
})
},
//
valueChange() {
const value = this.innerValue;
this.$nextTick(() => {
this.$emit("input", value);
// value
this.changeFromInner = true;
this.$emit("change", value);
// u-form
uni.$u.formValidate(this, "change");
});
},
onConfirm(e) {
this.$emit("confirm", e);
},
onKeyboardheightchange(e) {
this.$emit("keyboardheightchange", e);
},
onBlur(e) {
this.$emit('blur', e)
// u-form
uni.$u.formValidate(this, 'blur')
},
};
onLinechange(e) {
this.$emit('linechange', e)
},
onInput(e) {
let { value = '' } = e.detail || {}
//
const formatter = this.formatter || this.innerFormatter
const formatValue = formatter(value)
// propsinnerValue$nextTick
this.innerValue = value
this.$nextTick(() => {
this.innerValue = formatValue
this.valueChange()
})
},
//
valueChange() {
const value = this.innerValue
this.$nextTick(() => {
this.$emit('input', value)
// value
this.changeFromInner = true
this.$emit('change', value)
// u-form
uni.$u.formValidate(this, 'change')
})
},
onConfirm(e) {
this.$emit('confirm', e)
},
onKeyboardheightchange(e) {
this.$emit('keyboardheightchange', e)
}
}
}
</script>
<style lang="scss" scoped>
@import "../../libs/css/components.scss";
@import '../../libs/css/components.scss';
.u-textarea {
border-radius: 4px;
background-color: #fff;
position: relative;
@include flex;
flex: 1;
padding: 9px;
border-radius: 4px;
background-color: #fff;
position: relative;
@include flex;
flex: 1;
padding: 9px;
&--radius {
border-radius: 4px;
}
&--radius {
border-radius: 4px;
}
&--no-radius {
border-radius: 0;
}
&--no-radius {
border-radius: 0;
}
&--disabled {
background-color: #f5f7fa;
}
&--disabled {
background-color: #f5f7fa;
}
&__field {
flex: 1;
font-size: 15px;
color: $u-content-color;
width: 100%;
}
&__field {
flex: 1;
font-size: 15px;
color: $u-content-color;
width: 100%;
}
&__count {
position: absolute;
right: 5px;
bottom: 2px;
font-size: 12px;
color: $u-tips-color;
background-color: #ffffff;
padding: 1px 4px;
}
&__count {
position: absolute;
right: 5px;
bottom: 2px;
font-size: 12px;
color: $u-tips-color;
background-color: #ffffff;
padding: 1px 4px;
}
}
</style>

4
utils/ruoyi.js

@ -80,12 +80,14 @@ export function formatDate(date, format = 'YYYY-MM-DD HH:mm:ss') {
export function viewPosition({
lat,
lng,
name = ''
name = '',
address = ''
}) {
uni.openLocation({
latitude: Number(lat),
longitude: Number(lng),
name,
address,
fail: (err) => {
console.log(err);
}

Loading…
Cancel
Save