|
@@ -14,7 +14,7 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</row-item>
|
|
</row-item>
|
|
</row-list>
|
|
</row-list>
|
|
- <row-list :col="1">
|
|
|
|
|
|
+ <row-list :col="1" v-show="content == 0">
|
|
<row-item>
|
|
<row-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
label="名称"
|
|
label="名称"
|
|
@@ -26,6 +26,19 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</row-item>
|
|
</row-item>
|
|
<row-item>
|
|
<row-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="频次周期"
|
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
+ >
|
|
|
|
+ <a-input-number
|
|
|
|
+ :min="0"
|
|
|
|
+ :formatter="value => `${value}天`"
|
|
|
|
+ :parser="value => value.replace('天', '')"
|
|
|
|
+ v-decorator="['period', {rules: [{required: true, message: '名频次周期不能为空'}]}]"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </row-item>
|
|
|
|
+ <!-- <row-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
label="类型"
|
|
label="类型"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
@@ -42,8 +55,8 @@
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- </row-item>
|
|
|
|
- <row-item>
|
|
|
|
|
|
+ </row-item> -->
|
|
|
|
+ <!-- <row-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
label="使用类型"
|
|
label="使用类型"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
@@ -60,9 +73,7 @@
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- </row-item>
|
|
|
|
- </row-list>
|
|
|
|
- <row-list :col="1">
|
|
|
|
|
|
+ </row-item> -->
|
|
<row-item>
|
|
<row-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
label="备注"
|
|
label="备注"
|
|
@@ -75,9 +86,32 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</row-item>
|
|
</row-item>
|
|
</row-list>
|
|
</row-list>
|
|
|
|
+ <row-list v-show="content == 1">
|
|
|
|
+ <row-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="巡检内容"
|
|
|
|
+ :labelCol="BaseTool.Constant.labelCol3"
|
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
+ >
|
|
|
|
+ <a-checkbox-group
|
|
|
|
+ v-decorator="['infoIds']"
|
|
|
|
+ >
|
|
|
|
+ <br />
|
|
|
|
+ <div v-for="option in options " :key="option.id">
|
|
|
|
+ <a-checkbox style="display: inline-block;width:500px;" :value="option.id">
|
|
|
|
+ <span >{{ option.name }}---{{ option.remark }}</span>
|
|
|
|
+ </a-checkbox>
|
|
|
|
+ <br />
|
|
|
|
+ </div>
|
|
|
|
+ </a-checkbox-group>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </row-item>
|
|
|
|
+ </row-list>
|
|
</a-form>
|
|
</a-form>
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
- <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
|
|
|
|
|
|
+ <a-button v-show="content == 1" :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
|
|
|
|
+ <a-button v-show="content == 0" :loading="confirmLoading" type="primary" @click="content++">下一步</a-button>
|
|
|
|
+ <a-button v-show="content == 1" :loading="confirmLoading" type="primary" @click="content--">上一步</a-button>
|
|
</template>
|
|
</template>
|
|
</a-modal>
|
|
</a-modal>
|
|
</template>
|
|
</template>
|
|
@@ -85,8 +119,11 @@
|
|
<script>
|
|
<script>
|
|
import pick from 'lodash.pick'
|
|
import pick from 'lodash.pick'
|
|
import { addFillGather, updateFillGather } from '@/api/fill/gather'
|
|
import { addFillGather, updateFillGather } from '@/api/fill/gather'
|
|
|
|
+import { getFillInfo } from '@/api/fill/info'
|
|
|
|
+import RowList from '@/components/custom/RowList.vue'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
+ components: { RowList },
|
|
name: 'BaseFillGather',
|
|
name: 'BaseFillGather',
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -94,6 +131,8 @@ export default {
|
|
modalTitle: null,
|
|
modalTitle: null,
|
|
form: this.$form.createForm(this),
|
|
form: this.$form.createForm(this),
|
|
visible: false,
|
|
visible: false,
|
|
|
|
+ options: [],
|
|
|
|
+ content: 0,
|
|
// 下拉框map
|
|
// 下拉框map
|
|
useTypeMap: {},
|
|
useTypeMap: {},
|
|
codeIdMap: {}
|
|
codeIdMap: {}
|
|
@@ -104,6 +143,10 @@ export default {
|
|
// 下拉框map
|
|
// 下拉框map
|
|
this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FILL_INFO_USE_TYPE)
|
|
this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FILL_INFO_USE_TYPE)
|
|
this.codeIdMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FILL_GATHER_CODE_ID)
|
|
this.codeIdMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FILL_GATHER_CODE_ID)
|
|
|
|
+ getFillInfo().then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.options = res.data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
base (record) {
|
|
base (record) {
|
|
@@ -116,12 +159,13 @@ export default {
|
|
this.modalTitle = '编辑'
|
|
this.modalTitle = '编辑'
|
|
const { form: { setFieldsValue } } = this
|
|
const { form: { setFieldsValue } } = this
|
|
// 日期处理
|
|
// 日期处理
|
|
|
|
+
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
'id',
|
|
'id',
|
|
'name',
|
|
'name',
|
|
- 'codeId',
|
|
|
|
- 'useType',
|
|
|
|
|
|
+ 'period',
|
|
|
|
+ 'infoIds',
|
|
'remark'
|
|
'remark'
|
|
])))
|
|
])))
|
|
})
|
|
})
|
|
@@ -135,6 +179,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
// 日期处理
|
|
// 日期处理
|
|
|
|
+ console.log(values)
|
|
if (this.BaseTool.String.isBlank(values.id)) {
|
|
if (this.BaseTool.String.isBlank(values.id)) {
|
|
addFillGather(values)
|
|
addFillGather(values)
|
|
.then(() => {
|
|
.then(() => {
|
|
@@ -154,6 +199,7 @@ export default {
|
|
},
|
|
},
|
|
handleCancel (values) {
|
|
handleCancel (values) {
|
|
this.visible = false
|
|
this.visible = false
|
|
|
|
+ this.content = 0
|
|
this.confirmLoading = false
|
|
this.confirmLoading = false
|
|
this.form.resetFields()
|
|
this.form.resetFields()
|
|
if (this.BaseTool.Object.isNotBlank(values)) {
|
|
if (this.BaseTool.Object.isNotBlank(values)) {
|
|
@@ -164,3 +210,6 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+
|
|
|
|
+</style>
|