|
@@ -26,7 +26,23 @@
|
|
|
:options="deviceArr"
|
|
|
@change="deviceArrToggle"
|
|
|
></el-cascader>
|
|
|
- <div style="text-align: center; margin-top: 20px">
|
|
|
+ <!-- <div style="text-align: center; margin-top: 20px">
|
|
|
+ <el-transfer
|
|
|
+ style="text-align: left; display: inline-block"
|
|
|
+ v-model="formData.deviceIds"
|
|
|
+ filterable
|
|
|
+ :props="{
|
|
|
+ key: 'id',
|
|
|
+ label: 'deviceName'
|
|
|
+ }"
|
|
|
+ :titles="['待选列表', '已选列表']"
|
|
|
+ :data="devicesArr"
|
|
|
+ ></el-transfer>
|
|
|
+ </div> -->
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="deviceIds">
|
|
|
+ <div style="text-align: center">
|
|
|
<el-transfer
|
|
|
style="text-align: left; display: inline-block"
|
|
|
v-model="formData.deviceIds"
|
|
@@ -117,7 +133,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}),
|
|
|
- typeValue: [this.$valid.selectRequired('设备/设施类型')]
|
|
|
+ typeValue: [this.$valid.selectRequired('设备/设施类型')],
|
|
|
+ deviceIds: this.$valid.custome({
|
|
|
+ validator(rule, value, cb) {
|
|
|
+ const rl = rule;
|
|
|
+ if (!value.length) {
|
|
|
+ rl.message = '已选列表不能为空';
|
|
|
+ cb(new Error());
|
|
|
+ } else {
|
|
|
+ cb();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
formCols: [
|
|
|
[
|
|
@@ -136,6 +163,12 @@ export default {
|
|
|
prop: 'typeValue',
|
|
|
slot: 'typeValue'
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '',
|
|
|
+ prop: 'deviceIds',
|
|
|
+ slot: 'deviceIds'
|
|
|
+ },
|
|
|
+
|
|
|
{
|
|
|
label: '巡检时间',
|
|
|
prop: 'startDate',
|
|
@@ -166,7 +199,7 @@ export default {
|
|
|
defaultProps: {
|
|
|
value: 'id', // 唯一标识
|
|
|
label: 'label', // 标签显示
|
|
|
- children: 'children',
|
|
|
+ children: 'children'
|
|
|
},
|
|
|
defaultProps1: {
|
|
|
value: 'id', // 唯一标识
|