@zscreate/zhxy-app-component 1.0.209 → 1.0.210
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/evan-form-item/components/responsibility.vue +127 -127
- package/components/evan-form-item/evan-form-item.vue +19 -17
- package/components/evan-form-item/mixins/commonMixin.js +15 -0
- package/components/evan-form-item/mixins/pubSubMixin.js +8 -1
- package/components/l-file/l-file.vue +4 -4
- package/package.json +1 -1
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import FullModal from "../../fullModal/fullModal.vue";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
name: "responsibility",
|
|
6
|
-
props: {
|
|
7
|
-
value: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: ''
|
|
10
|
-
},
|
|
11
|
-
widget: {
|
|
12
|
-
type: Object,
|
|
13
|
-
default: () => ({})
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
components: {FullModal},
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
countDown: 0,
|
|
20
|
-
force: false,
|
|
21
|
-
clearTimeout: null,
|
|
22
|
-
dataModel: false,
|
|
23
|
-
isShow: false,
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
watch: {
|
|
27
|
-
value: {
|
|
28
|
-
handler(val) {
|
|
29
|
-
if (!val) return this.dataModel = false
|
|
30
|
-
this.dataModel = true
|
|
31
|
-
},
|
|
32
|
-
immediate: true
|
|
33
|
-
},
|
|
34
|
-
dataModel(val) {
|
|
35
|
-
this.$emit('input', val ? true : '')
|
|
36
|
-
this.$emit('change', val ? true: '')
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
handleClick() {
|
|
41
|
-
if (this.widget.options.disabled) {
|
|
42
|
-
this.isShow = true
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
this.isShow = true
|
|
46
|
-
this.countDown = 0
|
|
47
|
-
clearInterval(this.clearTimeout)
|
|
48
|
-
if (this.widget.options.force) {
|
|
49
|
-
this.countDown = this.widget.options.countDown
|
|
50
|
-
this.clearTimeout = setInterval(() => {
|
|
51
|
-
if (this.countDown < 0) {
|
|
52
|
-
clearInterval(this.clearTimeout)
|
|
53
|
-
}
|
|
54
|
-
this.countDown -= 1
|
|
55
|
-
}, 1000)
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
confirm() {
|
|
59
|
-
if (this.countDown <= 0) {
|
|
60
|
-
this.dataModel = true
|
|
61
|
-
this.isShow = false
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
cancel() {
|
|
65
|
-
this.isShow = false
|
|
66
|
-
this.dataModel = false
|
|
67
|
-
clearInterval(this.clearTimeout)
|
|
68
|
-
},
|
|
69
|
-
handleCheck() {
|
|
70
|
-
const { disabled, force} = this.widget.options
|
|
71
|
-
if (disabled) return
|
|
72
|
-
if (force && !disabled) {
|
|
73
|
-
if (this.dataModel) return this.dataModel = false
|
|
74
|
-
return this.handleClick()
|
|
75
|
-
}
|
|
76
|
-
this.dataModel = !this.dataModel
|
|
77
|
-
},
|
|
78
|
-
change(e) {
|
|
79
|
-
console.log(e)
|
|
80
|
-
},
|
|
81
|
-
disabledScroll() {
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
</script>
|
|
87
|
-
|
|
88
|
-
<template>
|
|
89
|
-
<view>
|
|
90
|
-
<full-modal v-model="isShow">
|
|
91
|
-
<view style="height: 100%; background-color: #fff" @touchmove.stop.prevent="disabledScroll">
|
|
92
|
-
<scroll-view scroll-y="true" style="height: calc(100% - 100rpx); " >
|
|
93
|
-
<view style="padding: 20rpx 40rpx;">
|
|
94
|
-
<rich-text :nodes="widget.options.content" style="text-align: left"></rich-text>
|
|
95
|
-
</view>
|
|
96
|
-
<view v-if="!widget.options.disabled" style="display: flex; padding: 20rpx; margin-bottom: 20rpx; justify-content: center">
|
|
97
|
-
<button @click="confirm" type="primary" style="margin-right: 10px; border-radius: 10rpx; padding: 0 20px; height: 60rpx; line-height: 60rpx; font-size: 26rpx" :disabled="widget.options.force && countDown > 0">我同意 <text v-if="widget.options.force && countDown > 0">({{ countDown }}s)</text></button>
|
|
98
|
-
<button style="height: 60rpx; line-height: 60rpx; font-size: 26rpx; border-radius: 10rpx; color: #333" @click="cancel">不同意</button>
|
|
99
|
-
</view>
|
|
100
|
-
<view v-else style="display: flex; justify-content: center; align-items: center">
|
|
101
|
-
<button @click="isShow = false" type="primary" style="margin-bottom: 20px; border-radius: 10rpx; padding: 0 20px; height: 60rpx; line-height: 60rpx; font-size: 26rpx; " >关闭</button>
|
|
102
|
-
</view>
|
|
103
|
-
</scroll-view>
|
|
104
|
-
</view>
|
|
105
|
-
</full-modal>
|
|
106
|
-
<view class="responsibility_check" >
|
|
107
|
-
<view @click.stop="handleCheck">
|
|
108
|
-
<label>
|
|
109
|
-
<checkbox :disabled="widget.options.disabled" :readonly="widget.options.disabled" v-if="!isShow" :checked="dataModel" color="#007AFF" style="transform: scale(0.8,0.8);"/>
|
|
110
|
-
</label>
|
|
111
|
-
</view>
|
|
112
|
-
<view class="option-font-size" @click.stop="handleClick">{{ widget.options.title }}</view>
|
|
113
|
-
|
|
114
|
-
</view>
|
|
115
|
-
</view>
|
|
116
|
-
|
|
117
|
-
</template>
|
|
118
|
-
|
|
119
|
-
<style lang="less">
|
|
120
|
-
.responsibility_check {
|
|
121
|
-
display: flex;
|
|
122
|
-
align-items: center;
|
|
123
|
-
/deep/ .uni-checkbox-input {
|
|
124
|
-
width: 18px;
|
|
125
|
-
height: 18px;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
1
|
+
<script>
|
|
2
|
+
import FullModal from "../../fullModal/fullModal.vue";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: "responsibility",
|
|
6
|
+
props: {
|
|
7
|
+
value: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ''
|
|
10
|
+
},
|
|
11
|
+
widget: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => ({})
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
components: {FullModal},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
countDown: 0,
|
|
20
|
+
force: false,
|
|
21
|
+
clearTimeout: null,
|
|
22
|
+
dataModel: false,
|
|
23
|
+
isShow: false,
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
watch: {
|
|
27
|
+
value: {
|
|
28
|
+
handler(val) {
|
|
29
|
+
if (!val) return this.dataModel = false
|
|
30
|
+
this.dataModel = true
|
|
31
|
+
},
|
|
32
|
+
immediate: true
|
|
33
|
+
},
|
|
34
|
+
dataModel(val) {
|
|
35
|
+
this.$emit('input', val ? true : '')
|
|
36
|
+
this.$emit('change', val ? true: '')
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
handleClick() {
|
|
41
|
+
if (this.widget.options.disabled) {
|
|
42
|
+
this.isShow = true
|
|
43
|
+
return
|
|
44
|
+
}
|
|
45
|
+
this.isShow = true
|
|
46
|
+
this.countDown = 0
|
|
47
|
+
clearInterval(this.clearTimeout)
|
|
48
|
+
if (this.widget.options.force) {
|
|
49
|
+
this.countDown = this.widget.options.countDown
|
|
50
|
+
this.clearTimeout = setInterval(() => {
|
|
51
|
+
if (this.countDown < 0) {
|
|
52
|
+
clearInterval(this.clearTimeout)
|
|
53
|
+
}
|
|
54
|
+
this.countDown -= 1
|
|
55
|
+
}, 1000)
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
confirm() {
|
|
59
|
+
if (this.countDown <= 0) {
|
|
60
|
+
this.dataModel = true
|
|
61
|
+
this.isShow = false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
cancel() {
|
|
65
|
+
this.isShow = false
|
|
66
|
+
this.dataModel = false
|
|
67
|
+
clearInterval(this.clearTimeout)
|
|
68
|
+
},
|
|
69
|
+
handleCheck() {
|
|
70
|
+
const { disabled, force} = this.widget.options
|
|
71
|
+
if (disabled) return
|
|
72
|
+
if (force && !disabled) {
|
|
73
|
+
if (this.dataModel) return this.dataModel = false
|
|
74
|
+
return this.handleClick()
|
|
75
|
+
}
|
|
76
|
+
this.dataModel = !this.dataModel
|
|
77
|
+
},
|
|
78
|
+
change(e) {
|
|
79
|
+
console.log(e)
|
|
80
|
+
},
|
|
81
|
+
disabledScroll() {
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<template>
|
|
89
|
+
<view>
|
|
90
|
+
<full-modal v-model="isShow">
|
|
91
|
+
<view style="height: 100%; background-color: #fff" @touchmove.stop.prevent="disabledScroll">
|
|
92
|
+
<scroll-view scroll-y="true" style="height: calc(100% - 100rpx); " >
|
|
93
|
+
<view style="padding: 20rpx 40rpx;">
|
|
94
|
+
<rich-text :nodes="widget.options.content" style="text-align: left"></rich-text>
|
|
95
|
+
</view>
|
|
96
|
+
<view v-if="!widget.options.disabled" style="display: flex; padding: 20rpx; margin-bottom: 20rpx; justify-content: center">
|
|
97
|
+
<button @click="confirm" type="primary" style="margin-right: 10px; border-radius: 10rpx; padding: 0 20px; height: 60rpx; line-height: 60rpx; font-size: 26rpx" :disabled="widget.options.force && countDown > 0">我同意 <text v-if="widget.options.force && countDown > 0">({{ countDown }}s)</text></button>
|
|
98
|
+
<button style="height: 60rpx; line-height: 60rpx; font-size: 26rpx; border-radius: 10rpx; color: #333" @click="cancel">不同意</button>
|
|
99
|
+
</view>
|
|
100
|
+
<view v-else style="display: flex; justify-content: center; align-items: center">
|
|
101
|
+
<button @click="isShow = false" type="primary" style="margin-bottom: 20px; border-radius: 10rpx; padding: 0 20px; height: 60rpx; line-height: 60rpx; font-size: 26rpx; " >关闭</button>
|
|
102
|
+
</view>
|
|
103
|
+
</scroll-view>
|
|
104
|
+
</view>
|
|
105
|
+
</full-modal>
|
|
106
|
+
<view class="responsibility_check" >
|
|
107
|
+
<view @click.stop="handleCheck">
|
|
108
|
+
<label>
|
|
109
|
+
<checkbox :disabled="widget.options.disabled" :readonly="widget.options.disabled" v-if="!isShow" :checked="dataModel" color="#007AFF" style="transform: scale(0.8,0.8);"/>
|
|
110
|
+
</label>
|
|
111
|
+
</view>
|
|
112
|
+
<view class="option-font-size" @click.stop="handleClick">{{ widget.options.title }}</view>
|
|
113
|
+
|
|
114
|
+
</view>
|
|
115
|
+
</view>
|
|
116
|
+
|
|
117
|
+
</template>
|
|
118
|
+
|
|
119
|
+
<style lang="less">
|
|
120
|
+
.responsibility_check {
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
/deep/ .uni-checkbox-input {
|
|
124
|
+
width: 18px;
|
|
125
|
+
height: 18px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
128
|
</style>
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
原值是: {{ widget.options.oldValue }}
|
|
7
7
|
</view>
|
|
8
8
|
<view class="editCorrent"
|
|
9
|
-
v-if="isCorrect &&
|
|
10
|
-
@click="CorrentItem">
|
|
9
|
+
v-if="isCorrect && widget.options.canCorrect"
|
|
10
|
+
@click.stop="CorrentItem">
|
|
11
11
|
<!-- ===undefined兼容老版本表单 -->
|
|
12
|
-
<
|
|
12
|
+
<text style="color: #4480E3">纠错</text>
|
|
13
13
|
</view>
|
|
14
14
|
<slot></slot>
|
|
15
15
|
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
</view>
|
|
276
276
|
<view class="evan-form-item-container__main" :style="mContentStyle">
|
|
277
277
|
<l-file :url="getUploadFileUrl(widget)" :disabled="widget.options.disabled" @filePost="filePost"
|
|
278
|
-
@fileDelete="fileDelete" :defaultFile="dataModel" :widget="widget">
|
|
278
|
+
@fileDelete="fileDelete" :defaultFile="dataModel" :widget="widget" style="width: 100%;">
|
|
279
279
|
</l-file>
|
|
280
280
|
</view>
|
|
281
281
|
</view>
|
|
@@ -718,7 +718,7 @@ export default {
|
|
|
718
718
|
dataModelShow: '',
|
|
719
719
|
imgUrl: this.uniEnv.imgUrl,
|
|
720
720
|
actionUrl: this.uniEnv.uploadUrl,
|
|
721
|
-
correntArray: ['input', 'textarea'],
|
|
721
|
+
correntArray: ['input', 'textarea','date'],
|
|
722
722
|
checkboxAndRadioOptions: [],
|
|
723
723
|
selectedData: [],
|
|
724
724
|
locationInfo: {},
|
|
@@ -1069,10 +1069,11 @@ export default {
|
|
|
1069
1069
|
...this.widget,
|
|
1070
1070
|
dataModel: this.dataModel
|
|
1071
1071
|
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1072
|
+
console.log(getApp().globalData.correntWidget)
|
|
1073
|
+
Pubsub.subscribe('corrent_item', (msg) => {
|
|
1074
|
+
console.log(msg)
|
|
1075
|
+
})
|
|
1076
|
+
Pubsub.publish('corrent_item', getApp().globalData.correntWidget)
|
|
1076
1077
|
},
|
|
1077
1078
|
/****更新*userSelector**/
|
|
1078
1079
|
updateUserSelectorModal() {
|
|
@@ -1779,10 +1780,10 @@ icon {
|
|
|
1779
1780
|
}
|
|
1780
1781
|
|
|
1781
1782
|
.u_close {
|
|
1782
|
-
width:
|
|
1783
|
+
width: 21px;
|
|
1783
1784
|
position: absolute;
|
|
1784
1785
|
right: 0;
|
|
1785
|
-
top:
|
|
1786
|
+
top: 50%;
|
|
1786
1787
|
transform: translateY(-50%);
|
|
1787
1788
|
}
|
|
1788
1789
|
|
|
@@ -1818,9 +1819,9 @@ checkbox-group label {
|
|
|
1818
1819
|
position: absolute;
|
|
1819
1820
|
right: 20upx;
|
|
1820
1821
|
top: 10upx;
|
|
1821
|
-
width: 50upx;
|
|
1822
|
+
//width: 50upx;
|
|
1822
1823
|
height: 50upx;
|
|
1823
|
-
|
|
1824
|
+
z-index: 1;
|
|
1824
1825
|
img {
|
|
1825
1826
|
width: 30upx;
|
|
1826
1827
|
height: 30upx;
|
|
@@ -1838,8 +1839,8 @@ checkbox-group label {
|
|
|
1838
1839
|
}
|
|
1839
1840
|
|
|
1840
1841
|
.isCorrected {
|
|
1841
|
-
border-top: 2upx solid #ff0000;
|
|
1842
|
-
border-bottom: 2upx solid #ff0000;
|
|
1842
|
+
//border-top: 2upx solid #ff0000;
|
|
1843
|
+
//border-bottom: 2upx solid #ff0000;
|
|
1843
1844
|
}
|
|
1844
1845
|
|
|
1845
1846
|
.showFalse {
|
|
@@ -1886,8 +1887,9 @@ checkbox-group label {
|
|
|
1886
1887
|
align-items: center;
|
|
1887
1888
|
overflow: hidden;
|
|
1888
1889
|
justify-content: flex-start;
|
|
1890
|
+
position: relative;
|
|
1889
1891
|
padding-left: $uni-form-padding-left;
|
|
1890
|
-
z-index: 10;
|
|
1892
|
+
//z-index: 10;
|
|
1891
1893
|
|
|
1892
1894
|
.form-input {
|
|
1893
1895
|
font-size: $uni-form-content-font-size;
|
|
@@ -1935,7 +1937,7 @@ checkbox-group label {
|
|
|
1935
1937
|
font-size: $uni-form-title-font-size;
|
|
1936
1938
|
// font-weight: bold;
|
|
1937
1939
|
// line-height: 40upx;
|
|
1938
|
-
padding: 25upx 0 25upx 30rpx;
|
|
1940
|
+
//padding: 25upx 0 25upx 30rpx;
|
|
1939
1941
|
display: inline-block;
|
|
1940
1942
|
}
|
|
1941
1943
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {toAwait} from "../../../utils/util";
|
|
2
|
+
import Vue from 'vue'
|
|
3
|
+
export default {
|
|
4
|
+
methods: {
|
|
5
|
+
async getOpenId() {
|
|
6
|
+
let openId = Vue.prototype._openId
|
|
7
|
+
if (openId) return Promise.resolve(openId)
|
|
8
|
+
|
|
9
|
+
const [ err , res ] = await toAwait(this.$u.get('/sys/user/getUserPublicOpenId'))
|
|
10
|
+
openId = await this.$async_encryption(res.result)
|
|
11
|
+
Vue.prototype._openId = openId
|
|
12
|
+
return openId
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -78,7 +78,14 @@ export const pubSubMixin = {
|
|
|
78
78
|
if (this.widget.options.formula?.formula) {
|
|
79
79
|
let { formula, relyWidgets =[] } = this.widget.options.formula
|
|
80
80
|
setTimeout(() => {
|
|
81
|
-
if (!this.dataModel) this.calc_run(true
|
|
81
|
+
if (!this.dataModel) this.calc_run(true, {
|
|
82
|
+
msg: {
|
|
83
|
+
val: this.dataModel,
|
|
84
|
+
},
|
|
85
|
+
model: this.widget.model,
|
|
86
|
+
tableKey: this.tableKey,
|
|
87
|
+
tableIndex: this.tableIndex,
|
|
88
|
+
})
|
|
82
89
|
}, 100)
|
|
83
90
|
relyWidgets.forEach(item => {
|
|
84
91
|
if (item.includes('.')) item = item.split('.').slice(-1)[0]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view>
|
|
3
|
-
<view class="file_conten">
|
|
2
|
+
<view style="width: 100%;">
|
|
3
|
+
<view class="file_conten" style="width: 100%;">
|
|
4
4
|
<view class="file_upload option-font-size" @click="chooseMessageFile"
|
|
5
5
|
v-if="isShow">
|
|
6
6
|
{{ widget.options.placeholder || '点击上传'}}
|
|
7
7
|
</view>
|
|
8
|
-
<view>
|
|
8
|
+
<view style="width: 100%">
|
|
9
9
|
<view class="file_item" v-for="(item,idx) in defaultFile" :key="idx">
|
|
10
10
|
<view @click="downLoadFile(item.url,item.name, item)" style="max-width: 640rpx;color: rgb(0, 122, 255); overflow: hidden" :style="{maxWidth: disabled ? '100%': '640rpx'}">{{item.name}}</view>
|
|
11
11
|
<icon type="clear" size="16" @click="handleDelete(idx)" v-if="!disabled" />
|
|
@@ -256,7 +256,7 @@ import {downloadFile, getOpenId, toAwait} from "../../utils/util";
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
.file_item {
|
|
259
|
-
width:
|
|
259
|
+
width: calc(100% - 10px);
|
|
260
260
|
display: flex;
|
|
261
261
|
justify-content: space-between;
|
|
262
262
|
align-items: center;
|