|
|
@@ -289,7 +289,7 @@ export default {
|
|
|
default: null
|
|
|
},
|
|
|
// 选择数据后关闭窗体
|
|
|
- clickCloseFlag:{
|
|
|
+ clickCloseFlag: {
|
|
|
type: Boolean,
|
|
|
default: true,
|
|
|
},
|
|
|
@@ -300,6 +300,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
const vm = Window.vm
|
|
|
+ let self = this
|
|
|
return {
|
|
|
vm: vm,
|
|
|
colCount: 4,
|
|
|
@@ -380,12 +381,12 @@ export default {
|
|
|
//页数信息
|
|
|
pageInfo: {
|
|
|
total: 0,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: self.$config.pageSize,
|
|
|
currentPage: 1
|
|
|
},
|
|
|
documentKeyDownContent: Object,
|
|
|
children: [],//子级(已选列表),
|
|
|
- clickClearFlag:false,// 是否点击清空按钮
|
|
|
+ clickClearFlag: false,// 是否点击清空按钮
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -644,7 +645,7 @@ export default {
|
|
|
// this.inputModal = null;
|
|
|
this.isChange = false;
|
|
|
// 点击清空不进行blur
|
|
|
- if(!this.clickClearFlag){
|
|
|
+ if (!this.clickClearFlag) {
|
|
|
this.$emit('on-input-blur', e)
|
|
|
}
|
|
|
this.clickClearFlag = false;
|
|
|
@@ -667,7 +668,7 @@ export default {
|
|
|
* @date : 2022/4/8 10:38
|
|
|
*/
|
|
|
cellClick({row}) {
|
|
|
- this.inputModal = row[this.label?this.label:this.field]
|
|
|
+ this.inputModal = row[this.label ? this.label : this.field]
|
|
|
this.$emit('change', row)
|
|
|
this.$emit('onChoose', row)
|
|
|
// 关闭弹出框
|
|
|
@@ -788,13 +789,14 @@ export default {
|
|
|
this.selectedKeys = []
|
|
|
this.tabIndex = 0
|
|
|
if (this.methodsNameLeft) {
|
|
|
- this.$refs['table-select'].clearBatchKeys();
|
|
|
+ this.$refs['table-select']?.clearBatchKeys();
|
|
|
} else {
|
|
|
- this.$refs['table-select-only'].clearBatchKeys();
|
|
|
+ this.$refs['table-select-only']?.clearBatchKeys();
|
|
|
}
|
|
|
this.batchKeysPage = []
|
|
|
if (val) {
|
|
|
this.addKeyBoardEvent() // 增加快捷键
|
|
|
+ this.countTableHeight();//计算表格高度
|
|
|
// 查询数据 如果有左侧,那么就不用查询,在切换左侧列表行时查询
|
|
|
if (this.methodsNameLeft) {
|
|
|
if (!this.leftList || this.leftList.length === 0) {
|
|
|
@@ -1206,10 +1208,10 @@ export default {
|
|
|
this.selectLabel = 'staffName'
|
|
|
this.columns = [
|
|
|
{field: 'jobName', width: '150'},
|
|
|
- {field: 'staffCodeName', width: '120',title:this.$t('staff')},
|
|
|
+ {field: 'staffCodeName', width: '120', title: this.$t('staff')},
|
|
|
]
|
|
|
this.columnsDetail = [
|
|
|
- {field: 'staffCodeName', width: '120',title:this.$t('staff')},
|
|
|
+ {field: 'staffCodeName', width: '120', title: this.$t('staff')},
|
|
|
{field: 'orgName', width: '150', title: this.$t('orgId')},
|
|
|
{field: 'jobName', width: '150'},
|
|
|
{field: 'remarks', width: 'auto'},
|
|
|
@@ -1262,8 +1264,8 @@ export default {
|
|
|
this.columnsDetail = [
|
|
|
// {field: 'modelCode', width: '150'},
|
|
|
// {field: 'modelName', width: '150'},
|
|
|
- {field: 'codeName', width: '150',title:this.$t('pdtModel')},
|
|
|
- {field: 'levelName', title: this.$t('productCategory')},
|
|
|
+ {field: 'codeName', width: '150', title: this.$t('pdtModel')},
|
|
|
+ {field: 'levelName', title: this.$t('productCategory')},
|
|
|
{field: 'remarks', width: 'auto'},
|
|
|
]
|
|
|
}
|
|
|
@@ -1316,7 +1318,7 @@ export default {
|
|
|
this.columnsDetail = [
|
|
|
// {field: 'modelCode', width: '150'},
|
|
|
// {field: 'modelName', width: '150'},
|
|
|
- {field: 'codeName', width: '150' ,title:this.$t('pdtModel')},
|
|
|
+ {field: 'codeName', width: '150', title: this.$t('pdtModel')},
|
|
|
{field: 'remarks', width: 'auto'},
|
|
|
]
|
|
|
}
|
|
|
@@ -1341,13 +1343,13 @@ export default {
|
|
|
this.columns = [
|
|
|
// {field: 'defectCode', width: '120'},
|
|
|
// {field: 'defectName', width: '120'},
|
|
|
- {field: 'codeName', width: '120',title: this.$t('productDefect')},
|
|
|
+ {field: 'codeName', width: '120', title: this.$t('productDefect')},
|
|
|
{field: 'defectTypesName', width: 'auto'},
|
|
|
]
|
|
|
this.columnsDetail = [
|
|
|
// {field: 'defectCode', width: '120'},
|
|
|
// {field: 'defectName', width: '120'},
|
|
|
- {field: 'codeName', width: '120',title: this.$t('productDefect')},
|
|
|
+ {field: 'codeName', width: '120', title: this.$t('productDefect')},
|
|
|
{field: 'defectTypesName', width: '120'},
|
|
|
{field: 'remarks', width: 'auto'},
|
|
|
]
|
|
|
@@ -1373,14 +1375,14 @@ export default {
|
|
|
this.columns = [
|
|
|
{field: 'nodeName', width: 'auto'},
|
|
|
{field: 'flowName', width: '120'},
|
|
|
- {field: 'flowKindName', title:this.$t('flowKind') ,width: '120'},
|
|
|
- {field: 'nodeKindName',title:this.$t('nodeKind'), width: '120'},
|
|
|
+ {field: 'flowKindName', title: this.$t('flowKind'), width: '120'},
|
|
|
+ {field: 'nodeKindName', title: this.$t('nodeKind'), width: '120'},
|
|
|
]
|
|
|
this.columnsDetail = [
|
|
|
{field: 'nodeName', width: 'auto'},
|
|
|
{field: 'flowName', width: 'auto'},
|
|
|
- {field: 'flowKindName', title:this.$t('flowKind') ,width: 'auto'},
|
|
|
- {field: 'nodeKindName',title:this.$t('nodeKind'), width: 'auto'},
|
|
|
+ {field: 'flowKindName', title: this.$t('flowKind'), width: 'auto'},
|
|
|
+ {field: 'nodeKindName', title: this.$t('nodeKind'), width: 'auto'},
|
|
|
{field: 'remarks', width: 'auto'},
|
|
|
]
|
|
|
}
|
|
|
@@ -1659,9 +1661,11 @@ export default {
|
|
|
* @date : 2022/6/8 15:23
|
|
|
*/
|
|
|
countTableHeight() {
|
|
|
- if (!this.searchContent || this.searchContent.length === 0) {
|
|
|
- this.tableHeight = this.tableHeight + 50;
|
|
|
- }
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ let modalHeight = this.$refs.modal_search?.$refs.modal?.$refs.content?.clientHeight;
|
|
|
+ let searchHeight = this.$refs.searchCond.$el.clientHeight;
|
|
|
+ this.tableHeight = modalHeight - searchHeight - 44 - 50 - 30 - 38 - 40
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
@@ -1694,10 +1698,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.inputModal = this.text
|
|
|
- //计算表格高度
|
|
|
- this.$nextTick(() => {
|
|
|
- this.countTableHeight();
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
</script>
|