1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<template>
<div>
<c-col :span="24">
<el-form-item :label="title || 'Disposal of Docum.'" :prop="`${grp}.blk.disdoc`">
<c-fullbox>
<c-mul-row-input
v-model.trim="model[grp].blk.disdoc"
:disabled="disabled" :rows="3" :cols="35"
:autosize="{ minRows: 4, maxRows: 4 }"
show-word-limit
:charmod="charmod"
:customModifykey="`${grp}.blk.disdoc`"
@change="customAddModify(model[grp].blk,'disdoc')"
@keyup.enter.native="showCommonDialog()"
:showTip="false"
></c-mul-row-input>
<template slot="footer">
<c-button style="margin: 0 0 0 10px; padding: 1px 1px" type="primary" size="small" :disabled="disabledButton" icon="el-icon-more" @click="showCommonDialog()"></c-button>
</template>
</c-fullbox>
</el-form-item>
</c-col>
<!-- 弹窗 -->
<el-dialog v-dialogDrag width="80%" :visible.sync="dialogTableVisible" title="文件清除文本模型" destroy-on-close v-if="dialogTableVisible">
<div v-if="!loading && tableList.length === 0">暂无数据</div>
<div v-else style="width: 100%;height: 100%;">
<el-table height="calc(100% - 32px)" :data="tableList" @row-dblclick="dbClickRow" >
<el-table-column v-for="(item,key) in tableColumn" :key="key" :prop="item.prop" :label="item.label">
</el-table-column>
</el-table>
</div>
</el-dialog>
</div>
</template>
<script>
import { getTxmBlock } from "~/service/business/common";
import commonDepend from '~/mixin/commonDepend.js'
export default {
inject: ["root"],
mixins: [commonDepend],
props: {
model: {
type: Object,
default: () => {}
},
grp: {
type: String,
grp: 'ncdgrp'
},
disabled: {
type: Boolean,
default: false
},
disabledButton: {
type: Boolean,
default: false
},
dis:{
type:Boolean,
default:false
},
title:String,
},
computed:{
charmod() {
let charmod = 0
if(this.dis){
charmod = 2
}else {
charmod = this.grp.slice(0,1) === 'g' ? 1 : 0
}
return charmod
}
},
data() {
return {
dialogTableVisible: false,
tableList: [],
loading: true,
tableColumn: [
{ prop: "extkey", label: "Text Module" },
{ prop: "nam", label: "Name" },
{ prop: "uil", label: "Languague" },
]
};
},
methods: {
showCommonDialog() {
this.dialogTableVisible = true;
this.getTableData();
},
async getTableData() {
this.loading = true;
let params = {
disdoc: "disdoc."
};
const res = await getTxmBlock(params);
if (res.respCode == SUCCESS) {
if (res.data) {
this.tableList = res.data;
console.log(this.tableList.length,"tableList.length")
}
}
this.loading = false;
},
//回填数据
dbClickRow(row) {
this.model[this.grp].blk.disdoc = row.txt;
this.dialogTableVisible = false;
this.customAddModify(this.model[this.grp].blk, 'disdoc')
}
}
};
</script>
<style scoped lang="less">
::v-deep .el-dialog__body {
height: calc(100% - 55px)
}
.el-table .cell {
white-space: pre-wrap;
}
</style>