|
@@ -232,23 +232,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <!-- <el-form-item label="依赖方式">
|
|
|
- <el-select v-model="formData.relyOption" placeholder="请选择依赖方式">
|
|
|
- <el-option
|
|
|
- v-for="item in relyOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- -->
|
|
|
|
|
|
- <!-- <el-form-item label="自定义依赖值" v-show="formData.relyOption === '0'">
|
|
|
- <el-input v-model="relayValue" placeholder="请输入依赖值"></el-input>
|
|
|
- </el-form-item> -->
|
|
|
|
|
|
- <el-form-item label="依赖表">
|
|
|
+ <!-- <el-form-item label="依赖表格">
|
|
|
<el-select
|
|
|
v-model="formData.relytableName"
|
|
|
placeholder="请选择依赖表"
|
|
@@ -267,7 +253,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="依赖表字段">
|
|
|
+ <el-form-item label="依赖表格字段">
|
|
|
<el-select
|
|
|
v-model="formData.relaykey"
|
|
|
placeholder="请选择依赖字段"
|
|
@@ -279,8 +265,44 @@
|
|
|
:value="item.key"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
+ </el-form-item> -->
|
|
|
+
|
|
|
+
|
|
|
+ <el-form-item label="依赖表">
|
|
|
+ <el-select
|
|
|
+ v-model="formData.relytableName"
|
|
|
+ placeholder="请选择依赖表"
|
|
|
+ filterable
|
|
|
+ @change="getrelalist"
|
|
|
+ class="mb10"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tableList"
|
|
|
+ :key="item.tableName"
|
|
|
+ :label="item.tableComment"
|
|
|
+ :value="item.tableName"
|
|
|
+ >
|
|
|
+ <span style="float: left">{{ item.tableComment }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
+ item.tableName
|
|
|
+ }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
+ <el-form-item label="依赖表字段">
|
|
|
+ <el-select
|
|
|
+ v-model="formData.relaykey"
|
|
|
+ placeholder="请选择依赖字段"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="val in relayTableList"
|
|
|
+ :key="val.fieldName"
|
|
|
+ :label="val.fieldDescription"
|
|
|
+ :value="val.fieldName"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button size="mini" @click="previewHandle">预览</el-button>
|
|
|
<el-button size="mini" type="primary" @click="createHandle">{{
|
|
@@ -300,6 +322,7 @@
|
|
|
:subFieldList="subFiledList"
|
|
|
@subFormData="subFormDataHandler"
|
|
|
:dragTableList="dragTableList"
|
|
|
+ :tableList="tableList"
|
|
|
/>
|
|
|
</el-card>
|
|
|
</el-tab-pane>
|
|
@@ -404,7 +427,7 @@
|
|
|
<el-input v-model="countData.relayValue" placeholder="请输入依赖值"></el-input>
|
|
|
</el-form-item> -->
|
|
|
|
|
|
- <el-form-item label="依赖表">
|
|
|
+ <!-- <el-form-item label="依赖表格">
|
|
|
<el-select
|
|
|
@input="iptChange()"
|
|
|
v-model="countData.relytableName"
|
|
@@ -415,16 +438,19 @@
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in countdragTableList"
|
|
|
- :key="item.dtName"
|
|
|
- :label="item.dtName"
|
|
|
- :value="item.dtName"
|
|
|
+ :key="item.tableName"
|
|
|
+ :label="item.tableComment"
|
|
|
+ :value="item.tableName"
|
|
|
>
|
|
|
- <span style="float: left">{{ item.dtName }}</span>
|
|
|
+ <span style="float: left">{{ item.tableComment }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
+ item.tableName
|
|
|
+ }}</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="依赖表字段">
|
|
|
+ <el-form-item label="依赖表格字段">
|
|
|
<el-select
|
|
|
@input="iptChange()"
|
|
|
v-model="countData.relaykey"
|
|
@@ -437,7 +463,44 @@
|
|
|
:value="item.key"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
+
|
|
|
+ <el-form-item label="依赖表">
|
|
|
+ <el-select
|
|
|
+ v-model="countData.relytableName"
|
|
|
+ placeholder="请选择依赖表"
|
|
|
+ filterable
|
|
|
+ @change="getCountrelayList"
|
|
|
+ class="mb10"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in countRelayList"
|
|
|
+ :key="item.tableName"
|
|
|
+ :label="item.tableComment"
|
|
|
+ :value="item.tableName"
|
|
|
+ >
|
|
|
+ <span style="float: left">{{ item.tableComment }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
+ item.tableName
|
|
|
+ }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="依赖表字段">
|
|
|
+ <el-select
|
|
|
+ v-model="countData.relaykey"
|
|
|
+ placeholder="请选择依赖字段"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="val in countRelayField"
|
|
|
+ :key="val.fieldName"
|
|
|
+ :label="val.fieldDescription"
|
|
|
+ :value="val.fieldName"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
</el-form>
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -784,7 +847,7 @@ export default {
|
|
|
countdragTableList:[],
|
|
|
dragTableFilds:{},
|
|
|
// 统计子表
|
|
|
- countdragTableFilds:{},
|
|
|
+ countdragTableFilds:[],
|
|
|
// 子表tablename
|
|
|
subTableName:'',
|
|
|
subFiledList:[],
|
|
@@ -986,7 +1049,10 @@ export default {
|
|
|
// 统计状态信息回显
|
|
|
statusCount: [],
|
|
|
// 回显数据单表列表
|
|
|
- lists: []
|
|
|
+ lists: [],
|
|
|
+ relayField: [],
|
|
|
+ countrelayFieldList:[],
|
|
|
+ relaytableField:[],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -998,6 +1064,14 @@ export default {
|
|
|
countList(){
|
|
|
return this.tableList;
|
|
|
},
|
|
|
+ // 统计数据依赖表
|
|
|
+ countRelayList(){
|
|
|
+ return this.tableList;
|
|
|
+ },
|
|
|
+ // 依赖表
|
|
|
+ relayList(){
|
|
|
+ return this.tableList
|
|
|
+ },
|
|
|
infoTableList(){
|
|
|
return this.tableList;
|
|
|
},
|
|
@@ -1042,8 +1116,14 @@ export default {
|
|
|
// console.log(this.countFieldList);
|
|
|
return this.countFieldList.filter((item) => !item.isChildren);
|
|
|
},
|
|
|
+ relayTableList(){
|
|
|
+ return this.relaytableField.filter((item) => !item.isChildren);
|
|
|
+ },
|
|
|
relayKeyList(){
|
|
|
return this.relayFieldList.filter((item) => !item.isChildren);
|
|
|
+ },
|
|
|
+ countRelayField(){
|
|
|
+ return this.countrelayFieldList.filter((item) => !item.isChildren);
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -1099,6 +1179,43 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ },
|
|
|
+ // 数据统计依赖表
|
|
|
+ getCountrelayList(){
|
|
|
+ if (!this.countData.relytableName) return;
|
|
|
+ let data = {
|
|
|
+ databaseName: this.databaseName,
|
|
|
+ databaseType: this.databaseType,
|
|
|
+ tableName: this.countData.relytableName,
|
|
|
+ };
|
|
|
+ let tableComment = this.getTableCommont( this.countData.relytableName, this.tableList);
|
|
|
+ // 获取当前表单结构信息
|
|
|
+ getListName(data).then((res) => {
|
|
|
+ // console.log(res);
|
|
|
+ this.countrelayFieldList = res.map((item, index) => {
|
|
|
+ return {
|
|
|
+ id: this.countData.countName + "_" + item.fieldName,
|
|
|
+ fieldName: item.fieldName,
|
|
|
+ fieldDescription: item.fieldDescription,
|
|
|
+ relationTable: "",
|
|
|
+ relationFieldName: "",
|
|
|
+ relaFieldNameList: [],
|
|
|
+ disableRelaFieldName: false,
|
|
|
+ relationType: "",
|
|
|
+ relationShowField: [],
|
|
|
+ relationShowFiledList: [],
|
|
|
+ disableRelaType: false,
|
|
|
+ isShow: true,
|
|
|
+ isSearch: false,
|
|
|
+ isExport: true,
|
|
|
+ relationTableList: this.relationTableList,
|
|
|
+ tableName: this.countData.relytableName,
|
|
|
+ tableComment,
|
|
|
+ relationFieldList: [],
|
|
|
+ };
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
// 关联字典字段
|
|
|
async getDictType() {
|
|
@@ -1157,6 +1274,43 @@ export default {
|
|
|
// console.log(this.tableFieldList);
|
|
|
});
|
|
|
},
|
|
|
+ // 依赖表字段
|
|
|
+ getrelalist(){
|
|
|
+ if (!this.formData.relytableName) return;
|
|
|
+ let data = {
|
|
|
+ databaseName: this.databaseName,
|
|
|
+ databaseType: this.databaseType,
|
|
|
+ tableName:this.formData.relytableName,
|
|
|
+ };
|
|
|
+ let tableComment = this.getTableCommont(this.formData.relytableName, this.tableList);
|
|
|
+ // 获取当前表单结构信息
|
|
|
+ getListName(data).then((res) => {
|
|
|
+ // console.log(res);
|
|
|
+ this.relaytableField = res.map((item, index) => {
|
|
|
+ return {
|
|
|
+ id: this.formData.relytableName + "_" + item.fieldName,
|
|
|
+ fieldName: item.fieldName,
|
|
|
+ fieldDescription: item.fieldDescription,
|
|
|
+ relationTable: "",
|
|
|
+ relationFieldName: "",
|
|
|
+ relaFieldNameList: [],
|
|
|
+ disableRelaFieldName: false,
|
|
|
+ relationType: "",
|
|
|
+ relationShowField: [],
|
|
|
+ relationShowFiledList: [],
|
|
|
+ disableRelaType: false,
|
|
|
+ isShow: true,
|
|
|
+ isSearch: false,
|
|
|
+ isExport: true,
|
|
|
+ relationTableList: this.relationTableList,
|
|
|
+ tableName: this.formData.relytableName,
|
|
|
+ tableComment,
|
|
|
+ relationFieldList: [],
|
|
|
+ };
|
|
|
+ });
|
|
|
+ // console.log(this.relayField);
|
|
|
+ });
|
|
|
+ },
|
|
|
getrelyList() {
|
|
|
// console.log(this.formData.relytableName);
|
|
|
this.dragTableList.forEach(item => {
|
|
@@ -1173,15 +1327,15 @@ export default {
|
|
|
},
|
|
|
getCountrelyList(){
|
|
|
// console.log('123456');
|
|
|
- this.countdragTableList?.forEach(item => {
|
|
|
- // console.log(this.countData.relytableName);
|
|
|
- if(this.countData.relytableName == item.dtName){
|
|
|
- this.countdragTableFilds = JSON.parse(item.dtColumnName)
|
|
|
- }
|
|
|
- })
|
|
|
- if(this.countdragTableFilds) {
|
|
|
+ if(this.countdragTableList){
|
|
|
+ this.countdragTableList?.forEach(item => {
|
|
|
+ // console.log(this.countData.relytableName);
|
|
|
+ if(this.countData.relytableName == item.dtName){
|
|
|
+ this.countdragTableFilds = JSON.parse(item.dtColumnName)
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- this.countdragTableFilds.forEach(item => {
|
|
|
+ this.countdragTableFilds?.forEach(item => {
|
|
|
for(let val in item){
|
|
|
item.key = val
|
|
|
item.val = item[val]
|
|
@@ -2316,7 +2470,6 @@ export default {
|
|
|
this.tabIndex = tab.index
|
|
|
if(this.tabIndex == '2'){
|
|
|
this.getCountrelyList()
|
|
|
-
|
|
|
}
|
|
|
this.menudata = this.activeName != "menuedit" ? true : false;
|
|
|
},
|