rxswin调取对接

This commit is contained in:
zyx.net
2023-08-29 11:20:22 +08:00
parent debf2e65fc
commit e1ce57b239
2 changed files with 41 additions and 12 deletions
@@ -78,17 +78,17 @@
</a-form> </a-form>
<div class="table-operator"> <div class="table-operator">
<!-- 提交--> <!-- 提交-->
<div class="operator-text" @click="submit" v-has="'rxswin:add'"> <div v-show="staFlag != '1'" class="operator-text" @click="submit" v-has="'rxswin:add'">
<a-icon type="check-circle"/> <a-icon type="check-circle"/>
{{$t('submit')}} {{$t('submit')}}
</div> </div>
<!-- 新增--> <!-- 新增-->
<div class="operator-text" @click="handleAdd" v-has="'rxswin:add'"> <div v-show="staFlag != '1'" class="operator-text" @click="handleAdd" v-has="'rxswin:add'">
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('newlyAdded')}} {{$t('newlyAdded')}}
</div> </div>
<!-- 模板下载--> <!-- 模板下载-->
<div @click="handleModule" v-has="'rxswin:templatedownload'" class="operator-text"> <div v-show="staFlag != '1'" @click="handleModule" v-has="'rxswin:templatedownload'" class="operator-text">
<a-icon type="download"/> <a-icon type="download"/>
{{$t('templateDownload')}} {{$t('templateDownload')}}
</div> </div>
@@ -98,20 +98,20 @@
{{$t('export')}} {{$t('export')}}
</div> </div>
<!-- 导入--> <!-- 导入-->
<div class="operator-text" <div v-show="staFlag != '1'" class="operator-text"
v-has="'rxswin:Import'"> v-has="'rxswin:Import'">
<ImportFile :url="url" :accept="'.xls'" <ImportFile :url="url" :accept="'.xls'"
@getList="getPersonnelList"/> @getList="getPersonnelList"/>
</div> </div>
<!-- 批量删除--> <!-- 批量删除-->
<div class="operator-text" <div v-show="staFlag != '1'" class="operator-text"
@click="batDeleteClick" @click="batDeleteClick"
v-has="'rxswin:batchdelete'"> v-has="'rxswin:batchdelete'">
<a-icon type="delete"/> <a-icon type="delete"/>
{{$t('BatchDelete')}} {{$t('BatchDelete')}}
</div> </div>
<!-- 调取--> <!-- 调取-->
<div @click="transferClick" <div v-show="staFlag != '1'" @click="transferClick"
v-has="'rxswin:fetch'" v-has="'rxswin:fetch'"
class="operator-text"> class="operator-text">
<a-icon type="profile"/> <a-icon type="profile"/>
@@ -133,10 +133,10 @@
:loading="loading" :loading="loading"
> >
<span slot="operation" slot-scope="record"> <span slot="operation" slot-scope="record">
<a class="text" v-has="'rxswin:edit'" @click="edit(record)"> <a class="text" v-has="'rxswin:edit'" @click="edit(record)" v-if="staFlag != '1'">
{{$t('edit')}} {{$t('edit')}}
</a> </a>
<a class="text" v-has="'rxswin:delete'" @click="del(record)"> <a class="text" v-has="'rxswin:delete'" @click="del(record)" v-if="staFlag != '1'">
{{$t('delete')}} {{$t('delete')}}
</a> </a>
</span> </span>
@@ -346,7 +346,8 @@
orderByField: '', orderByField: '',
total: 0, total: 0,
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10,
staFlag:'',
} }
}, },
computed: { computed: {
@@ -540,6 +541,9 @@
return return
} }
this.dataSource = res.result.records || [] this.dataSource = res.result.records || []
if(this.dataSource.length != 0 && this.dataSource[0].state == '1'){
this.staFlag = '1'
}
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -303,10 +303,35 @@ export default {
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
this.confirmLoading = false this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful')) // this.$message.success(this.$t('OperationSuccessful'))
this.visible = false if(res.result.flag == 'YES'){
let _this = this
this.$confirm({
content: _this.$t('AlreadyExists'),
onOk() {
geteAction('/project/projectRxswinEO/addBatch', {
ids: this.selectedRowKeys.join(','),
flag:'YES',
projectId: this.projectId,
}).then((res) => {
if (res.success) {
_this.$message.success(this.$t('OperationSuccessful'))
_this.$emit('transferListFormHomo')
} else {
_this.$message.warning(res.message)
}
})
},
onCancel() {
_this.$emit('transferListFormHomo')
}
})
}else{
this.visible = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('transferListFormHomo')
}
this.selectedRowKeys = [] this.selectedRowKeys = []
this.$emit('transferListFormHomo')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false