调整责任领域对接接口

This commit is contained in:
zyx.net
2022-08-05 10:40:42 +08:00
parent 8656816c27
commit 33df55a791
2 changed files with 41 additions and 115 deletions
@@ -2,7 +2,7 @@
<div class='diolag-area'>
<a-spin :spinning='spinLoading'>
<a-form-model
class='formAdd'
class='tag-module'
ref='ruleForm'
:model='form'
:rules='rules'
@@ -10,35 +10,30 @@
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">
{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input" v-model="form.dutyTerritory"
style='width: 200px'
@input="handleInput('queryzr')"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
<!-- <a-col :span='24'>-->
<!-- <span style='display: flex;justify-content: center;margin-bottom: 20px;'> <span style='margin-top: 6px;margin-right: 7px'>{{$t('cutoffTime')}}</span>-->
<!-- <a-date-picker :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="onChange" @ok="onOk" />-->
<!-- </span>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item ref='region' :label="$t('areaOfResponsibility')" prop='dutyTerritory'>
<j-dict-select-tag class="box-input" v-model="form.dutyTerritory"
@input="handleInput('dutyTerritory')"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<div class="imports-footer">
<div class="imports-footer-wrap">
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmit">{{$t('submit')}}
</a-button>
<a-button class="imports-btn" type="primary" @click="handleCancel">{{$t('cancel')}}</a-button>
</div>
</div>
</a-spin>
<div class='drawer-bootom-button'>
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
</div>
<!-- <div class='drawer-bootom-button'>-->
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
<!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>-->
<!-- </div>-->
<!-- 错误数据提示-->
<a-modal
:title="$t('operationFailed')"
@@ -125,7 +120,6 @@ export default {
}
},
mounted() {
this.loadData()
this.bodystyle = {
height: '480px',
overflow: 'hidden',
@@ -133,55 +127,17 @@ export default {
}
},
methods: {
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
}
getAction(`sys/user/page`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result.records]
this.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
handleInput(value) {
this.$nextTick(() => {
this.form = { ...this.form }
this.$refs.ruleFormOne.validateField([value])
this.$refs.ruleForm.validateField([value])
})
},
searchQuery() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisibleTaskCutOffTimeflag', false)
},
handleTableChange(val) {
this.$emit('AdjustareasofresponAll', false)
},
//保存
handleSubmit() {
// let _this = this
// let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
// this.confirmLoading = true
// postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
// if (res.success) {
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
// this.$message.success(_this.$t('OperationSuccessful'))
// this.confirmLoading = false
// } else {
// this.$message.warning(_this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
this.$refs.ruleForm.validate(valid => {
if(valid){
let long = localStorage.getItem('language')
@@ -205,62 +161,32 @@ export default {
}
this.textLoading = true
axios({
url: '/jero-boot/params/collectManifest/issueCollection',
method: 'post',
data: param,
transformRequest: [function(data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
postAction('/params/collectManifest/updateBatchDutyTerritory', param).then((res) => {
if (res.success) {
if(res.result.length == 0){
this.visibleoperationFailed = false
this.textLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('AdjustareasofresponAll', false)
this.$emit('GetgetTableList')
}else{
this.NotSelectedRowKeysValue = res.result
this.visibleoperationFailed = true
this.textLoading = false
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': _this.token
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
.then((res) => {
if (res.data.success) {
// _this.$message.success(this.$t('OperationSuccessful'))
if(res.data.result.length == 0){
this.visibleoperationFailed = false
this.textLoading = false
_this.$message.success(this.$t('OperationSuccessful'))
this.$emit('areaVisibleTaskCutOffTimeflag', false)
this.$emit('GetgetTableList')
}else{
this.NotSelectedRowKeysValue = res.data.result
this.visibleoperationFailed = true
this.textLoading = false
}
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
// this.$emit('GetgetTableList')
} else {
_this.$message.warning(this.$t('operationFailed'))
}
})
.catch((error) => {
this.textLoading = false
})
}
})
},
// 错误数据的弹框
cancleoperationFailed() {
this.visibleoperationFailed = false
this.$emit('areaVisibleTaskCutOffTimeflag', false)
this.$emit('AdjustareasofresponAll', false)
this.$emit('GetgetTableList')
// this.GetgetTableList()
},
onChange(val) {
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
},
onOk(val) {
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
},
}
}
@@ -300,10 +300,10 @@
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
</a-modal>
<!-- 调整责任领域-->
<a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='400px' :footer="null">
<a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='620px' :footer="null">
<adjustarea-sofrespon v-if='Adjustareasofrespon' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='AdjustareasofresponAll'/>
@AdjustareasofresponAll='AdjustareasofresponAll'/>
</a-modal>
<!-- 引用参数--->
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">