|
@@ -263,7 +263,7 @@
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="按钮类型" prop="btnType">
|
|
|
<el-select
|
|
|
v-model="btnGroupFormData.btnType"
|
|
@@ -280,79 +280,86 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <!-- 非目录 -->
|
|
|
<div v-show="btnGroupFormData.btnType != 6">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="绑定表单" prop="btnFormKey">
|
|
|
- <el-select
|
|
|
- v-model="btnGroupFormData.btnFormKey"
|
|
|
- placeholder="请选择表单"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in formOptions"
|
|
|
- :key="item.fId"
|
|
|
- :label="item.dfName"
|
|
|
- :value="item.fId"
|
|
|
+ <div
|
|
|
+ v-show="
|
|
|
+ btnGroupFormData.btnType != 3 && btnGroupFormData.btnType != 7
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="绑定表单" prop="btnFormKey">
|
|
|
+ <el-select
|
|
|
+ v-model="btnGroupFormData.btnFormKey"
|
|
|
+ placeholder="请选择表单"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="执行流程" prop="btnProcessKey">
|
|
|
- <el-select
|
|
|
- v-model="btnGroupFormData.btnProcessKey"
|
|
|
- placeholder="请选择执行流程"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in processOptions"
|
|
|
- :key="item.processKey"
|
|
|
- :label="item.processName"
|
|
|
- :value="item.processKey"
|
|
|
+ <el-option
|
|
|
+ v-for="item in formOptions"
|
|
|
+ :key="item.fId"
|
|
|
+ :label="item.dfName"
|
|
|
+ :value="item.fId"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="执行流程" prop="btnProcessKey">
|
|
|
+ <el-select
|
|
|
+ v-model="btnGroupFormData.btnProcessKey"
|
|
|
+ placeholder="请选择执行流程"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="绑定表格" prop="btnTableKey">
|
|
|
- <el-select
|
|
|
- v-model="btnGroupFormData.btnTableKey"
|
|
|
- placeholder="请选择表格"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in tableOptions"
|
|
|
- :key="item.tableKey"
|
|
|
- :label="item.dtName"
|
|
|
- :value="item.tableKey"
|
|
|
+ <el-option
|
|
|
+ v-for="item in processOptions"
|
|
|
+ :key="item.processKey"
|
|
|
+ :label="item.processName"
|
|
|
+ :value="item.processKey"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="绑定表格" prop="btnTableKey">
|
|
|
+ <el-select
|
|
|
+ v-model="btnGroupFormData.btnTableKey"
|
|
|
+ placeholder="请选择表格"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="绑定脚本" prop="btnScriptKey">
|
|
|
- <el-select
|
|
|
- v-model="btnGroupFormData.btnScriptKey"
|
|
|
- placeholder="请选择绑定节点"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in scriptOptions"
|
|
|
- :key="item.scriptKey"
|
|
|
- :label="item.scriptName"
|
|
|
- :value="item.scriptKey"
|
|
|
+ <el-option
|
|
|
+ v-for="item in tableOptions"
|
|
|
+ :key="item.tableKey"
|
|
|
+ :label="item.dtName"
|
|
|
+ :value="item.tableKey"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="绑定脚本" prop="btnScriptKey">
|
|
|
+ <el-select
|
|
|
+ v-model="btnGroupFormData.btnScriptKey"
|
|
|
+ placeholder="请选择绑定节点"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ <el-option
|
|
|
+ v-for="item in scriptOptions"
|
|
|
+ :key="item.scriptKey"
|
|
|
+ :label="item.scriptName"
|
|
|
+ :value="item.scriptKey"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </div>
|
|
|
<el-col
|
|
|
:span="24"
|
|
|
v-show="
|
|
@@ -367,112 +374,153 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- <el-col :span="24">
|
|
|
- <div class="btn-show-condition">
|
|
|
- <span class="table-title">条件编辑</span>
|
|
|
- <el-table :data="conditionBtnData" style="width: 100%">
|
|
|
- <el-table-column label="序号" type="index" width="50">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="tableName" label="表名" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-select
|
|
|
- v-model="scope.row.tableName"
|
|
|
- @change="conditionTableChange(scope.row)"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <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>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="fieldName" label="字段名" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-select
|
|
|
- v-model="scope.row.fieldName"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in scope.row.fieldList"
|
|
|
- :key="item.fieldName"
|
|
|
- :label="item.fieldDescription"
|
|
|
- :value="item.fieldName"
|
|
|
- >
|
|
|
- <span style="float: left">{{
|
|
|
- item.fieldDescription
|
|
|
- }}</span>
|
|
|
- <span
|
|
|
- style="float: right; color: #8492a6; font-size: 13px"
|
|
|
- >{{ item.fieldName }}</span
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="condition" label="条件" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-select
|
|
|
- v-model="scope.row.condition"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in conditionList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="flagValue" label="参照值" width="100">
|
|
|
+ <!-- <div class="table-wrap">
|
|
|
+ <span class="title mb10">添加query参数</span>
|
|
|
+ <el-table
|
|
|
+ :data="queryTableData"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" type="index" width="50" />
|
|
|
+ <el-table-column
|
|
|
+ v-for="col in columns"
|
|
|
+ :prop="col.prop"
|
|
|
+ :key="col.prop"
|
|
|
+ :label="col.label"
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
|
- v-model="scope.row.flagValue"
|
|
|
- @input="
|
|
|
- scope.row.flagValue = scope.row.flagValue.replace(
|
|
|
- /^(0+)|[^\d]+/g,
|
|
|
- ''
|
|
|
- )
|
|
|
- "
|
|
|
+ v-model="scope.row[col.prop]"
|
|
|
+ placeholder=""
|
|
|
+ size="normal"
|
|
|
+ clearable
|
|
|
></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="danger"
|
|
|
icon="el-icon-delete"
|
|
|
- @click="deleteConditionItem(scope.$index)"
|
|
|
+ @click="deleteQueryItem(scope.$index)"
|
|
|
>删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- class="inline-large-button mb10"
|
|
|
- icon="el-icon-plus"
|
|
|
- size="mini"
|
|
|
- style="width: 100%"
|
|
|
- @click="addConditionHandler"
|
|
|
- >
|
|
|
- 添加条件
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </el-col> -->
|
|
|
+ </div> -->
|
|
|
+ <el-col :span="24">
|
|
|
+ <!--
|
|
|
+ v-show="
|
|
|
+ btnGroupFormData.btnType != 3 && btnGroupFormData.btnType != 7
|
|
|
+ " -->
|
|
|
+ <!-- <el-form-item label="" prop="btnParams"> -->
|
|
|
+ <div class="filter-table-wrap">
|
|
|
+ <span class="title mb10"
|
|
|
+ >{{
|
|
|
+ btnGroupFormData.btnType != 3 &&
|
|
|
+ btnGroupFormData.btnType != 7
|
|
|
+ ? "公共"
|
|
|
+ : "query"
|
|
|
+ }}参数</span
|
|
|
+ >
|
|
|
+ <el-table :data="commonFieldData" style="width: 100%">
|
|
|
+ <el-table-column label="序号" type="index" width="50">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="fieldName"
|
|
|
+ label="字段名"
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.fieldName"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in rootFieldInfo.fieldList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.key"
|
|
|
+ >
|
|
|
+ <span style="float: left">{{ item.value }}</span>
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ float: right;
|
|
|
+ color: #8492a6;
|
|
|
+ font-size: 13px;
|
|
|
+ "
|
|
|
+ >{{ item.key }}</span
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="flagValue"
|
|
|
+ label="默认值"
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="">
|
|
|
+ 默认值
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="不设置默认值时,默认为当前行的该字段"
|
|
|
+ placement="top-start"
|
|
|
+ >
|
|
|
+ <i class="el-icon-info"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- <el-button
|
|
|
+ type="info"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="editFlagHandler(scope.row, scope.$index)"
|
|
|
+ >
|
|
|
+ </el-button> -->
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.fieldValue"
|
|
|
+ placeholder="请输入默认值"
|
|
|
+ size="normal"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="deleteFilterItem(scope.$index)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="inline-large-button mb10"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ style="width: 100%"
|
|
|
+ @click="addFilterHandler"
|
|
|
+ >
|
|
|
+ 添加参数
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <!-- </el-form-item> -->
|
|
|
+ </el-col>
|
|
|
+ </div>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -485,13 +533,13 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- listMenu,
|
|
|
- getMenu,
|
|
|
- delMenu,
|
|
|
- addMenu,
|
|
|
- updateMenu,
|
|
|
-} from "@/api/system/menu";
|
|
|
-import { listBtn, addBtn, getBtn, updateBtn, delBtn } from "@/api/system/btn";
|
|
|
+ listBtn,
|
|
|
+ addBtn,
|
|
|
+ getBtn,
|
|
|
+ updateBtn,
|
|
|
+ delBtn,
|
|
|
+ checkBtn,
|
|
|
+} from "@/api/system/btn";
|
|
|
import { listForm } from "@/api/dragform/form";
|
|
|
import { listProcess } from "@/api/bpmprocess/process";
|
|
|
import { listTable } from "@/api/dragform/tableList";
|
|
@@ -500,7 +548,8 @@ import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import IconSelect from "@/components/IconSelect";
|
|
|
import { v4 as uuidv4 } from "uuid";
|
|
|
-
|
|
|
+import { dragTableInfo } from "@/api/tablelist/commonTable";
|
|
|
+import { camelCase } from "@/utils";
|
|
|
export default {
|
|
|
name: "ExcuteBtnMange",
|
|
|
dicts: ["sys_show_hide", "sys_normal_disable"],
|
|
@@ -621,13 +670,109 @@ export default {
|
|
|
tableOptions: [],
|
|
|
processOptions: [],
|
|
|
scriptOptions: [],
|
|
|
+ // 普遍字段参数
|
|
|
+ commonFieldData: [
|
|
|
+ // {
|
|
|
+ // fieldName: "",
|
|
|
+ // fieldValue: "",
|
|
|
+ // },
|
|
|
+ ],
|
|
|
+ rootFieldInfo: {
|
|
|
+ tableName: "",
|
|
|
+ fieldList: [],
|
|
|
+ },
|
|
|
+ queryTableData: [
|
|
|
+ {
|
|
|
+ key: "",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ label: "参数名",
|
|
|
+ prop: "key",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "值",
|
|
|
+ prop: "value",
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
+ // created() {
|
|
|
+ // this.getList();
|
|
|
+ // this.initFormSubData();
|
|
|
+ // },
|
|
|
+ mounted() {
|
|
|
this.getList();
|
|
|
this.initFormSubData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 删除公共传参
|
|
|
+ deleteFilterItem(index) {
|
|
|
+ this.commonFieldData.splice(index, 1);
|
|
|
+ },
|
|
|
+ // 删除query参数
|
|
|
+ deleteQueryItem(index) {
|
|
|
+ this.queryTableData.splice(index, index);
|
|
|
+ },
|
|
|
+ // 添加公共传参
|
|
|
+ addFilterHandler() {
|
|
|
+ if (this.rootFieldInfo.fieldList.length == 0) {
|
|
|
+ this.$message.error("请先将按钮组绑定给表格");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.commonFieldData.push({
|
|
|
+ fieldName: "",
|
|
|
+ fieldValue: "",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取根节点绑定表格的字段数据
|
|
|
+ async getRootFieldInfo(btnKey) {
|
|
|
+ let res = await checkBtn({ btnKey });
|
|
|
+ if (res.code == 200) {
|
|
|
+ if (res.rows[0]?.tableKey) {
|
|
|
+ let tableInfo = await dragTableInfo({
|
|
|
+ queryMap: { tableKey: res.rows[0].tableKey },
|
|
|
+ });
|
|
|
+ this.rootFieldInfo.fieldList = this.columnsHandler(
|
|
|
+ JSON.parse(tableInfo.data.resultMap.template.dtColumnName)
|
|
|
+ );
|
|
|
+ console.log(this.rootFieldInfo.fieldList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 处理列表信息
|
|
|
+ columnsHandler(columns) {
|
|
|
+ let resArr = [];
|
|
|
+ columns.forEach((item) => {
|
|
|
+ for (const key in item) {
|
|
|
+ let tempObj = {};
|
|
|
+ tempObj.key = camelCase(key);
|
|
|
+ tempObj.value = item[key];
|
|
|
+ resArr.push(tempObj);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return resArr;
|
|
|
+ },
|
|
|
+ // 给所有节点设置根节点key
|
|
|
+ setRootBtnKey(rows, rootKey = "") {
|
|
|
+ if (rows.length == 0) {
|
|
|
+ return rows;
|
|
|
+ }
|
|
|
+ for (let i = 0; i < rows.length; i++) {
|
|
|
+ let row = rows[i];
|
|
|
+ if (row.btnParentId == 0) {
|
|
|
+ row.rootKey = row.btnKey;
|
|
|
+ } else {
|
|
|
+ row.rootKey = rootKey;
|
|
|
+ }
|
|
|
+ if (row.children.length != 0) {
|
|
|
+ row.children = this.setRootBtnKey(row.children, row.rootKey);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rows;
|
|
|
+ },
|
|
|
// 选择图标
|
|
|
selected(name) {
|
|
|
this.btnGroupFormData.btnIcon = name;
|
|
@@ -637,7 +782,9 @@ export default {
|
|
|
this.loading = true;
|
|
|
|
|
|
listBtn(this.queryParams).then((response) => {
|
|
|
- this.btnList = response.rows;
|
|
|
+ let res = this.setRootBtnKey(response.rows);
|
|
|
+ console.log(res);
|
|
|
+ this.btnList = res;
|
|
|
console.log("btnList", this.btnList);
|
|
|
this.loading = false;
|
|
|
});
|
|
@@ -726,21 +873,20 @@ export default {
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
- handleAdd(row) {
|
|
|
- this.title = "新增按钮";
|
|
|
+ async handleAdd(row) {
|
|
|
this.reset();
|
|
|
this.getTreeselect();
|
|
|
-
|
|
|
this.editType = row ? true : false;
|
|
|
if (row != null && row.id) {
|
|
|
//在已知节点下新增
|
|
|
+ await this.getRootFieldInfo(row.rootKey);
|
|
|
this.btnGroupFormData.btnParentId = row.id;
|
|
|
+ this.title = "新增按钮";
|
|
|
} else {
|
|
|
this.btnGroupFormData.btnParentId = 0;
|
|
|
+ this.title = "添加按钮组";
|
|
|
}
|
|
|
- console.log(this.btnGroupFormData.btnParentId);
|
|
|
this.open = true;
|
|
|
- this.title = "添加按钮组";
|
|
|
},
|
|
|
/** 展开/折叠操作 */
|
|
|
toggleExpandAll() {
|
|
@@ -751,14 +897,25 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
+ async handleUpdate(row) {
|
|
|
this.reset();
|
|
|
this.getTreeselect();
|
|
|
this.editType = false;
|
|
|
+ //在已知节点下新增
|
|
|
+ await this.getRootFieldInfo(row.rootKey);
|
|
|
getBtn(row.id).then((response) => {
|
|
|
+ let { btnType, btnParams } = response.data;
|
|
|
+ if (btnType == 3 || btnType == 7) {
|
|
|
+ //内链或外链
|
|
|
+ let tempObj = JSON.parse(btnParams);
|
|
|
+ response.data.btnParams = tempObj.url;
|
|
|
+ this.commonFieldData = JSON.parse(tempObj.commonFieldData) || [];
|
|
|
+ } else {
|
|
|
+ this.commonFieldData = JSON.parse(btnParams) || [];
|
|
|
+ }
|
|
|
this.btnGroupFormData = response.data;
|
|
|
this.open = true;
|
|
|
- this.title = "修改菜单";
|
|
|
+ this.title = "修改按钮";
|
|
|
});
|
|
|
},
|
|
|
// 校验复杂逻辑表单数据
|
|
@@ -774,15 +931,35 @@ export default {
|
|
|
}
|
|
|
return res;
|
|
|
},
|
|
|
+ // 获取公共数据
|
|
|
+ // getCommonData(list) {
|
|
|
+ // if (list.length == 0) return '';
|
|
|
+
|
|
|
+ // },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["btnGroupFormRef"].validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
- let validateRes = myValidate(this.btnGroupFormData);
|
|
|
+ let validateRes = this.myValidate(this.btnGroupFormData);
|
|
|
if (!validateRes.flag) {
|
|
|
this.$message.error(validateRes.msg);
|
|
|
return;
|
|
|
}
|
|
|
+ // 获取公共参数
|
|
|
+ // let commonData=this.getCommonData(this.commonFieldData)
|
|
|
+ if (
|
|
|
+ this.btnGroupFormData.btnType != 3 &&
|
|
|
+ this.btnGroupFormData.btnType != 7
|
|
|
+ ) {
|
|
|
+ this.btnGroupFormData.btnParams = JSON.stringify(
|
|
|
+ this.commonFieldData
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ let tempObj = {};
|
|
|
+ tempObj.url = this.btnGroupFormData.btnParams;
|
|
|
+ tempObj.commonFieldData = JSON.stringify(this.commonFieldData);
|
|
|
+ this.btnGroupFormData.btnParams = JSON.stringify(tempObj);
|
|
|
+ }
|
|
|
if (this.editType) {
|
|
|
// 新增按钮组
|
|
|
this.btnGroupFormData.btnKey = uuidv4();
|
|
@@ -857,7 +1034,9 @@ export default {
|
|
|
} else {
|
|
|
this.$message.error("网络异常请稍后再试");
|
|
|
}
|
|
|
- } catch (error) {}
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
},
|
|
|
// 添加按钮条件
|
|
|
addConditionHandler() {
|
|
@@ -879,4 +1058,19 @@ export default {
|
|
|
.submenu-title-noDropdown:hover {
|
|
|
background-color: linear-gradient(to right, blue, rgb(69, 118, 225));
|
|
|
}
|
|
|
+
|
|
|
+.filter-table-wrap {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.table-wrap {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.title {
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
</style>
|