|
@@ -191,6 +191,7 @@ import {
|
|
|
getStatisticList,
|
|
|
} from "@/api/tablelist/commonTable";
|
|
|
import { listData } from "@/api/system/tenant/data";
|
|
|
+import { getByVueKey } from "@/api/businessFlow/vuePage";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
|
|
|
import { camelCase, toUnderline } from "@/utils";
|
|
@@ -463,7 +464,7 @@ export default {
|
|
|
this.excuteBtnArr = res.data.resultMap.button?.filter(
|
|
|
(item) => item.btnGroupType == "right"
|
|
|
);
|
|
|
- // console.log('[========excuteBtnArr==============]',this.excuteBtnArr)
|
|
|
+ console.log('[========excuteBtnArr==============]',this.excuteBtnArr)
|
|
|
this.topBtnArr =
|
|
|
res.data.resultMap.button?.filter(
|
|
|
(item) => item.btnGroupType == "top"
|
|
@@ -1089,6 +1090,65 @@ export default {
|
|
|
console.log(this.times);
|
|
|
return;
|
|
|
},
|
|
|
+ // 按钮跳转方法
|
|
|
+ async handleBtnJump(row, btnData) {
|
|
|
+ // console.log("[按钮跳转]", row, btnData);
|
|
|
+ let data = {
|
|
|
+ basicMap: {
|
|
|
+ tableName: this.tableName,
|
|
|
+ // btnKey: btnData.btnKey,
|
|
|
+ btnKey: this.currentBtnData.btnKey,
|
|
|
+ },
|
|
|
+ conditionMap: {},
|
|
|
+ commMap: {},
|
|
|
+ btnParametersMap: {},
|
|
|
+ };
|
|
|
+ if (this.currentBtnData.btnParams) {
|
|
|
+ let conditionData =
|
|
|
+ JSON.parse(this.currentBtnData.btnParams).conditionData || [];
|
|
|
+ // let
|
|
|
+ let commonData =
|
|
|
+ JSON.parse(this.currentBtnData.btnParams).commonFieldData || [];
|
|
|
+
|
|
|
+ conditionData.forEach((item) => {
|
|
|
+ data.conditionMap[item.fieldName.split(".")[1]] = item.fieldValue
|
|
|
+ ? item.fieldValue
|
|
|
+ : this.currentRow[camelCase(item.fieldName.replace(".", "_"))];
|
|
|
+ });
|
|
|
+ commonData.forEach((item) => {
|
|
|
+ data.btnParametersMap[item.fieldName.split(".")[1]] =
|
|
|
+ item.fieldValue
|
|
|
+ ? item.fieldValue
|
|
|
+ : this.currentRow[
|
|
|
+ camelCase(item.fieldName.replace(".", "_"))
|
|
|
+ ];
|
|
|
+ });
|
|
|
+ }
|
|
|
+ data.basicMap.btnType = this.currentBtnData.btnType;
|
|
|
+ data.basicMap.visible = true;
|
|
|
+ // 现在 data.conditionMap 包含了与 noNeedHandler 相同的条件映射
|
|
|
+ console.log("data:", data);
|
|
|
+
|
|
|
+ // 继续处理业务逻辑
|
|
|
+ let vueKey = btnData?.btnBusinessFlowVueKey;
|
|
|
+ if (vueKey) {
|
|
|
+ getByVueKey({vueKey}).then((res) => {
|
|
|
+ if(res.code===200){
|
|
|
+ console.log("res", res)
|
|
|
+ let jumpPageData = {
|
|
|
+ vueData:res?.data,
|
|
|
+ rowData: data?.conditionMap // 使用构建好的 conditionMap
|
|
|
+ }
|
|
|
+ this.$router.push({
|
|
|
+ path: '/processMange/businessFlow/jumpPage', // 跳转路径
|
|
|
+ query: {
|
|
|
+ jumpPageData,
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 将表单组数据转换成符合单个表单的数据格式
|
|
|
transformDataFormat(data) {
|
|
|
this.FormNameList = [];
|
|
@@ -1961,8 +2021,9 @@ export default {
|
|
|
},
|
|
|
// 操作列回调
|
|
|
excuteHandler(btnData, row) {
|
|
|
- // console.log("btnData, row", btnData, row);
|
|
|
let { btnType, btnParams, btnFormType } = btnData;
|
|
|
+ console.log("[操作列回调---btnType, btnParams, btnFormType]", btnType, btnParams, btnFormType, row);
|
|
|
+
|
|
|
this.formType = btnFormType;
|
|
|
this.currentBtnData = btnData;
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row));
|
|
@@ -1971,7 +2032,8 @@ export default {
|
|
|
btnFormType == "noNeed" &&
|
|
|
btnType != "UPDATE" &&
|
|
|
btnType != "INNERLINK" &&
|
|
|
- btnType != "OUTLINK"
|
|
|
+ btnType != "OUTLINK" &&
|
|
|
+ btnType != "BUSINESSSCRIPTPAGE" // 跳转页面
|
|
|
) {
|
|
|
this.noNeedHandler(btnData, row);
|
|
|
return;
|
|
@@ -1980,7 +2042,7 @@ export default {
|
|
|
this.times = 1; //重置请求次数
|
|
|
this.formListShow = false;
|
|
|
}
|
|
|
-
|
|
|
+ console.log("[操作列回调---btnType]", btnType);
|
|
|
switch (btnType) {
|
|
|
case "INNERLINK": //内链
|
|
|
this.routerHandler(btnData, btnType);
|
|
@@ -2012,6 +2074,9 @@ export default {
|
|
|
case "CALCULATE":
|
|
|
this.handleCalculate(row, btnData);
|
|
|
break;
|
|
|
+ case "BUSINESSSCRIPTPAGE":
|
|
|
+ this.handleBtnJump(row, btnData);
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|