[add] 分配工程接口人

This commit is contained in:
zhaomeijing
2022-05-17 14:08:48 +08:00
parent 5f83cb3342
commit c58ea09f66
2 changed files with 39 additions and 11 deletions
@@ -52,9 +52,6 @@
<span v-if='record.state == "变更"'>
<span @click='ondataValueNot(record)'>{{ record.dataValue == null? '--': record.dataValue}}</span>
</span>
<span v-else>
<span @click='ondataValueNot(record)'>{{ record.dataValue == null? '--': record.dataValue}}</span>
</span>
</span>
</span>
<span slot="operation" slot-scope="record">
@@ -81,7 +78,7 @@
<a-form-model
class='tag-module'
ref='ruleForm'
:model='form'
:model='Dateline'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
@@ -89,7 +86,7 @@
<a-row :gutter='24'>
<a-col :span='12'>
<a-form-model-item ref='region' :label="$t('engineeringInterfacePerson')" prop='region'>
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')" v-model="formInline.controlType">
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')" v-model="Dateline.querySdt">
<a-select-option v-for="(item, key) in querySdtList" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -115,6 +112,9 @@
import eventBUs from '../../common/event'
import { getAction, postAction } from '@/api/manage'
import CollectionType from '@/components/CollectionType'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import axios from 'axios'
import Vue from 'vue'
export default {
name: 'index',
props: {
@@ -139,6 +139,7 @@ export default {
},
data() {
return {
token:Vue.ls.get(ACCESS_TOKEN),
jsonBody: [],
checkboxList: [],
tableAll: false,
@@ -174,6 +175,8 @@ export default {
sm: { span: 7 }
},
querySdtList: [], // 工程接口人
Dateline: {},
getquerySdtId: '', // 当前工程接口人的id
}
},
mounted() {
@@ -181,6 +184,8 @@ export default {
methods: {
// 获取工程接口人
getquerySdtList(record) {
// 当前工程接口人的id
this.getquerySdtId = record.id
getAction(this.url.getquerySdtList, {projectId: this.$route.query.id, dutyTerritory: record.dutyTerritory}).then((res) => {
if (res.success) {
this.querySdtList = res.result
@@ -189,12 +194,37 @@ export default {
},
// 工程接口人 保存
handleSubmit(record) {
this.areaVisible = false
postAction(this.url.updateSdt, {projectId: this.$route.query.id, dutyTerritory: record.dutyTerritory}).then((res) => {
if (res.success) {
this.querySdtList = res.result
let _this = this
let param = {sdt: this.Dateline.querySdt, ids: this.getquerySdtId}
axios({
url: '/jero-boot/params/collectManifest/updateSdt',
method: 'post',
data: param,
transformRequest: [function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':_this.token
}
})
.then( (res) =>{
console.log(res)
if (res.data.success) {
_this.$message.success(res.data.result)
_this.areaVisible = false
_this.getTableList()
}else{
_this.$message.warning(res.data.result)
}
})
.catch( (error) =>{
console.log(error);
});
},
// 工程接口人 取消
cancleImports() {
@@ -471,11 +471,9 @@ export default {
this.$nextTick(() => {
this.formInline = value
this.contentList = this.certCategoryParamsInfoEOListItem
console.log(this.contentList,'this.contentListthis.contentListthis.contentList')
this.contentList.map((item,index) => {
item.textVal = item.certCategory_dictText
})
console.log(this.contentList,'333333333333')
})
},
handleCancel() {