seimin 10 months ago
parent
commit
a6fc3f1f18

+ 1 - 1
pages/inspection/inspectionExecute/inspectionExecute.vue

@@ -110,7 +110,7 @@
110 110
     });
111 111
     // 'inspection|$|1bd0c704-0962-4ed4-b5a6-b5bda3d78231'
112 112
     // 'inspection|$|bc9f61af-99c8-4c86-88f9-f29dd3fc43c0'
113
-    SM().then((ress1) => {
113
+    SM('inspection|$|bc9f61af-99c8-4c86-88f9-f29dd3fc43c0').then((ress1) => {
114 114
       let postData = {
115 115
         code: ress1,
116 116
         taskId: data.id,

+ 4 - 4
pages/inspection/inspectionValue/inspectionValue.vue

@@ -4,20 +4,20 @@
4 4
       <uni-forms ref="baseForm" :model="formValues" :rules="rules" class="form" label-position="top">
5 5
         <template v-for="(item, index) of baseFormData" :key="index">
6 6
           <!-- 下拉 -->
7
-          <uni-forms-item v-if="item.type === '1'" class="formItem" :label="item.name" :required="item.required" :name="item.key">
7
+          <uni-forms-item v-if="item.type === '1'" class="formItem" :label="item.name" :exception="item.isException" :required="item.required" :name="item.key">
8 8
             <uni-data-picker :placeholder="'请选择' + item.name" :popup-title="'请选择' + item.name" :localdata="item.list" v-model="formValues[item.key]" @change="changeForm()">
9 9
             </uni-data-picker>
10 10
           </uni-forms-item>
11 11
           <!-- 单选 -->
12
-          <uni-forms-item v-if="item.type === '2'" class="formItem" :label="item.name" :required="item.required" :name="item.key">
12
+          <uni-forms-item v-if="item.type === '2'" class="formItem" :label="item.name" :exception="item.isException" :required="item.required" :name="item.key">
13 13
             <uni-data-checkbox v-model="formValues[item.key]" @change="changeForm()" :localdata="item.list" />
14 14
           </uni-forms-item>
15 15
           <!-- 多选 -->
16
-          <uni-forms-item v-if="item.type === '3'" class="formItem" :label="item.name" :required="item.required" :name="item.key">
16
+          <uni-forms-item v-if="item.type === '3'" class="formItem" :label="item.name" :exception="item.isException" :required="item.required" :name="item.key">
17 17
             <uni-data-checkbox v-model="formValues[item.key]" @change="changeForm()" multiple :localdata="item.list" />
18 18
           </uni-forms-item>
19 19
           <!-- 数字 -->
20
-          <uni-forms-item v-if="item.type === '4'" class="formItem" :label="item.name" :required="item.required" :name="item.key">
20
+          <uni-forms-item v-if="item.type === '4'" class="formItem" :label="item.name" :exception="item.isException" :required="item.required" :name="item.key">
21 21
             <uni-number-box v-model="formValues[item.key]" @change="changeForm()" :min="-9999" :max="9999" :placeholder="'请输入' + item.name"></uni-number-box>
22 22
           </uni-forms-item>
23 23
           <!-- 单行 -->

+ 3 - 0
readme.md

@@ -7,3 +7,6 @@
7 7
 - static       存放资源文件
8 8
 - stores       存放状态管理
9 9
 - filters      存放过滤器
10
+
11
+# uni-ui源码修改记录
12
+- uni-forms-item.vue增加exception参数

+ 4 - 0
static/scss/common.scss

@@ -5,6 +5,10 @@ page{
5 5
   height: 100vh;
6 6
 }
7 7
 
8
+.red{
9
+  color:red!important;
10
+}
11
+
8 12
 uni-toast,
9 13
 [longpressactions]{
10 14
   z-index: 99999!important;

+ 6 - 0
uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue

@@ -6,6 +6,7 @@
6 6
 				:style="{width:localLabelWidth,justifyContent: localLabelAlign}">
7 7
 				<text v-if="required" class="is-required">*</text>
8 8
 				<text>{{label}}</text>
9
+				<text v-if="exception">&nbsp;<text class="red">异</text></text>
9 10
 			</view>
10 11
 		</slot>
11 12
 		<!-- #ifndef APP-NVUE -->
@@ -36,6 +37,7 @@
36 37
 	 * @tutorial https://ext.dcloud.net.cn/plugin?id=2773
37 38
 	 * @property {Boolean} required 是否必填,左边显示红色"*"号
38 39
 	 * @property {String } 	label 				输入框左边的文字提示
40
+	 * @property {Boolean } exception 		是否异常
39 41
 	 * @property {Number } 	labelWidth 			label的宽度,单位px(默认70)
40 42
 	 * @property {String } 	labelAlign = [left|center|right] label的文字对齐方式(默认left)
41 43
 	 * 	@value left		label 左侧显示
@@ -91,6 +93,10 @@
91 93
 				type: String,
92 94
 				default: ''
93 95
 			},
96
+      exception: {
97
+      	type: Boolean,
98
+      	default: false
99
+      },
94 100
 			// label的宽度
95 101
 			labelWidth: {
96 102
 				type: [String, Number],