法规清单、认证清单、市场法规清单、市场认证清单增加责任部门
This commit is contained in:
@@ -258,13 +258,15 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
|
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
optionFilterProp="label"
|
optionFilterProp="label"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
|
:disabled="disabled"
|
||||||
|
@change="DutyDepartChange"
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
v-model="formInline.firstLevelDutyTerritory">
|
v-model="formInline.dutyDepart">
|
||||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
:key="key"
|
:key="key"
|
||||||
:label="item.key"
|
:label="item.key"
|
||||||
@@ -285,11 +287,27 @@
|
|||||||
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
|
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
|
||||||
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
:disabled="disabled"
|
class="box-input"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
optionFilterProp="label"
|
||||||
:type="'select'"
|
mode="multiple"
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
:disabled="disabled"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="formInline.dutyTerritory">
|
||||||
|
<a-select-option v-for="(item, key) in dutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.itemText"
|
||||||
|
:value="item.itemValue">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
|
||||||
|
{{ item.itemText }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
|
||||||
|
<!-- :disabled="disabled"-->
|
||||||
|
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
||||||
|
<!-- :type="'select'"-->
|
||||||
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -720,7 +738,14 @@
|
|||||||
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
|
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
dutyDepart:[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
},
|
},
|
||||||
formInline: {},
|
formInline: {},
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -728,6 +753,7 @@
|
|||||||
CategoryTreeList: [],
|
CategoryTreeList: [],
|
||||||
DeliverableTreeList: [],
|
DeliverableTreeList: [],
|
||||||
firstLevelDutyTerritoryList:[],
|
firstLevelDutyTerritoryList:[],
|
||||||
|
dutyTerritoryList:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -736,6 +762,23 @@
|
|||||||
this.getFirstLevelDutyTerritory()
|
this.getFirstLevelDutyTerritory()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
DutyDepartChange(event) {
|
||||||
|
this.formInline.dutyTerritory = []
|
||||||
|
this.formInline = {...this.formInline}
|
||||||
|
this.getDutyTerritory(event.join(','))
|
||||||
|
},
|
||||||
|
getDutyTerritory(row) {
|
||||||
|
let query = {
|
||||||
|
dutyDepart: row
|
||||||
|
}
|
||||||
|
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dutyTerritoryList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.dutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getFirstLevelDutyTerritory() {
|
getFirstLevelDutyTerritory() {
|
||||||
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -773,7 +816,8 @@
|
|||||||
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
|
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
|
||||||
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
|
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
|
||||||
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
|
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
|
||||||
this.formInline.firstLevelDutyTerritory = this.formInline.firstLevelDutyTerritory ? this.formInline.firstLevelDutyTerritory.split(',') : []
|
this.formInline.dutyDepart = this.formInline.dutyDepart ? this.formInline.dutyDepart.split(',') : []
|
||||||
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory ? this.formInline.dutyTerritory.split(',') : []
|
||||||
this.$refs.ruleForm.clearValidate()
|
this.$refs.ruleForm.clearValidate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -787,7 +831,8 @@
|
|||||||
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
|
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
|
||||||
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
|
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
|
||||||
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
|
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
|
||||||
this.formInline.firstLevelDutyTerritory = this.formInline.firstLevelDutyTerritory ? this.formInline.firstLevelDutyTerritory.split(',') : []
|
this.formInline.dutyDepart = this.formInline.dutyDepart ? this.formInline.dutyDepart.split(',') : []
|
||||||
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory ? this.formInline.dutyTerritory.split(',') : []
|
||||||
this.$refs.ruleForm.clearValidate()
|
this.$refs.ruleForm.clearValidate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -1039,4 +1084,7 @@
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 0 0 2px 2px;
|
border-radius: 0 0 2px 2px;
|
||||||
}
|
}
|
||||||
|
::v-deep .ant-form-item-with-help {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
+99
-24
@@ -163,15 +163,16 @@
|
|||||||
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi"
|
<a-form-model-item class="itemModel-multi"
|
||||||
:prop="'dataList.'+index+'.firstLevelDutyTerritory'"
|
:prop="'dataList.'+index+'.dutyDepart'"
|
||||||
:rules="[{ required: true, message: $t('statisticalNodes') + $t('cannotEmpty'), trigger: 'change'},]"
|
:rules="[{ required: true, message: $t('statisticalNodes') + $t('cannotEmpty'), trigger: 'change'},]"
|
||||||
>
|
>
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
optionFilterProp="label"
|
optionFilterProp="label"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
|
@change="DutyDepartChange(index)"
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
v-model="item.firstLevelDutyTerritory">
|
v-model="item.dutyDepart">
|
||||||
<a-select-option v-for="(val, key) in firstLevelDutyTerritoryList"
|
<a-select-option v-for="(val, key) in firstLevelDutyTerritoryList"
|
||||||
:key="key"
|
:key="key"
|
||||||
:label="val.key"
|
:label="val.key"
|
||||||
@@ -195,12 +196,28 @@
|
|||||||
:prop="'dataList.'+index+'.dutyTerritory'"
|
:prop="'dataList.'+index+'.dutyTerritory'"
|
||||||
:rules="[{ required: true, message: $t('areaOfResponsibility') + $t('cannotEmpty'), trigger: 'change'},]"
|
:rules="[{ required: true, message: $t('areaOfResponsibility') + $t('cannotEmpty'), trigger: 'change'},]"
|
||||||
>
|
>
|
||||||
<j-dict-select-tag class="box-input" v-model="item.dutyTerritory"
|
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
@input="handleInput('dataList.'+index+'.dutyTerritory')"
|
class="box-input"
|
||||||
@changeQuery="dutyHandleChange(index)"
|
optionFilterProp="label"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
mode="multiple"
|
||||||
:type="'select'"
|
@change="dutyHandleChange(index)"
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="item.dutyTerritory">
|
||||||
|
<a-select-option v-for="(val, key) in item.dutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="val.itemText"
|
||||||
|
:value="val.itemValue">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" val.itemText ">
|
||||||
|
{{ val.itemText }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<!-- <j-dict-select-tag class="box-input" v-model="item.dutyTerritory"-->
|
||||||
|
<!-- @input="handleInput('dataList.'+index+'.dutyTerritory')"-->
|
||||||
|
<!-- @changeQuery="dutyHandleChange(index)"-->
|
||||||
|
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
||||||
|
<!-- :type="'select'"-->
|
||||||
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -413,13 +430,14 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
|
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
optionFilterProp="label"
|
optionFilterProp="label"
|
||||||
|
@change="DutyDepartChangeOne"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
v-model="formInline.firstLevelDutyTerritory">
|
v-model="formInline.dutyDepart">
|
||||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
:key="key"
|
:key="key"
|
||||||
:label="item.key"
|
:label="item.key"
|
||||||
@@ -439,15 +457,31 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel"
|
<a-form-model-item class="itemModel-multi"
|
||||||
:prop="'dutyTerritory'"
|
:prop="'dutyTerritory'"
|
||||||
>
|
>
|
||||||
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
@input="handleInput('dutyTerritory')"
|
class="box-input"
|
||||||
@changeQuery="handleChange"
|
optionFilterProp="label"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
mode="multiple"
|
||||||
:type="'select'"
|
@change="handleChange"
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="formInline.dutyTerritory">
|
||||||
|
<a-select-option v-for="(item, key) in dutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.itemText"
|
||||||
|
:value="item.itemValue">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
|
||||||
|
{{ item.itemText }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
|
||||||
|
<!-- @input="handleInput('dutyTerritory')"-->
|
||||||
|
<!-- @changeQuery="handleChange"-->
|
||||||
|
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
||||||
|
<!-- :type="'select'"-->
|
||||||
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -662,6 +696,7 @@
|
|||||||
personnelVisible: false,
|
personnelVisible: false,
|
||||||
yearNameDataList: [],
|
yearNameDataList: [],
|
||||||
firstLevelDutyTerritoryList: [],
|
firstLevelDutyTerritoryList: [],
|
||||||
|
dutyTerritoryList: [],
|
||||||
rules: {
|
rules: {
|
||||||
serialNumber: [
|
serialNumber: [
|
||||||
{
|
{
|
||||||
@@ -709,7 +744,7 @@
|
|||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
firstLevelDutyTerritory: [
|
dutyDepart: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
|
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
|
||||||
@@ -787,7 +822,23 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
DutyDepartChangeOne(event) {
|
||||||
|
this.formInline.dutyTerritory = []
|
||||||
|
this.formInline = {...this.formInline}
|
||||||
|
this.getDutyTerritoryOne(event.join(','))
|
||||||
|
},
|
||||||
|
getDutyTerritoryOne(row) {
|
||||||
|
let query = {
|
||||||
|
dutyDepart: row
|
||||||
|
}
|
||||||
|
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dutyTerritoryList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.dutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
addModel() {
|
addModel() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.personnelVisible = true
|
this.personnelVisible = true
|
||||||
@@ -804,14 +855,18 @@
|
|||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.personnelVisible = true
|
this.personnelVisible = true
|
||||||
value.firstLevelDutyTerritory = value.firstLevelDutyTerritory ? value.firstLevelDutyTerritory.split(',') : []
|
value.dutyDepart = value.dutyDepart ? value.dutyDepart.split(',') : []
|
||||||
|
value.dutyTerritory = value.dutyTerritory ? value.dutyTerritory.split(',') : []
|
||||||
this.formInline = JSON.parse(JSON.stringify(value))
|
this.formInline = JSON.parse(JSON.stringify(value))
|
||||||
// if (this.formInline.deliverableType) {
|
// if (this.formInline.deliverableType) {
|
||||||
// this.formInline.deliverableType = this.formInline.deliverableType.split(',')
|
// this.formInline.deliverableType = this.formInline.deliverableType.split(',')
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (value.dutyTerritory) {
|
if (value.dutyDepart && value.dutyDepart.length > 0) {
|
||||||
this.queryPersonByProject(value.dutyTerritory)
|
this.getDutyTerritoryOne(value.dutyDepart.join(','))
|
||||||
|
}
|
||||||
|
if (value.dutyTerritory && value.dutyTerritory.length > 0) {
|
||||||
|
this.queryPersonByProject(value.dutyTerritory.join(','))
|
||||||
}
|
}
|
||||||
this.getRegulationNo()
|
this.getRegulationNo()
|
||||||
this.title = this.$t('edit')
|
this.title = this.$t('edit')
|
||||||
@@ -844,6 +899,7 @@
|
|||||||
Action = postAction
|
Action = postAction
|
||||||
query.dataList.forEach(val => {
|
query.dataList.forEach(val => {
|
||||||
delete val.engineeringInterfacePersonList
|
delete val.engineeringInterfacePersonList
|
||||||
|
delete val.dutyTerritoryList
|
||||||
Object.keys(val).forEach(res => {
|
Object.keys(val).forEach(res => {
|
||||||
if (val[res] && val[res] instanceof Array) {
|
if (val[res] && val[res] instanceof Array) {
|
||||||
val[res] = val[res].join(',')
|
val[res] = val[res].join(',')
|
||||||
@@ -883,6 +939,24 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
DutyDepartChange(index) {
|
||||||
|
this.formInline.dataList[index].dutyTerritory = []
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.getDutyTerritory(this.formInline.dataList[index].dutyDepart.join(','),index)
|
||||||
|
},
|
||||||
|
getDutyTerritory(row,index) {
|
||||||
|
let query = {
|
||||||
|
dutyDepart: row
|
||||||
|
}
|
||||||
|
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.formInline.dataList[index].dutyTerritoryList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.formInline.dataList[index].dutyTerritoryList = []
|
||||||
|
}
|
||||||
|
this.formInline = {...this.formInline}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleInput(value, id, index, array) {
|
handleInput(value, id, index, array) {
|
||||||
if (array) {
|
if (array) {
|
||||||
let content = array.filter(res => {
|
let content = array.filter(res => {
|
||||||
@@ -974,12 +1048,13 @@
|
|||||||
},
|
},
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
this.formInline.sdt = undefined
|
this.formInline.sdt = undefined
|
||||||
this.queryPersonByProject(this.formInline.dutyTerritory)
|
this.queryPersonByProject(this.formInline.dutyTerritory.join(','))
|
||||||
},
|
},
|
||||||
dutyHandleChange(index) {
|
dutyHandleChange(index) {
|
||||||
this.formInline.dataList[index].sdt = undefined
|
this.formInline.dataList[index].sdt = undefined
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
this.queryPersonByProject(this.formInline.dataList[index].dutyTerritory, index)
|
this.handleInput('dataList.' + index + '.dutyTerritory')
|
||||||
|
this.queryPersonByProject(this.formInline.dataList[index].dutyTerritory.join(','), index)
|
||||||
},
|
},
|
||||||
queryPersonByProject(row, index) {
|
queryPersonByProject(row, index) {
|
||||||
let query = {
|
let query = {
|
||||||
|
|||||||
@@ -103,13 +103,15 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
|
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
optionFilterProp="label"
|
optionFilterProp="label"
|
||||||
|
@change="DutyDepartChange"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
|
:disabled="formInline.roleCodeIndex == 0 ? false : true"
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
v-model="formInline.firstLevelDutyTerritory">
|
v-model="formInline.dutyDepart">
|
||||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
:key="key"
|
:key="key"
|
||||||
:label="item.key"
|
:label="item.key"
|
||||||
@@ -130,12 +132,29 @@
|
|||||||
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
|
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
|
||||||
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
@change="dutyTerritoryChange"
|
class="box-input"
|
||||||
:disabled="formInline.roleCodeIndex == 0 ? false : true"
|
optionFilterProp="label"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
mode="multiple"
|
||||||
:type="'select'"
|
@change="dutyTerritoryChange"
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
:disabled="formInline.roleCodeIndex == 0 ? false : true"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="formInline.dutyTerritory">
|
||||||
|
<a-select-option v-for="(item, key) in dutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.itemText"
|
||||||
|
:value="item.itemValue">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
|
||||||
|
{{ item.itemText }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
|
||||||
|
<!-- @change="dutyTerritoryChange"-->
|
||||||
|
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
|
||||||
|
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
||||||
|
<!-- :type="'select'"-->
|
||||||
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -606,7 +625,7 @@
|
|||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
firstLevelDutyTerritory:[
|
dutyDepart: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
|
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
|
||||||
@@ -696,7 +715,7 @@
|
|||||||
message: this.$t('typeOfDeliverables') + this.$t('cannotEmpty'),
|
message: this.$t('typeOfDeliverables') + this.$t('cannotEmpty'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
formInline: {
|
formInline: {
|
||||||
verifyDeliverableType: [],
|
verifyDeliverableType: [],
|
||||||
@@ -719,6 +738,7 @@
|
|||||||
DeliverableTreeList: [],
|
DeliverableTreeList: [],
|
||||||
userInfoQuery: {},
|
userInfoQuery: {},
|
||||||
rejectCauseList: [],
|
rejectCauseList: [],
|
||||||
|
dutyTerritoryList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -785,6 +805,23 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
DutyDepartChange(event) {
|
||||||
|
this.formInline.dutyTerritory = []
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.getDutyTerritory(event.join(','))
|
||||||
|
},
|
||||||
|
getDutyTerritory(row) {
|
||||||
|
let query = {
|
||||||
|
dutyDepart: row
|
||||||
|
}
|
||||||
|
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dutyTerritoryList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.dutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
dutyTerritoryChange(event) {
|
dutyTerritoryChange(event) {
|
||||||
this.formInline.regulationOwnerId = undefined
|
this.formInline.regulationOwnerId = undefined
|
||||||
this.formInline.engineeringInterfacePerson = undefined
|
this.formInline.engineeringInterfacePerson = undefined
|
||||||
@@ -792,20 +829,26 @@
|
|||||||
this.formInline.designInitiatorId = undefined
|
this.formInline.designInitiatorId = undefined
|
||||||
this.formInline.prehomoInitiatorId = undefined
|
this.formInline.prehomoInitiatorId = undefined
|
||||||
this.formInline.verifyInitiatorId = undefined
|
this.formInline.verifyInitiatorId = undefined
|
||||||
this.queryPersonByProject(event)
|
this.queryPersonByProject(event.join(','))
|
||||||
},
|
},
|
||||||
|
|
||||||
queryPersonByProject(row) {
|
queryPersonByProject(row) {
|
||||||
|
let dutyTerritory = ''
|
||||||
|
if (row.dutyTerritory) {
|
||||||
|
dutyTerritory = row.dutyTerritory.join(',')
|
||||||
|
} else {
|
||||||
|
dutyTerritory = row
|
||||||
|
}
|
||||||
let query = {
|
let query = {
|
||||||
projectId: this.$route.query.id,
|
projectId: this.$route.query.id,
|
||||||
dutyTerritory: row.dutyTerritory || row
|
dutyTerritory: dutyTerritory
|
||||||
}
|
}
|
||||||
getAction(this.url.queryPersonByProject, query).then((res) => {
|
getAction(this.url.queryPersonByProject, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师
|
this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师
|
||||||
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人
|
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人
|
||||||
this.certificationEngineerList = res.result.certificationEngineerList //认证工程师
|
this.certificationEngineerList = res.result.certificationEngineerList //认证工程师
|
||||||
if (row.dutyTerritory) {
|
if (row.dutyTerritory && row.dutyTerritory.length > 0) {
|
||||||
let _this = this
|
let _this = this
|
||||||
this.getProject(row, res, function() {
|
this.getProject(row, res, function() {
|
||||||
_this.getData(row, res)
|
_this.getData(row, res)
|
||||||
@@ -865,9 +908,14 @@
|
|||||||
item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : []
|
item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : []
|
||||||
item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : []
|
item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : []
|
||||||
item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : []
|
item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : []
|
||||||
item.firstLevelDutyTerritory = item.firstLevelDutyTerritory ? item.firstLevelDutyTerritory.split(',') : []
|
item.dutyDepart = item.dutyDepart ? item.dutyDepart.split(',') : []
|
||||||
|
item.dutyTerritory = item.dutyTerritory ? item.dutyTerritory.split(',') : []
|
||||||
this.getRejectCause(item.id)
|
this.getRejectCause(item.id)
|
||||||
if (item.dutyTerritory) {
|
if (item.dutyDepart && item.dutyDepart.length > 0) {
|
||||||
|
this.getDutyTerritory(item.dutyDepart.join(','))
|
||||||
|
}
|
||||||
|
console.log(item.dutyTerritory)
|
||||||
|
if (item.dutyTerritory && item.dutyTerritory.length > 0) {
|
||||||
this.queryPersonByProject(item)
|
this.queryPersonByProject(item)
|
||||||
} else {
|
} else {
|
||||||
this.formInline = item
|
this.formInline = item
|
||||||
@@ -1145,4 +1193,8 @@
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 0 0 2px 2px;
|
border-radius: 0 0 2px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-form-item-with-help {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -49,13 +49,15 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
|
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
@change="DutyDepartChange"
|
||||||
optionFilterProp="label"
|
optionFilterProp="label"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
v-model="formInline.firstLevelDutyTerritory">
|
v-model="formInline.dutyDepart">
|
||||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
:key="key"
|
:key="key"
|
||||||
:label="item.key"
|
:label="item.key"
|
||||||
@@ -76,13 +78,28 @@
|
|||||||
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||||
<j-dict-select-tag class="box-input"
|
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
:disabled="disabled"
|
class="box-input"
|
||||||
@input="handleInput('dutyTerritory')"
|
optionFilterProp="label"
|
||||||
v-model="formInline.dutyTerritory"
|
mode="multiple"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
:type="'select'"
|
v-model="formInline.dutyTerritory">
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
<a-select-option v-for="(item, key) in dutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.itemText"
|
||||||
|
:value="item.itemValue">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
|
||||||
|
{{ item.itemText }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<!-- <j-dict-select-tag class="box-input"-->
|
||||||
|
<!-- :disabled="disabled"-->
|
||||||
|
<!-- @input="handleInput('dutyTerritory')"-->
|
||||||
|
<!-- v-model="formInline.dutyTerritory"-->
|
||||||
|
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
||||||
|
<!-- :type="'select'"-->
|
||||||
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -242,6 +259,7 @@
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
formInline: {},
|
formInline: {},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
|
dutyTerritoryList: [],
|
||||||
projectNameList: [],
|
projectNameList: [],
|
||||||
DeliverableTreeList: [],
|
DeliverableTreeList: [],
|
||||||
firstLevelDutyTerritoryList: [],
|
firstLevelDutyTerritoryList: [],
|
||||||
@@ -260,7 +278,7 @@
|
|||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
firstLevelDutyTerritory: [
|
dutyDepart: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'),
|
message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'),
|
||||||
@@ -289,6 +307,23 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
|
DutyDepartChange(event) {
|
||||||
|
this.formInline.dutyTerritory = []
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.getDutyTerritory(event.join(','))
|
||||||
|
},
|
||||||
|
getDutyTerritory(row) {
|
||||||
|
let query = {
|
||||||
|
dutyDepart: row
|
||||||
|
}
|
||||||
|
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dutyTerritoryList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.dutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getFirstLevelDutyTerritory() {
|
getFirstLevelDutyTerritory() {
|
||||||
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -322,12 +357,13 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.formInline.authDummyInventoryBaseId = this.$route.query.id
|
this.formInline.authDummyInventoryBaseId = this.$route.query.id
|
||||||
let query = JSON.parse(JSON.stringify(this.formInline))
|
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||||
query.dataList.forEach(val => {
|
Object.keys(query).forEach(res => {
|
||||||
Object.keys(val).forEach(res => {
|
if (query[res] && query[res] instanceof Array) {
|
||||||
if (val[res] && val[res] instanceof Array) {
|
if (res == 'dataList') {
|
||||||
val[res] = val[res].join(',')
|
} else {
|
||||||
|
query[res] = query[res].join(',')
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
postAction(this.url.addModel, query).then((res) => {
|
postAction(this.url.addModel, query).then((res) => {
|
||||||
@@ -509,4 +545,7 @@
|
|||||||
::v-deep .attestationType .ant-form-explain {
|
::v-deep .attestationType .ant-form-explain {
|
||||||
margin-top: -16px;
|
margin-top: -16px;
|
||||||
}
|
}
|
||||||
|
::v-deep .ant-form-item-with-help {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -49,17 +49,19 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required">*</span>
|
<span class="Required" v-if="!disabled">*</span>
|
||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
|
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
optionFilterProp="label"
|
optionFilterProp="label"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
|
:disabled="disabled"
|
||||||
|
@change="DutyDepartChange"
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
v-model="formInline.firstLevelDutyTerritory">
|
v-model="formInline.dutyDepart">
|
||||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
:key="key"
|
:key="key"
|
||||||
:label="item.key"
|
:label="item.key"
|
||||||
@@ -76,15 +78,32 @@
|
|||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="!disabled">*</span>
|
<span class="Required" v-if="!disabled">*</span>
|
||||||
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
<span class="title-text-text"
|
||||||
|
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||||
<j-dict-select-tag class="box-input"
|
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
v-model="formInline.dutyTerritory"
|
class="box-input"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
allowClear
|
||||||
:type="'select'"
|
optionFilterProp="label"
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="formInline.dutyTerritory">
|
||||||
|
<a-select-option v-for="(item, key) in dutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.itemText"
|
||||||
|
:value="item.itemValue">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
|
||||||
|
{{ item.itemText }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<!-- <j-dict-select-tag class="box-input"-->
|
||||||
|
<!-- v-model="formInline.dutyTerritory"-->
|
||||||
|
<!-- :disabled="disabled"-->
|
||||||
|
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
||||||
|
<!-- :type="'select'"-->
|
||||||
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -103,7 +122,8 @@
|
|||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="$t('PleaseSelect')+$t('certificationType')"
|
:placeholder="$t('PleaseSelect')+$t('certificationType')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
|
:triggerChange="false"
|
||||||
|
:dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -118,7 +138,7 @@
|
|||||||
v-model="formInline.category"
|
v-model="formInline.category"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:title="formInline.category"
|
:title="formInline.category"
|
||||||
:placeholder="$t('PleaseEnter')+$t('category')" />
|
:placeholder="$t('PleaseEnter')+$t('category')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -209,297 +229,332 @@
|
|||||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<codeNumber ref="codeNumber" @regulation="regulation" />
|
<codeNumber ref="codeNumber" @regulation="regulation"/>
|
||||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess" :disabled="disabled"/>
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess" :disabled="disabled"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||||
import codeNumber from './codeNumber'
|
import codeNumber from './codeNumber'
|
||||||
import uploadFile from '@/components/uploadFile/file'
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name:'editModel',
|
name: 'editModel',
|
||||||
props: ['url'],
|
props: ['url'],
|
||||||
components:{
|
components: {
|
||||||
codeNumber,
|
codeNumber,
|
||||||
uploadFile
|
uploadFile
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
visible: false,
|
visible: false,
|
||||||
button: true,
|
button: true,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
formInline: {},
|
formInline: {},
|
||||||
disabled: false,
|
disabled: false,
|
||||||
DeliverableTreeList: [],
|
DeliverableTreeList: [],
|
||||||
firstLevelDutyTerritoryList:[],
|
dutyTerritoryList: [],
|
||||||
rules: {
|
firstLevelDutyTerritoryList: [],
|
||||||
serialNumber: [
|
rules: {
|
||||||
{
|
serialNumber: [
|
||||||
required: true,
|
{
|
||||||
message: this.$t('regulationNo') + this.$t('cannotEmpty'),
|
required: true,
|
||||||
trigger: 'change'
|
message: this.$t('regulationNo') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dutyDepart: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dutyTerritory: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
wvtaId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: 'WVTA ID' + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
attestationType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('certificationType') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
category: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('category') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
inspectionItem: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('inspectionItems') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
configItem: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('configurationItem') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
max: 300,
|
||||||
|
message: this.$t('configurationItem') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
deliverable: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getDeliverableTree()
|
||||||
|
this.getFirstLevelDutyTerritory()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
DutyDepartChange(event) {
|
||||||
|
this.formInline.dutyTerritory = []
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.getDutyTerritory(event.join(','))
|
||||||
|
},
|
||||||
|
getDutyTerritory(row) {
|
||||||
|
let query = {
|
||||||
|
dutyDepart: row
|
||||||
|
}
|
||||||
|
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dutyTerritoryList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.dutyTerritoryList = []
|
||||||
}
|
}
|
||||||
],
|
})
|
||||||
firstLevelDutyTerritory: [
|
},
|
||||||
{
|
getFirstLevelDutyTerritory() {
|
||||||
required: true,
|
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||||
message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'),
|
if (res.success) {
|
||||||
trigger: 'change'
|
this.firstLevelDutyTerritoryList = res.result
|
||||||
|
} else {
|
||||||
|
this.firstLevelDutyTerritoryList = []
|
||||||
}
|
}
|
||||||
],
|
})
|
||||||
dutyTerritory: [
|
},
|
||||||
{
|
handleCancel() {
|
||||||
required: true,
|
this.visible = false
|
||||||
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
|
},
|
||||||
trigger: 'change'
|
serialNumberClick() {
|
||||||
|
this.$refs.codeNumber.add()
|
||||||
|
},
|
||||||
|
editModel(item, data) {
|
||||||
|
this.visible = true
|
||||||
|
this.title = this.$t('edit')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInline = item || {}
|
||||||
|
if (this.formInline.deliverableType) {
|
||||||
|
this.formInline.deliverableType = this.formInline.deliverableType.split(',')
|
||||||
|
} else {
|
||||||
|
this.formInline.deliverableType = []
|
||||||
}
|
}
|
||||||
],
|
if (this.formInline.dutyDepart) {
|
||||||
wvtaId: [
|
this.formInline.dutyDepart = this.formInline.dutyDepart.split(',')
|
||||||
{
|
} else {
|
||||||
required: true,
|
this.formInline.dutyDepart = []
|
||||||
message: 'WVTA ID' + this.$t('cannotEmpty'),
|
|
||||||
trigger: 'change'
|
|
||||||
}
|
}
|
||||||
],
|
if (this.formInline.dutyTerritory) {
|
||||||
attestationType: [
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
|
||||||
{
|
} else {
|
||||||
required: true,
|
this.formInline.dutyTerritory = []
|
||||||
message: this.$t('certificationType') + this.$t('cannotEmpty'),
|
|
||||||
trigger: 'change'
|
|
||||||
}
|
}
|
||||||
],
|
this.$refs.ruleForm.clearValidate()
|
||||||
category: [
|
})
|
||||||
{
|
console.log(this.formInline)
|
||||||
required: true,
|
if (data == 1) {
|
||||||
message: this.$t('category') + this.$t('cannotEmpty'),
|
this.title = this.$t('view')
|
||||||
trigger: 'change'
|
this.disabled = true
|
||||||
|
this.button = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
Object.keys(formInline).forEach(res => {
|
||||||
|
if (formInline[res] && formInline[res] instanceof Array) {
|
||||||
|
formInline[res] = formInline[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.confirmLoading = true
|
||||||
|
postAction(this.url.editModel, formInline).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visible = false
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$emit('editModelList')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
this.confirmLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
this.confirmLoading = false
|
||||||
}
|
}
|
||||||
],
|
})
|
||||||
inspectionItem: [
|
},
|
||||||
{
|
getDeliverableTree() {
|
||||||
required: true,
|
getAction('/sys/category/getCertificationDeliverableTree', {}).then((res) => {
|
||||||
message: this.$t('inspectionItems') + this.$t('cannotEmpty'),
|
if (res.success) {
|
||||||
trigger: 'change'
|
this.DeliverableTreeList = res.result
|
||||||
|
} else {
|
||||||
|
this.DeliverableTreeList = []
|
||||||
}
|
}
|
||||||
],
|
})
|
||||||
configItem: [
|
},
|
||||||
{
|
regulation(item, data) {
|
||||||
required: true,
|
this.formInline.serialNumber = item
|
||||||
message: this.$t('configurationItem') + this.$t('cannotEmpty'),
|
this.formInline.bussDocumentLibraryId = data
|
||||||
trigger: 'blur'
|
this.$nextTick(() => {
|
||||||
},
|
this.formInline = { ...this.formInline }
|
||||||
{
|
this.$refs.ruleForm.validateField(['serialNumber'])
|
||||||
max: 300,
|
})
|
||||||
message: this.$t('configurationItem') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
},
|
||||||
trigger: 'blur'
|
//交付物模板
|
||||||
|
clickButtonToUpload(item, index, isTrue) {
|
||||||
|
this.numIndex = index
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
this.$refs.uploadFile.visible = true
|
||||||
|
this.uploadName = item
|
||||||
|
let ids = ''
|
||||||
|
console.log(index)
|
||||||
|
if (isTrue) {
|
||||||
|
ids = this.formInline.dataList[index][item]
|
||||||
|
} else {
|
||||||
|
ids = this.formInline[item]
|
||||||
|
}
|
||||||
|
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||||
|
} else {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
}
|
}
|
||||||
],
|
})
|
||||||
deliverable: [
|
},
|
||||||
{
|
/** 上传文件的回调 */
|
||||||
required: true,
|
uploadSuccess(data) {
|
||||||
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
|
let attIdList = []
|
||||||
trigger: 'change'
|
if (data && data.length > 0) {
|
||||||
}
|
data.map(item => {
|
||||||
]
|
attIdList.push(item.id || data.name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 赋值给当前对应的表单文件 */
|
||||||
|
if (this.formInline.id) {
|
||||||
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
|
} else {
|
||||||
|
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
|
||||||
|
}
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getDeliverableTree()
|
|
||||||
this.getFirstLevelDutyTerritory()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getFirstLevelDutyTerritory() {
|
|
||||||
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.firstLevelDutyTerritoryList = res.result
|
|
||||||
} else {
|
|
||||||
this.firstLevelDutyTerritoryList = []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleCancel() {
|
|
||||||
this.visible = false
|
|
||||||
},
|
|
||||||
serialNumberClick(){
|
|
||||||
this.$refs.codeNumber.add()
|
|
||||||
},
|
|
||||||
editModel(item,data) {
|
|
||||||
this.visible = true
|
|
||||||
this.title = this.$t('edit')
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.formInline = item || {}
|
|
||||||
if (this.formInline.deliverableType) {
|
|
||||||
this.formInline.deliverableType = this.formInline.deliverableType.split(',')
|
|
||||||
}
|
|
||||||
if (this.formInline.firstLevelDutyTerritory) {
|
|
||||||
this.formInline.firstLevelDutyTerritory = this.formInline.firstLevelDutyTerritory.split(',')
|
|
||||||
}
|
|
||||||
this.$refs.ruleForm.clearValidate()
|
|
||||||
})
|
|
||||||
if(data == 1) {
|
|
||||||
this.title = this.$t('view')
|
|
||||||
this.disabled = true
|
|
||||||
this.button = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleSubmit() {
|
|
||||||
this.$refs.ruleForm.validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
|
||||||
Object.keys(formInline).forEach(res => {
|
|
||||||
if (formInline[res] && formInline[res] instanceof Array) {
|
|
||||||
formInline[res] = formInline[res].join(',')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.confirmLoading = true
|
|
||||||
postAction(this.url.editModel, formInline).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
|
||||||
this.visible = false
|
|
||||||
this.confirmLoading = false
|
|
||||||
this.$emit('editModelList')
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
this.confirmLoading = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
this.confirmLoading = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getDeliverableTree() {
|
|
||||||
getAction('/sys/category/getCertificationDeliverableTree', {}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.DeliverableTreeList = res.result
|
|
||||||
} else {
|
|
||||||
this.DeliverableTreeList = []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
regulation(item,data) {
|
|
||||||
this.formInline.serialNumber = item
|
|
||||||
this.formInline.bussDocumentLibraryId = data
|
|
||||||
this.$nextTick(()=>{
|
|
||||||
this.formInline = {... this.formInline}
|
|
||||||
this.$refs.ruleForm.validateField(['serialNumber'])
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//交付物模板
|
|
||||||
clickButtonToUpload(item, index,isTrue) {
|
|
||||||
this.numIndex = index
|
|
||||||
this.$refs.uploadFile.perentHandleFunc()
|
|
||||||
this.$refs.uploadFile.visible = true
|
|
||||||
this.uploadName = item
|
|
||||||
let ids = ''
|
|
||||||
console.log(index)
|
|
||||||
if (isTrue){
|
|
||||||
ids = this.formInline.dataList[index][item]
|
|
||||||
}else{
|
|
||||||
ids = this.formInline[item]
|
|
||||||
}
|
|
||||||
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
|
||||||
} else {
|
|
||||||
this.$refs.uploadFile.perentHandleFunc()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 上传文件的回调 */
|
|
||||||
uploadSuccess(data) {
|
|
||||||
let attIdList = []
|
|
||||||
if (data && data.length > 0) {
|
|
||||||
data.map(item => {
|
|
||||||
attIdList.push(item.id || data.name)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/** 赋值给当前对应的表单文件 */
|
|
||||||
if (this.formInline.id) {
|
|
||||||
this.formInline[this.uploadName] = attIdList.join(',')
|
|
||||||
} else {
|
|
||||||
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
|
|
||||||
}
|
|
||||||
this.formInline = { ...this.formInline }
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
display: flex;
|
display: flex;
|
||||||
/*align-items: center;*/
|
/*align-items: center;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
width: 114px;
|
width: 114px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
line-height: 48px;
|
line-height: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-input {
|
.box-input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemModel {
|
.itemModel {
|
||||||
width: calc(100% - 130px);
|
width: calc(100% - 130px);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Required {
|
.Required {
|
||||||
color: red;
|
color: red;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-bootom-button {
|
.drawer-bootom-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
border-top: 1px solid #e8e8e8;
|
border-top: 1px solid #e8e8e8;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
left: 0;
|
left: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 0 0 2px 2px;
|
border-radius: 0 0 2px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-text {
|
.button-text {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
width: calc(100% - 100px);
|
width: calc(100% - 100px);
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px #00B3BE solid;
|
border: 1px #00B3BE solid;
|
||||||
color: #00B3BE;
|
color: #00B3BE;
|
||||||
}
|
}
|
||||||
::v-deep .ant-input-disabled{
|
|
||||||
|
::v-deep .ant-input-disabled {
|
||||||
color: #040B29;
|
color: #040B29;
|
||||||
}
|
}
|
||||||
::v-deep .ant-select-disabled .ant-select-selection-selected-value{
|
|
||||||
color: #040B29!important;
|
::v-deep .ant-select-disabled .ant-select-selection-selected-value {
|
||||||
|
color: #040B29 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .attestationType .ant-form-explain {
|
||||||
|
margin-top: -16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-form-item-with-help {
|
||||||
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
::v-deep .attestationType .ant-form-explain{
|
|
||||||
margin-top: -16px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user