bug修改

This commit is contained in:
caoyang
2022-03-15 13:31:12 +08:00
parent df438a70d8
commit 5092a992aa
10 changed files with 31 additions and 15 deletions
+1
View File
@@ -540,5 +540,6 @@ module.exports = {
fileUploadFailed:'file upload failed', fileUploadFailed:'file upload failed',
deletedSuccessfully:'deleted successfully', deletedSuccessfully:'deleted successfully',
uploadSuccessful:'upload successful', uploadSuccessful:'upload successful',
noDelete:'the "exhibition area" has associated data, which cannot be deleted!',
} }
+1
View File
@@ -544,5 +544,6 @@ module.exports = {
fileUploadFailed:'文件上传失败', fileUploadFailed:'文件上传失败',
deletedSuccessfully:'删除成功', deletedSuccessfully:'删除成功',
uploadSuccessful:'上传成功', uploadSuccessful:'上传成功',
noDelete:'该“展示区域”有关联数据,无法删除!',
} }
@@ -8,8 +8,8 @@
</a-radio-group> </a-radio-group>
<a-select v-else-if="tagType=='select'" :getPopupContainer = "getPopupContainer" :placeholder="placeholder" :disabled="disabled" :value="getValueSting" @change="handleInput"> <a-select v-else-if="tagType=='select'" :getPopupContainer = "getPopupContainer" :placeholder="placeholder" :disabled="disabled" :value="getValueSting" @change="handleInput">
<a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option> <!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option v-for="(item, key) in dictOptions" :key="key" :value="item.value"> <a-select-option v-for="(item, key) in dictOptionsValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.text || item.label "> <span style="display: inline-block;width: 100%" :title=" item.text || item.label ">
{{ item.text || item.label }} {{ item.text || item.label }}
</span> </span>
@@ -65,6 +65,11 @@
return this.value != null ? this.value.toString() : undefined; return this.value != null ? this.value.toString() : undefined;
// update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------ // update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
}, },
dictOptionsValue: function () {
return this.dictOptions.filter(function (dictOption) {
return dictOption.value
})
}
}, },
methods: { methods: {
initDictData() { initDictData() {
@@ -182,9 +182,10 @@
}, },
//导入按钮 //导入按钮
tableExport(){ tableExport(){
console.log('rows',this.rows)
if(this.rows&&this.rows.length>1){ if(this.rows&&this.rows.length>1){
this.$message.warning(this.$t('OnlyOneSelected')) this.$message.warning(this.$t('OnlyOneSelected'))
}else if(this.rows==undefined){ }else if(this.rows==undefined||this.rows.length===0){
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
}else if(this.rows&&this.rows.length==1){ }else if(this.rows&&this.rows.length==1){
let file=this.rows[0] let file=this.rows[0]
@@ -35,7 +35,7 @@
<!-- 属性类型--> <!-- 属性类型-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item :label="$t('AttributeType')" prop="fieldShowType" > <a-form-model-item :label="$t('AttributeType')" prop="fieldShowType" >
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type" :placeholder="$t('PleaseSelectAttributeType')" /> <j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type" :placeholder="$t('PleaseSelectAttributeType')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24" v-if="isTagContent"> <a-col :span="24" v-if="isTagContent">
@@ -243,14 +243,12 @@
this.isTagContent=true this.isTagContent=true
}else if(val==7) { }else if(val==7) {
this.isSearch=false this.isSearch=false
this.form.isQuery=0
}else{ }else{
this.isTagContent=false this.isTagContent=false
this.isSearch=true this.isSearch=true
} }
}, },
contentOption(){
}
}, },
computed: { computed: {
changeType(val){ changeType(val){
@@ -271,7 +271,11 @@
} }
this.loadData() this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')); if(res.message=='该“展示区域”有关联数据,无法删除!'){
this.$message.warning(this.$t('noDelete'))
}else{
this.$message.warning(this.$t('operationFailed'));
}
} }
}) })
} }
@@ -142,7 +142,7 @@
}, },
watch: { watch: {
parentName(value) { parentName(value) {
console.log(value); // console.log(value);
}, },
editPId(){ editPId(){
this.parentData=this.getParents this.parentData=this.getParents
@@ -50,19 +50,22 @@
tableData:Array, tableData:Array,
columns:Array, columns:Array,
total:Number, total:Number,
parm:Object parm:Object,
selectedRowKey:Array
}, },
mounted() { mounted() {
this.queryParams.pageNo=this.parm.pageNo this.queryParams.pageNo=this.parm.pageNo
this.queryParams.pageSize=this.parm.pageSize this.queryParams.pageSize=this.parm.pageSize
this.selectedRowKeys=this.selectedRowKey
// console.log('colum',this.tableData,this.columns) // console.log('colum',this.tableData,this.columns)
console.log('query',this.queryParams) // console.log('query',this.queryParams)
}, },
methods:{ methods:{
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
// console.log('selectedRowKeys changed: ', selectedRowKeys); // console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.$emit('selecteds',selectedRowKeys) this.$emit('selecteds',selectedRowKeys)
console.log('selRows',selectedRowKeys)
}, },
handleTableChange(){ handleTableChange(){
@@ -282,7 +282,7 @@
// console.log('selectedRowKeys changed: ', selectedRowKeys); // console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.ids = this.selectedRowKeys; this.ids = this.selectedRowKeys;
console.log('selRows',selectedRowKeys)
}, },
//批量删除 //批量删除
batDelete(){ batDelete(){
@@ -298,6 +298,7 @@
deleteAction(`sys/dict/logicDeleteBatch`, params).then(res => { deleteAction(`sys/dict/logicDeleteBatch`, params).then(res => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.selectedRowKeys=[]
if(this.ids.length==this.tableData.length&&this.queryParams.pageNo!=1){ if(this.ids.length==this.tableData.length&&this.queryParams.pageNo!=1){
this.queryParams.pageNo=this.queryParams.pageNo-1 this.queryParams.pageNo=this.queryParams.pageNo-1
} }
@@ -48,7 +48,7 @@
<a-spin :spinning="spinning" tip="Loading..."> <a-spin :spinning="spinning" tip="Loading...">
<a-tabs default-active-key="1" @change="callbackTab"> <a-tabs default-active-key="1" @change="callbackTab">
<a-tab-pane key="1" :tab="$t('DocumentLibrary')"> <a-tab-pane key="1" :tab="$t('DocumentLibrary')">
<tabTable v-if="spinning==false" :tableData="tableData" :columns="taglabColumns" :parm="queryParam" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" @selecteds="selecteds" :total="total"></tabTable> <tabTable v-if="spinning==false" :tableData="tableData" :columns="taglabColumns" :parm="queryParam" :selectedRowKey="selectedRowKey" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" @selecteds="selecteds" :total="total"></tabTable>
</a-tab-pane> </a-tab-pane>
<!-- <a-tab-pane key="2" :tab="$t('DocumentSplitting')" force-render>--> <!-- <a-tab-pane key="2" :tab="$t('DocumentSplitting')" force-render>-->
<!-- <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>--> <!-- <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>-->
@@ -143,7 +143,8 @@
key:1, key:1,
total:0, total:0,
type:'input', type:'input',
ids:[] ids:[],
selectedRowKey:[]
} }
}, },
mounted() { mounted() {
@@ -322,13 +323,14 @@
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`tag/onlCgformTag/deleteBatch`, params).then(res => { deleteAction(`tag/onlCgformTag/logicDeleteBatch`, params).then(res => {
if (res.success) { if (res.success) {
if (this.key == 1) { if (this.key == 1) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if(this.ids&&this.ids.length==this.tableData.length){ if(this.ids&&this.ids.length==this.tableData.length){
this.queryParam.pageNo=this.queryParam.pageNo-1 this.queryParam.pageNo=this.queryParam.pageNo-1
} }
this.selectedRowKey=[]
this.loadData(1) this.loadData(1)
} else if (this.key == 2) { } else if (this.key == 2) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))