|
@@ -64,7 +64,9 @@
|
|
|
>
|
|
|
<a-input
|
|
|
@blur="checkPoint"
|
|
|
- v-decorator="['description', {rules: [{required: true, message: '描述不能为空'}]}]"/>
|
|
|
+ style="width: 60%"
|
|
|
+ v-decorator="['description', {rules: [{required: true, message: '点位不能为空'}]}]"/>
|
|
|
+ <a-button type="primary" style="width: 40%" @click="handleAddFetch()">设置就地点位</a-button>
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
<row-item>
|
|
@@ -98,7 +100,23 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</row-item>
|
|
|
-<!-- <row-item>
|
|
|
+ <row-item>
|
|
|
+ <a-form-item
|
|
|
+ label="是否开关点位"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-select v-decorator="['fetchFlag', {initialValue:1, rules: [{required: true, message: '是否开关点位'}]}]" placeholder="请选择">
|
|
|
+ <a-select-option
|
|
|
+ v-for="(label,value) in yesNoMap"
|
|
|
+ :key="value"
|
|
|
+ :label="label"
|
|
|
+ :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </row-item>
|
|
|
+ <!-- <row-item>
|
|
|
|
|
|
<a-form-item
|
|
|
label="是否模拟量"
|
|
@@ -412,6 +430,7 @@ export default {
|
|
|
return {
|
|
|
confirmLoading: false,
|
|
|
modalTitle: null,
|
|
|
+ model: null,
|
|
|
map: {},
|
|
|
treeData: [],
|
|
|
yesNoMap: {},
|
|
@@ -448,7 +467,37 @@ export default {
|
|
|
this.modalTitle = '添加'
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
|
- 'line'
|
|
|
+ 'sbId',
|
|
|
+ 'sbName',
|
|
|
+ 'positionNum',
|
|
|
+ 'type',
|
|
|
+ 'line',
|
|
|
+ 'description',
|
|
|
+ 'result',
|
|
|
+ 'ratio',
|
|
|
+ 'low',
|
|
|
+ 'high',
|
|
|
+ 'warnFirst',
|
|
|
+ 'warnSecond',
|
|
|
+ 'warnThird',
|
|
|
+ 'warnFour',
|
|
|
+ 'warnFirstColor',
|
|
|
+ 'warnSecondColor',
|
|
|
+ 'warnThirdColor',
|
|
|
+ 'warnFourColor',
|
|
|
+ 'xposition',
|
|
|
+ 'yposition',
|
|
|
+ 'imgXPosition',
|
|
|
+ 'imgYPosition',
|
|
|
+ 'width',
|
|
|
+ 'height',
|
|
|
+ 'unit',
|
|
|
+ 'avFlag',
|
|
|
+ 'portFlag',
|
|
|
+ 'createdFlag',
|
|
|
+ 'fetchFlag',
|
|
|
+ 'positionFlag',
|
|
|
+ 'remark'
|
|
|
]),
|
|
|
pick(position, [
|
|
|
'xposition',
|
|
@@ -462,6 +511,7 @@ export default {
|
|
|
}
|
|
|
this.modalTitle = '编辑'
|
|
|
this.type = record.type
|
|
|
+ this.model = record
|
|
|
// 日期处理
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
@@ -491,9 +541,9 @@ export default {
|
|
|
'width',
|
|
|
'height',
|
|
|
'unit',
|
|
|
- 'avFlag',
|
|
|
'portFlag',
|
|
|
'createdFlag',
|
|
|
+ 'fetchFlag',
|
|
|
'positionFlag',
|
|
|
'remark'
|
|
|
])))
|
|
@@ -551,6 +601,19 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ handleAddFetch () {
|
|
|
+ if (this.type === 1) {
|
|
|
+ this.$message.error('只有布尔类型的点位,才可以配置就地点位')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.model.id = null
|
|
|
+ this.model.positionNum = null
|
|
|
+ this.model.sbName = null
|
|
|
+ this.model.description = null
|
|
|
+ this.model.fetchFlag = 0
|
|
|
+ this.model.remark = null
|
|
|
+ this.base(this.model)
|
|
|
+ },
|
|
|
save () {
|
|
|
const { form: { validateFieldsAndScroll } } = this
|
|
|
this.confirmLoading = true
|