Browse Source

添加下载班组操作

qin_v16
herenshan112 9 months ago
parent
commit
cf73730339
  1. 413
      src/components/DesignForm/app/index.vue
  2. 57
      src/components/DesignForm/public/expand/org.vue
  3. 14
      src/components/DesignForm/public/form/form.vue
  4. 3
      src/components/DesignForm/public/form/formGroup.vue
  5. 408
      src/components/DesignForm/tableListPage/index.vue
  6. 79
      src/views/hr/teams/index.vue
  7. 13
      src/views/sysworkflow/lowcodepage/appPage/appMenus.vue
  8. 3
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/pageList.vue
  9. 3
      src/views/sysworkflow/lowcodepage/appPage/appSetUp/setup.vue

413
src/components/DesignForm/app/index.vue

@ -28,9 +28,9 @@ import {
orgDeptUnit, orgDeptUnit,
} from "@/api/DesignForm/fieldUnit"; } from "@/api/DesignForm/fieldUnit";
import type { FormInstance, FormRules } from "element-plus"; import type { FormInstance, FormRules } from "element-plus";
import { ElLoading,ElMessage,ElNotification } from 'element-plus' import { ElLoading, ElMessage, ElNotification } from "element-plus";
import html2canvas from 'html2canvas'; import html2canvas from "html2canvas";
import JSZip, { forEach } from 'jszip'; import JSZip, { forEach } from "jszip";
import { gainFormPageListCont } from "@/api/DesignForm/requestapi"; import { gainFormPageListCont } from "@/api/DesignForm/requestapi";
import { Picture, InfoFilled, QuestionFilled } from "@element-plus/icons-vue"; import { Picture, InfoFilled, QuestionFilled } from "@element-plus/icons-vue";
import request from "@/utils/request"; import request from "@/utils/request";
@ -230,11 +230,10 @@ const resetFields = (formEl: FormInstance | undefined) => {
} }
}; };
//20250117 //20250117
const qrCodesPrintDialogFlag = ref(false) const qrCodesPrintDialogFlag = ref(false);
let tableRefs = reactive({}); let tableRefs = reactive({});
const tablesData = ref({}) const tablesData = ref({});
function getDetailQrCodes(val: any) { function getDetailQrCodes(val: any) {
return request({ return request({
url: "/javasys/lowCode/QrCode/getDetailQrCodes", url: "/javasys/lowCode/QrCode/getDetailQrCodes",
@ -247,8 +246,8 @@ function getDetailQrCodes(val:any) {
}); });
} }
function modifyFieldsMap4(fieldsMap: any): Array<{ key: string, value: string }> { function modifyFieldsMap4(fieldsMap: any): Array<{ key: string; value: string }> {
let result: Array<{ key: string, value: string }> = []; let result: Array<{ key: string; value: string }> = [];
// 使 Object.entries // 使 Object.entries
for (const [key, value] of Object.entries(fieldsMap)) { for (const [key, value] of Object.entries(fieldsMap)) {
let parts = value.split("!@#@!"); let parts = value.split("!@#@!");
@ -271,7 +270,7 @@ async function downloadTables() {
isButton2Disabled.value = true; isButton2Disabled.value = true;
const loadingInstance = ElLoading.service({ const loadingInstance = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '正在生成图片,请稍候...' // text: "正在生成图片,请稍候...", //
}); });
//ElMessage('This is a message.') //ElMessage('This is a message.')
const zip = new JSZip(); const zip = new JSZip();
@ -279,9 +278,9 @@ async function downloadTables() {
for (const [tableKey, element] of Object.entries(tableRefs)) { for (const [tableKey, element] of Object.entries(tableRefs)) {
try { try {
const canvas = await html2canvas(element); const canvas = await html2canvas(element);
const dataUrl = canvas.toDataURL('image/png'); const dataUrl = canvas.toDataURL("image/png");
const byteString = atob(dataUrl.split(',')[1]); const byteString = atob(dataUrl.split(",")[1]);
const mimeString = dataUrl.split(',')[0].split(':')[1].split(';')[0]; const mimeString = dataUrl.split(",")[0].split(":")[1].split(";")[0];
const ab = new ArrayBuffer(byteString.length); const ab = new ArrayBuffer(byteString.length);
const ia = new Uint8Array(ab); const ia = new Uint8Array(ab);
@ -296,27 +295,35 @@ async function downloadTables() {
} }
} }
zip.generateAsync({ type: 'blob' }).then(function(content) { zip.generateAsync({ type: "blob" }).then(function (content) {
const now = new Date(); const now = new Date();
const formattedDate = `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, '0')}${String(now.getDate()).padStart(2, '0')}_${String(now.getHours()).padStart(2, '0')}${String(now.getMinutes()).padStart(2, '0')}${String(now.getSeconds()).padStart(2, '0')}`; const formattedDate = `${now.getFullYear()}${String(now.getMonth() + 1).padStart(
2,
"0"
)}${String(now.getDate()).padStart(2, "0")}_${String(now.getHours()).padStart(
2,
"0"
)}${String(now.getMinutes()).padStart(2, "0")}${String(now.getSeconds()).padStart(
2,
"0"
)}`;
const fileName = `${props.formBasicConfig.formName}-${formattedDate}.zip`; const fileName = `${props.formBasicConfig.formName}-${formattedDate}.zip`;
const link = document.createElement('a'); const link = document.createElement("a");
link.href = URL.createObjectURL(content); link.href = URL.createObjectURL(content);
link.download = fileName; link.download = fileName;
loadingInstance.close() loadingInstance.close();
link.click(); link.click();
tableRefs = {} tableRefs = {};
// //
isButton1Disabled.value = false; isButton1Disabled.value = false;
isButton2Disabled.value = false; isButton2Disabled.value = false;
}); });
} }
function closeQrDownload() { function closeQrDownload() {
qrCodesPrintDialogFlag.value = false qrCodesPrintDialogFlag.value = false;
tableRefs = {} tableRefs = {};
//console.log(tableRefs) //console.log(tableRefs)
} }
let asfs: any[] = []; let asfs: any[] = [];
@ -329,21 +336,26 @@ let dofs: any[] = [];//deptOrgAndOrgCententAndFounderArr
function getAsfs() { function getAsfs() {
//setTimeout(() => { //setTimeout(() => {
let dataList = ref({}); let dataList = ref({});
dataList.value = props.fieldsDetailList dataList.value = props.fieldsDetailList;
if (dataList && Array.isArray(dataList.value) && dataList.value.length > 0) { if (dataList && Array.isArray(dataList.value) && dataList.value.length > 0) {
for (let i = 0; i < dataList.value.length; i++) { for (let i = 0; i < dataList.value.length; i++) {
if (dataList.value[i].type == "associatedForms") { if (dataList.value[i].type == "associatedForms") {
asfs.push(dataList.value[i]); asfs.push(dataList.value[i]);
} else if (dataList.value[i].type == "radio") { } else if (dataList.value[i].type == "radio") {
radios.push(dataList.value[i]) radios.push(dataList.value[i]);
} else if (dataList.value[i].type == "checkbox") { } else if (dataList.value[i].type == "checkbox") {
checkboxs.push(dataList.value[i]) checkboxs.push(dataList.value[i]);
} else if (dataList.value[i].type == "switch") { } else if (dataList.value[i].type == "switch") {
switchs.push(dataList.value[i]) switchs.push(dataList.value[i]);
} else if (dataList.value[i].type == "select") { } else if (dataList.value[i].type == "select") {
selects.push(dataList.value[i]) selects.push(dataList.value[i]);
} else if(dataList.value[i].type == "deptOrg"||dataList.value[i].type == "orgCentent"||dataList.value[i].type == "founder"){//||dataList.value[i].type == "owner","expand-user" } else if (
dofs.push(dataList.value[i]) dataList.value[i].type == "deptOrg" ||
dataList.value[i].type == "orgCentent" ||
dataList.value[i].type == "founder"
) {
//||dataList.value[i].type == "owner","expand-user"
dofs.push(dataList.value[i]);
} else if ( } else if (
dataList.value[i].type == "card" || dataList.value[i].type == "card" ||
dataList.value[i].type == "flex" || dataList.value[i].type == "flex" ||
@ -358,15 +370,19 @@ function getAsfs() {
if (element.type == "associatedForms") { if (element.type == "associatedForms") {
asfs.push(element); asfs.push(element);
} else if (element.type == "radio") { } else if (element.type == "radio") {
radios.push(element) radios.push(element);
} else if (element.type == "checkbox") { } else if (element.type == "checkbox") {
checkboxs.push(element) checkboxs.push(element);
} else if (element.type == "switch") { } else if (element.type == "switch") {
switchs.push(element) switchs.push(element);
} else if (element.type == "select") { } else if (element.type == "select") {
selects.push(element) selects.push(element);
}else if(element.type == "deptOrg"||element.type == "orgCentent"||element.type == "founder"){ } else if (
dofs.push(element) element.type == "deptOrg" ||
element.type == "orgCentent" ||
element.type == "founder"
) {
dofs.push(element);
} }
}); });
} else if (dataList.value[i].type == "grid") { } else if (dataList.value[i].type == "grid") {
@ -380,15 +396,19 @@ function getAsfs() {
if (a.type == "associatedForms") { if (a.type == "associatedForms") {
asfs.push(a); asfs.push(a);
} else if (a.type == "radio") { } else if (a.type == "radio") {
radios.push(a) radios.push(a);
} else if (a.type == "checkbox") { } else if (a.type == "checkbox") {
checkboxs.push(a) checkboxs.push(a);
} else if (a.type == "switch") { } else if (a.type == "switch") {
switchs.push(a) switchs.push(a);
} else if (a.type == "select") { } else if (a.type == "select") {
selects.push(a) selects.push(a);
}else if(a.type == "deptOrg"||a.type == "orgCentent"||a.type == "founder"){ } else if (
dofs.push(a) a.type == "deptOrg" ||
a.type == "orgCentent" ||
a.type == "founder"
) {
dofs.push(a);
} }
} }
} }
@ -404,15 +424,19 @@ function getAsfs() {
if (a.type == "associatedForms") { if (a.type == "associatedForms") {
asfs.push(a); asfs.push(a);
} else if (a.type == "radio") { } else if (a.type == "radio") {
radios.push(a) radios.push(a);
} else if (a.type == "checkbox") { } else if (a.type == "checkbox") {
checkboxs.push(a) checkboxs.push(a);
} else if (a.type == "switch") { } else if (a.type == "switch") {
switchs.push(a) switchs.push(a);
} else if (a.type == "select") { } else if (a.type == "select") {
selects.push(a) selects.push(a);
}else if(a.type == "deptOrg"||a.type == "orgCentent"||a.type == "founder"){ } else if (
dofs.push(a) a.type == "deptOrg" ||
a.type == "orgCentent" ||
a.type == "founder"
) {
dofs.push(a);
} else if (a.type == "flex" || a.type == "table") { } else if (a.type == "flex" || a.type == "table") {
if (a.type == "table") { if (a.type == "table") {
tables.push(dataList.value[i]); tables.push(dataList.value[i]);
@ -425,15 +449,19 @@ function getAsfs() {
if (q.type == "associatedForms") { if (q.type == "associatedForms") {
asfs.push(q); asfs.push(q);
} else if (q.type == "radio") { } else if (q.type == "radio") {
radios.push(q) radios.push(q);
} else if (q.type == "checkbox") { } else if (q.type == "checkbox") {
checkboxs.push(q) checkboxs.push(q);
} else if (q.type == "switch") { } else if (q.type == "switch") {
switchs.push(q) switchs.push(q);
} else if (q.type == "select") { } else if (q.type == "select") {
selects.push(q) selects.push(q);
}else if(q.type == "deptOrg"||q.type == "orgCentent"||q.type == "founder"){ } else if (
dofs.push(q) q.type == "deptOrg" ||
q.type == "orgCentent" ||
q.type == "founder"
) {
dofs.push(q);
} }
} }
} }
@ -447,21 +475,20 @@ function getAsfs() {
//}, 500); //}, 500);
} }
function convertStringToArray(str: string) { function convertStringToArray(str: string) {
if (typeof str!== 'string') { if (typeof str !== "string") {
throw new Error('Input must be a string.'); throw new Error("Input must be a string.");
} }
if (str === '') { if (str === "") {
return []; return [];
} }
// //
str = str.slice(1, -1); str = str.slice(1, -1);
if (str === '') { if (str === "") {
return []; return [];
} }
let parts = str.split(','); let parts = str.split(",");
return parts.map(part => parseFloat(part)); return parts.map((part) => parseFloat(part));
} }
interface Tree { interface Tree {
id?: string; id?: string;
@ -493,12 +520,8 @@ function getLabelById(id: string): string | undefined {
return findLabel(treeNodes); return findLabel(treeNodes);
} }
//liwenxuan 20250120 end //liwenxuan 20250120 end
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-04-01 11:36:07 @ 时间: 2024-04-01 11:36:07
@ -511,35 +534,40 @@ const setUpClick = (val: string, id: string) => {
drawerWith.value = container.value?.clientWidth; drawerWith.value = container.value?.clientWidth;
openTaskDrawer.value = true; openTaskDrawer.value = true;
} else if (val.key == "showQrCode") { } else if (val.key == "showQrCode") {
//liwenxuan 20250114 start //liwenxuan 20250114 start
//, //,
let idArray = state.selectionChecked.map(item => item.id); let idArray = state.selectionChecked.map((item) => item.id);
if (idArray.length > 0) { if (idArray.length > 0) {
//console.log(props.formBasicConfig) //console.log(props.formBasicConfig)
if (props.formBasicConfig.qrCodeFlag == true) { if (props.formBasicConfig.qrCodeFlag == true) {
if (props.formBasicConfig.qrCodeInside == true) { if (props.formBasicConfig.qrCodeInside == true) {
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"&&props.formBasicConfig.qrCodeShowFields.length==0){ if (
alert("未配置表格展示字段") props.formBasicConfig.qrCodePrintStyle &&
return props.formBasicConfig.qrCodePrintStyle == "2" &&
props.formBasicConfig.qrCodeShowFields.length == 0
) {
alert("未配置表格展示字段");
return;
} }
const loadingInstance1 = ElLoading.service({ const loadingInstance1 = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '正在生成二维码,请稍候...' // text: "正在生成二维码,请稍候...", //
}); });
// //
let getDetailQrCodesData: any = {} let getDetailQrCodesData: any = {};
let currentFieldsMapArrObj: any = {} let currentFieldsMapArrObj: any = {};
getDetailQrCodes(idArray).then(({ data }) => { getDetailQrCodes(idArray)
.then(({ data }) => {
getDetailQrCodesData = JSON.parse(JSON.stringify(data)); getDetailQrCodesData = JSON.parse(JSON.stringify(data));
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){ if (
props.formBasicConfig.qrCodePrintStyle &&
props.formBasicConfig.qrCodePrintStyle == "2"
) {
let asfQueryParams1: any[] = []; let asfQueryParams1: any[] = [];
for (let key in getDetailQrCodesData) { for (let key in getDetailQrCodesData) {
currentFieldsMapArrObj[key] = getDetailQrCodesData[key] currentFieldsMapArrObj[key] = getDetailQrCodesData[key];
if (getDetailQrCodesData.hasOwnProperty(key)) { if (getDetailQrCodesData.hasOwnProperty(key)) {
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap let currentFieldsMap = getDetailQrCodesData[key].fieldsMap;
//console.log(currentFieldsMap) //console.log(currentFieldsMap)
// //
for (let attr_name in currentFieldsMap) { for (let attr_name in currentFieldsMap) {
@ -549,32 +577,48 @@ const setUpClick = (val: string, id: string) => {
radios.forEach(function (element) { radios.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
let optionsHasCurrentValue = false "!@#@!"
)[1];
let optionsHasCurrentValue = false;
element.options.forEach((element1: any) => { element.options.forEach((element1: any) => {
if (toConvertValue == element1.value) { if (toConvertValue == element1.value) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label currentFieldsMap[attr_name] =
optionsHasCurrentValue = true currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
element1.label;
optionsHasCurrentValue = true;
} }
}); });
if (optionsHasCurrentValue == false) { if (optionsHasCurrentValue == false) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"" currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
"";
} }
} }
}); });
selects.forEach(function (element) { selects.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
let optionsHasCurrentValue = false "!@#@!"
)[1];
let optionsHasCurrentValue = false;
element.options.forEach((element1: any) => { element.options.forEach((element1: any) => {
if (toConvertValue == element1.value) { if (toConvertValue == element1.value) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label currentFieldsMap[attr_name] =
optionsHasCurrentValue = true currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
element1.label;
optionsHasCurrentValue = true;
} }
}); });
if (optionsHasCurrentValue == false) { if (optionsHasCurrentValue == false) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"" currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
"";
} }
} }
}); });
@ -582,45 +626,65 @@ const setUpClick = (val: string, id: string) => {
dofs.forEach(function (element) { dofs.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
let orgName = getLabelById(toConvertValue) "!@#@!"
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+orgName )[1];
let orgName = getLabelById(toConvertValue);
currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
orgName;
} }
}); });
switchs.forEach(function (element) { switchs.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
"!@#@!"
)[1];
if (toConvertValue == "0") { if (toConvertValue == "0") {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用" currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
"禁用";
} else { } else {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用" currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
"启用";
} }
} }
}); });
checkboxs.forEach(function (element) { checkboxs.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
"!@#@!"
)[1];
let toConvertArr = convertStringToArray(toConvertValue); let toConvertArr = convertStringToArray(toConvertValue);
let toAddStr = "" let toAddStr = "";
if (toConvertArr.length > 0) { if (toConvertArr.length > 0) {
toConvertArr.forEach((element1: any) => { toConvertArr.forEach((element1: any) => {
element.options.forEach((element2: any) => { element.options.forEach((element2: any) => {
if (element1 == element2.value) { if (element1 == element2.value) {
toAddStr = toAddStr+element2.label+"," toAddStr = toAddStr + element2.label + ",";
} }
}); });
}); });
toAddStr = toAddStr.slice(0, -1) toAddStr = toAddStr.slice(0, -1);
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+toAddStr currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
toAddStr;
} }
} }
}); });
asfs.forEach(function (element) { asfs.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
"!@#@!"
)[1];
if (toConvertValue.length > 0) { if (toConvertValue.length > 0) {
//console.log(element) //console.log(element)
let fieldCount = 0; //>0field let fieldCount = 0; //>0field
@ -628,7 +692,7 @@ const setUpClick = (val: string, id: string) => {
//field asfQueryParamsItem1,fieldasfQueryParamsItem1.asfToSelectIds1asfMasterAndAsfId1 //field asfQueryParamsItem1,fieldasfQueryParamsItem1.asfToSelectIds1asfMasterAndAsfId1
// pushasfQueryParamsItem1 // pushasfQueryParamsItem1
if (item1.field == element.name) { if (item1.field == element.name) {
fieldCount++ fieldCount++;
} }
}); });
if (fieldCount > 0) { if (fieldCount > 0) {
@ -639,7 +703,7 @@ const setUpClick = (val: string, id: string) => {
let asfMasterAndAsfId1: any = {}; let asfMasterAndAsfId1: any = {};
asfMasterAndAsfId1.asfId = toConvertValue + ""; asfMasterAndAsfId1.asfId = toConvertValue + "";
asfMasterAndAsfId1.asfMasterId = key + ""; asfMasterAndAsfId1.asfMasterId = key + "";
item1.asfToSelectIds.push(asfMasterAndAsfId1) item1.asfToSelectIds.push(asfMasterAndAsfId1);
} }
}); });
} else { } else {
@ -652,17 +716,19 @@ const setUpClick = (val: string, id: string) => {
let asfMasterAndAsfId1: any = {}; let asfMasterAndAsfId1: any = {};
asfMasterAndAsfId1.asfId = toConvertValue + ""; asfMasterAndAsfId1.asfId = toConvertValue + "";
asfMasterAndAsfId1.asfMasterId = key + ""; asfMasterAndAsfId1.asfMasterId = key + "";
asfToSelectIds1.push(asfMasterAndAsfId1) asfToSelectIds1.push(asfMasterAndAsfId1);
asfQueryParams1.push(asfQueryParamsItem1) asfQueryParams1.push(asfQueryParamsItem1);
} }
} }
} }
}) });
} }
} }
setTimeout(() => { setTimeout(() => {
getDetailQrCodesData[key].fieldsMap = modifyFieldsMap4(currentFieldsMap) getDetailQrCodesData[key].fieldsMap = modifyFieldsMap4(
},800) currentFieldsMap
);
}, 800);
} }
} }
@ -670,55 +736,52 @@ const setUpClick = (val: string, id: string) => {
let getAsfDataTitlesByIdsData = JSON.parse(JSON.stringify(data)); let getAsfDataTitlesByIdsData = JSON.parse(JSON.stringify(data));
for (let key in currentFieldsMapArrObj) { for (let key in currentFieldsMapArrObj) {
if (getDetailQrCodesData.hasOwnProperty(key)) { if (getDetailQrCodesData.hasOwnProperty(key)) {
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap let currentFieldsMap = getDetailQrCodesData[key].fieldsMap;
getAsfDataTitlesByIdsData.forEach((element1: any) => { getAsfDataTitlesByIdsData.forEach((element1: any) => {
element1.list.forEach((element2: any) => { element1.list.forEach((element2: any) => {
if (key == element2.asfMasterId) { if (key == element2.asfMasterId) {
currentFieldsMap[element1.field] = currentFieldsMap[element1.field].split("!@#@!")[0]+"!@#@!"+element2.label currentFieldsMap[element1.field] =
currentFieldsMap[element1.field].split("!@#@!")[0] +
"!@#@!" +
element2.label;
} }
}) });
}) });
} }
} }
}) });
setTimeout(() => { setTimeout(() => {
tablesData.value = getDetailQrCodesData tablesData.value = getDetailQrCodesData;
},810) }, 810);
setTimeout(() => { setTimeout(() => {
loadingInstance1.close() loadingInstance1.close();
qrCodesPrintDialogFlag.value = true qrCodesPrintDialogFlag.value = true;
},820) }, 820);
} else if (
}else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){ props.formBasicConfig.qrCodePrintStyle &&
props.formBasicConfig.qrCodePrintStyle == "1"
) {
//fieldsMap = null //fieldsMap = null
tablesData.value = getDetailQrCodesData tablesData.value = getDetailQrCodesData;
qrCodesPrintDialogFlag.value = true qrCodesPrintDialogFlag.value = true;
loadingInstance1.close() loadingInstance1.close();
} }
}).finally(()=>{
loadingInstance1.close()
}) })
.finally(() => {
loadingInstance1.close();
});
} else { } else {
alert("内部二维码功能未启用") alert("内部二维码功能未启用");
} }
} else { } else {
alert("请先为本表单开启二维码功能") alert("请先为本表单开启二维码功能");
} }
} else { } else {
alert("未选中任何一条,请先选择") alert("未选中任何一条,请先选择");
} }
//liwenxuan 20250114 end //liwenxuan 20250114 end
} else { } else {
if (idList.value.length > 0) { if (idList.value.length > 0) {
ElMessageBox.confirm("确认删除此数据项?删除后不可恢复!", "警告", { ElMessageBox.confirm("确认删除此数据项?删除后不可恢复!", "警告", {
@ -957,7 +1020,7 @@ const getPageData = () => {
selects = []; selects = [];
tables = []; tables = [];
dofs = []; dofs = [];
getAsfs() getAsfs();
}); });
} }
}; };
@ -1014,7 +1077,7 @@ const asfGetPageData = (asfFormId: any, asfToSelectMastersKey: any) => {
for (let i = 0; i < data.data.list.length; i++) { for (let i = 0; i < data.data.list.length; i++) {
let asfMasterAndAsfId: any = {}; let asfMasterAndAsfId: any = {};
//asfMasterAndAsfId.asfId = data.data.list[i][asfDetails[j].field]; //asfMasterAndAsfId.asfId = data.data.list[i][asfDetails[j].field];
asfMasterAndAsfId.asfId = data.data.list[i].id asfMasterAndAsfId.asfId = data.data.list[i].id;
asfMasterAndAsfId.asfMasterId = data.data.list[i].id; asfMasterAndAsfId.asfMasterId = data.data.list[i].id;
asfToSelectIds.push(asfMasterAndAsfId); asfToSelectIds.push(asfMasterAndAsfId);
@ -1068,8 +1131,7 @@ const asfGetPageData = (asfFormId: any, asfToSelectMastersKey: any) => {
tablePageClass.value = 4; tablePageClass.value = 4;
drawerWith.value = container.value?.clientWidth; drawerWith.value = container.value?.clientWidth;
asflookPageInfoIsShow.value = true; asflookPageInfoIsShow.value = true;
},500) }, 500);
}); });
}; };
@ -1122,7 +1184,7 @@ onMounted(() => {
nextTick(() => { nextTick(() => {
drawerWith.value = container.value?.clientWidth; drawerWith.value = container.value?.clientWidth;
}); });
getAsfs() getAsfs();
}); });
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ -1510,13 +1572,13 @@ const transformOption = (val: string | number, type?: string) => {
:placeholder="'请选择' + item.label" :placeholder="'请选择' + item.label"
value-format="x" value-format="x"
/> />
<el-select <DeptOrgSearch
v-model="item.value" v-model="item.value"
clearable clearable
:placeholder="'请选择' + item.label" :placeholder="'请选择' + item.label"
v-if="unitIsShow(item, 'org')" v-if="unitIsShow(item, 'org')"
> >
</el-select> </DeptOrgSearch>
<DeptOrgSearch <DeptOrgSearch
v-if="unitIsShow(item, 'deptOrg')" v-if="unitIsShow(item, 'deptOrg')"
v-model:model-value="item.value" v-model:model-value="item.value"
@ -2010,18 +2072,30 @@ const transformOption = (val: string | number, type?: string) => {
style="margin-top: 10px" style="margin-top: 10px"
width="40%" width="40%"
> >
<div v-if="formBasicConfig.qrCodePrintStyle == '2'" style="max-width: 600px;min-height: 50px; max-height: 750px; overflow-y: auto"> <div
v-if="formBasicConfig.qrCodePrintStyle == '2'"
style="max-width: 600px; min-height: 50px; max-height: 750px; overflow-y: auto"
>
<div <div
v-for="(tableData, tableKey) in tablesData" v-for="(tableData, tableKey) in tablesData"
:id="tableKey" :id="tableKey"
:key="tableKey" :key="tableKey"
:ref="(el: any) => { if (el) tableRefs[tableKey] = el }" :ref="(el: any) => { if (el) tableRefs[tableKey] = el }"
style="margin-bottom: 30px; width: 95%;" style="margin-bottom: 30px; width: 95%"
> >
<table> <table>
<tr> <tr>
<th colspan="2">{{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}</th> <th colspan="2">
<td rowspan="6" style="width: 240px;"><img :src="tableData.bufferedImage" alt="二维码" width="200px" style="margin-top: 5px;" ></td> {{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}
</th>
<td rowspan="6" style="width: 240px">
<img
:src="tableData.bufferedImage"
alt="二维码"
width="200px"
style="margin-top: 5px"
/>
</td>
</tr> </tr>
<tr v-for="(item, fIndex) in tableData.fieldsMap" :key="fIndex"> <tr v-for="(item, fIndex) in tableData.fieldsMap" :key="fIndex">
<th>{{ item.key }}</th> <th>{{ item.key }}</th>
@ -2030,20 +2104,41 @@ const transformOption = (val: string | number, type?: string) => {
</table> </table>
</div> </div>
</div> </div>
<div v-if="formBasicConfig.qrCodePrintStyle == '1'" style="display: flex; flex-direction: column; align-items: center; min-height: 50px; max-height: 750px; overflow-y: auto"> <div
v-if="formBasicConfig.qrCodePrintStyle == '1'"
style="
display: flex;
flex-direction: column;
align-items: center;
min-height: 50px;
max-height: 750px;
overflow-y: auto;
"
>
<div <div
v-for="(tableData, tableKey) in tablesData" v-for="(tableData, tableKey) in tablesData"
:id="tableKey" :id="tableKey"
:key="tableKey" :key="tableKey"
:ref="(el: any) => { if (el) tableRefs[tableKey] = el }" :ref="(el: any) => { if (el) tableRefs[tableKey] = el }"
style="margin-bottom: 30px; width: 400px;" style="margin-bottom: 30px; width: 400px"
> >
<table> <table>
<tr> <tr>
<th style="font-weight: bold; font-size:medium;" colspan="1">{{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}-{{ tablesData[tableKey].dataTitle }}</th> <th style="font-weight: bold; font-size: medium" colspan="1">
{{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}-{{
tablesData[tableKey].dataTitle
}}
</th>
</tr> </tr>
<tr> <tr>
<th ><img :src="tableData.bufferedImage" alt="二维码" width="auto" height="100%"></th> <th>
<img
:src="tableData.bufferedImage"
alt="二维码"
width="auto"
height="100%"
/>
</th>
</tr> </tr>
</table> </table>
</div> </div>
@ -2051,8 +2146,19 @@ const transformOption = (val: string | number, type?: string) => {
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :disabled="isButton1Disabled" type="primary" plain @click="downloadTables">下载</el-button> <el-button
<el-button :disabled="isButton2Disabled" type="primary" plain @click="closeQrDownload"> :disabled="isButton1Disabled"
type="primary"
plain
@click="downloadTables"
>下载</el-button
>
<el-button
:disabled="isButton2Disabled"
type="primary"
plain
@click="closeQrDownload"
>
确定 确定
</el-button> </el-button>
</div> </div>
@ -2134,10 +2240,11 @@ table {
border-collapse: collapse; border-collapse: collapse;
width: 100%; width: 100%;
font-size: 13px; font-size: 13px;
text-align: center text-align: center;
} }
td, th { td,
th {
border: 1px solid black; border: 1px solid black;
padding: 8px; padding: 8px;
vertical-align: middle; /* 设置文字上下居中 */ vertical-align: middle; /* 设置文字上下居中 */

57
src/components/DesignForm/public/expand/org.vue

@ -3,31 +3,30 @@
@ 时间: 2024-09-12 10:03:22 @ 时间: 2024-09-12 10:03:22
@ 备注: 行政组织选择 @ 备注: 行政组织选择
--> -->
<script lang='ts' setup> <script lang="ts" setup>
import { orgInfo } from '@/api/hr/org/type' import { orgInfo } from "@/api/hr/org/type";
import { getOrgTreeList } from '@/api/hr/org/index' import { getOrgTreeList } from "@/api/hr/org/index";
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
modelValue?: string modelValue?: string;
disabled?: boolean disabled?: boolean;
}>(), }>(),
{} {}
) );
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'update:modelValue', value: string): void (e: "update:modelValue", value: string): void;
}>() }>();
const value = computed({ const value = computed({
get: () => { get: () => {
if (props.modelValue != "" && props.modelValue != undefined) { if (props.modelValue != "" && props.modelValue != undefined) {
return props.modelValue*1 return props.modelValue * 1;
} else { } else {
return props.modelValue return props.modelValue;
} }
}, },
set: (newVal: any) => { set: (newVal: any) => {
emits('update:modelValue', newVal) emits("update:modelValue", newVal);
// let newValJson:criteriaForPeopleList[] = JSON.parse(newVal) // let newValJson:criteriaForPeopleList[] = JSON.parse(newVal)
// if(newValJson.length > 0){ // if(newValJson.length > 0){
// let userAry = new Array // let userAry = new Array
@ -47,31 +46,32 @@ const value = computed({
const orgTreeList = ref<orgInfo[]>(); const orgTreeList = ref<orgInfo[]>();
const orgTreeLoading = ref(false); // const orgTreeLoading = ref(false); //
const orgTreeProps = { const orgTreeProps = {
children: 'child', children: "child",
label: 'name', label: "name",
} // }; //
function haveOrgTreeInfo() { function haveOrgTreeInfo() {
orgTreeLoading.value = true; orgTreeLoading.value = true;
getOrgTreeList({"orgid": 309}) getOrgTreeList({ orgid: 309 })
.then(({ data }) => { .then(({ data }) => {
orgTreeList.value = data console.log("行政组织树对照值", data);
}).finally(()=>{orgTreeLoading.value = false;}) orgTreeList.value = data;
})
.finally(() => {
orgTreeLoading.value = false;
});
} }
onBeforeMount(() => { onBeforeMount(() => {
haveOrgTreeInfo(); haveOrgTreeInfo();
}) });
onMounted(() => { onMounted(() => {
// console.log("value---1--",value.value,props.modelValue) // console.log("value---1--",value.value,props.modelValue)
nextTick(() => {}) nextTick(() => {
}) haveOrgTreeInfo();
});
});
</script> </script>
<template> <template>
<el-tree-select <el-tree-select
@ -84,7 +84,6 @@ onMounted(() => {
check-strictly check-strictly
:render-after-expand="false" :render-after-expand="false"
/> />
<div></div>
</template> </template>
<style lang='scss' scoped> <style lang="scss" scoped></style>
</style>

14
src/components/DesignForm/public/form/form.vue

@ -486,13 +486,13 @@ watch(
// tProp // tProp
provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) => { provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) => {
/* console.log("----------1--------->",key) // console.log("----------1--------->", key);
console.log("表单组件值改变事件----------2--------->",value) // console.log("----------2--------->", value);
console.log("表单组件值改变事件----------3--------->",data) // console.log("----------3--------->", data);
console.log("表单组件值改变事件----------4--------->",tProp) // console.log("----------4--------->", tProp);
console.log("表单组件值改变事件----------5--------->",type) // console.log("----------5--------->", type);
console.log("表单组件值改变事件----------6--------->",attribute) // console.log("----------6--------->", attribute);
console.log("表单组件值改变事件----------11--------->",model.value) */ // console.log("----------11--------->", model.value);
let fieldVal = {}; let fieldVal = {};
for (let i in model.value) { for (let i in model.value) {
if (i == key) { if (i == key) {

3
src/components/DesignForm/public/form/formGroup.vue

@ -265,13 +265,14 @@ const groupClick = (item: any, ele?: string) => {
inputStyle: {}, inputStyle: {},
}; };
} }
// console.log("--->",getGroupName(item))
store.setActiveKey(getGroupName(item)); store.setActiveKey(getGroupName(item));
store.setControlAttr(item); store.setControlAttr(item);
// grid // grid
state.gridAdd = item.type === "grid"; state.gridAdd = item.type === "grid";
// state.clone = !notNested(item.type) // state.clone = !notNested(item.type)
state.clone = !notNestedTableFlex(item.type); state.clone = !notNestedTableFlex(item.type);
console.log("点击激活当前--->", store);
}; };
// //
const getFormItemStyle = (ele: FormList) => { const getFormItemStyle = (ele: FormList) => {

408
src/components/DesignForm/tableListPage/index.vue

@ -31,9 +31,9 @@ import type { FormInstance, FormRules } from "element-plus";
import { gainFormPageListCont } from "@/api/DesignForm/requestapi"; import { gainFormPageListCont } from "@/api/DesignForm/requestapi";
import { Picture, InfoFilled, QuestionFilled } from "@element-plus/icons-vue"; import { Picture, InfoFilled, QuestionFilled } from "@element-plus/icons-vue";
import request from "@/utils/request"; import request from "@/utils/request";
import html2canvas from 'html2canvas'; import html2canvas from "html2canvas";
import JSZip, { forEach } from 'jszip'; import JSZip, { forEach } from "jszip";
import { ElLoading,ElMessage,ElNotification } from 'element-plus' import { ElLoading, ElMessage, ElNotification } from "element-plus";
import { softDeletion, retractRunWorkFlow } from "@/api/taskapi/management"; import { softDeletion, retractRunWorkFlow } from "@/api/taskapi/management";
import { formatNumber } from "@/api/DesignForm/utils"; import { formatNumber } from "@/api/DesignForm/utils";
@ -225,9 +225,9 @@ const resetFields = (formEl: FormInstance | undefined) => {
}; };
//20250117 //20250117
const qrCodesPrintDialogFlag = ref(false) const qrCodesPrintDialogFlag = ref(false);
let tableRefs = reactive({}); let tableRefs = reactive({});
const tablesData = ref({}) const tablesData = ref({});
function getDetailQrCodes(val: any) { function getDetailQrCodes(val: any) {
return request({ return request({
url: "/javasys/lowCode/QrCode/getDetailQrCodes", url: "/javasys/lowCode/QrCode/getDetailQrCodes",
@ -240,8 +240,8 @@ function getDetailQrCodes(val:any) {
}); });
} }
function modifyFieldsMap4(fieldsMap: any): Array<{ key: string, value: string }> { function modifyFieldsMap4(fieldsMap: any): Array<{ key: string; value: string }> {
let result: Array<{ key: string, value: string }> = []; let result: Array<{ key: string; value: string }> = [];
// 使 Object.entries // 使 Object.entries
for (const [key, value] of Object.entries(fieldsMap)) { for (const [key, value] of Object.entries(fieldsMap)) {
let parts = value.split("!@#@!"); let parts = value.split("!@#@!");
@ -264,7 +264,7 @@ async function downloadTables() {
isButton2Disabled.value = true; isButton2Disabled.value = true;
const loadingInstance = ElLoading.service({ const loadingInstance = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '正在生成图片,请稍候...' // text: "正在生成图片,请稍候...", //
}); });
//ElMessage('This is a message.') //ElMessage('This is a message.')
const zip = new JSZip(); const zip = new JSZip();
@ -272,9 +272,9 @@ async function downloadTables() {
for (const [tableKey, element] of Object.entries(tableRefs)) { for (const [tableKey, element] of Object.entries(tableRefs)) {
try { try {
const canvas = await html2canvas(element); const canvas = await html2canvas(element);
const dataUrl = canvas.toDataURL('image/png'); const dataUrl = canvas.toDataURL("image/png");
const byteString = atob(dataUrl.split(',')[1]); const byteString = atob(dataUrl.split(",")[1]);
const mimeString = dataUrl.split(',')[0].split(':')[1].split(';')[0]; const mimeString = dataUrl.split(",")[0].split(":")[1].split(";")[0];
const ab = new ArrayBuffer(byteString.length); const ab = new ArrayBuffer(byteString.length);
const ia = new Uint8Array(ab); const ia = new Uint8Array(ab);
@ -289,27 +289,35 @@ async function downloadTables() {
} }
} }
zip.generateAsync({ type: 'blob' }).then(function(content) { zip.generateAsync({ type: "blob" }).then(function (content) {
const now = new Date(); const now = new Date();
const formattedDate = `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, '0')}${String(now.getDate()).padStart(2, '0')}_${String(now.getHours()).padStart(2, '0')}${String(now.getMinutes()).padStart(2, '0')}${String(now.getSeconds()).padStart(2, '0')}`; const formattedDate = `${now.getFullYear()}${String(now.getMonth() + 1).padStart(
2,
"0"
)}${String(now.getDate()).padStart(2, "0")}_${String(now.getHours()).padStart(
2,
"0"
)}${String(now.getMinutes()).padStart(2, "0")}${String(now.getSeconds()).padStart(
2,
"0"
)}`;
const fileName = `${props.formBasicConfig.formName}-${formattedDate}.zip`; const fileName = `${props.formBasicConfig.formName}-${formattedDate}.zip`;
const link = document.createElement('a'); const link = document.createElement("a");
link.href = URL.createObjectURL(content); link.href = URL.createObjectURL(content);
link.download = fileName; link.download = fileName;
loadingInstance.close() loadingInstance.close();
link.click(); link.click();
tableRefs = {} tableRefs = {};
// //
isButton1Disabled.value = false; isButton1Disabled.value = false;
isButton2Disabled.value = false; isButton2Disabled.value = false;
}); });
} }
function closeQrDownload() { function closeQrDownload() {
qrCodesPrintDialogFlag.value = false qrCodesPrintDialogFlag.value = false;
tableRefs = {} tableRefs = {};
//console.log(tableRefs) //console.log(tableRefs)
} }
let asfs: any[] = []; let asfs: any[] = [];
@ -323,21 +331,26 @@ let dofs: any[] = [];//deptOrgAndOrgCententAndFounderArr
function getAsfs() { function getAsfs() {
//setTimeout(() => { //setTimeout(() => {
let dataList = ref({}); let dataList = ref({});
dataList.value = props.fieldsDetailList dataList.value = props.fieldsDetailList;
if (dataList && Array.isArray(dataList.value) && dataList.value.length > 0) { if (dataList && Array.isArray(dataList.value) && dataList.value.length > 0) {
for (let i = 0; i < dataList.value.length; i++) { for (let i = 0; i < dataList.value.length; i++) {
if (dataList.value[i].type == "associatedForms") { if (dataList.value[i].type == "associatedForms") {
asfs.push(dataList.value[i]); asfs.push(dataList.value[i]);
} else if (dataList.value[i].type == "radio") { } else if (dataList.value[i].type == "radio") {
radios.push(dataList.value[i]) radios.push(dataList.value[i]);
} else if (dataList.value[i].type == "checkbox") { } else if (dataList.value[i].type == "checkbox") {
checkboxs.push(dataList.value[i]) checkboxs.push(dataList.value[i]);
} else if (dataList.value[i].type == "switch") { } else if (dataList.value[i].type == "switch") {
switchs.push(dataList.value[i]) switchs.push(dataList.value[i]);
} else if (dataList.value[i].type == "select") { } else if (dataList.value[i].type == "select") {
selects.push(dataList.value[i]) selects.push(dataList.value[i]);
} else if(dataList.value[i].type == "deptOrg"||dataList.value[i].type == "orgCentent"||dataList.value[i].type == "founder"){//||dataList.value[i].type == "owner","expand-user" } else if (
dofs.push(dataList.value[i]) dataList.value[i].type == "deptOrg" ||
dataList.value[i].type == "orgCentent" ||
dataList.value[i].type == "founder"
) {
//||dataList.value[i].type == "owner","expand-user"
dofs.push(dataList.value[i]);
} else if ( } else if (
dataList.value[i].type == "card" || dataList.value[i].type == "card" ||
dataList.value[i].type == "flex" || dataList.value[i].type == "flex" ||
@ -352,15 +365,19 @@ function getAsfs() {
if (element.type == "associatedForms") { if (element.type == "associatedForms") {
asfs.push(element); asfs.push(element);
} else if (element.type == "radio") { } else if (element.type == "radio") {
radios.push(element) radios.push(element);
} else if (element.type == "checkbox") { } else if (element.type == "checkbox") {
checkboxs.push(element) checkboxs.push(element);
} else if (element.type == "switch") { } else if (element.type == "switch") {
switchs.push(element) switchs.push(element);
} else if (element.type == "select") { } else if (element.type == "select") {
selects.push(element) selects.push(element);
}else if(element.type == "deptOrg"||element.type == "orgCentent"||element.type == "founder"){ } else if (
dofs.push(element) element.type == "deptOrg" ||
element.type == "orgCentent" ||
element.type == "founder"
) {
dofs.push(element);
} }
}); });
} else if (dataList.value[i].type == "grid") { } else if (dataList.value[i].type == "grid") {
@ -374,15 +391,19 @@ function getAsfs() {
if (a.type == "associatedForms") { if (a.type == "associatedForms") {
asfs.push(a); asfs.push(a);
} else if (a.type == "radio") { } else if (a.type == "radio") {
radios.push(a) radios.push(a);
} else if (a.type == "checkbox") { } else if (a.type == "checkbox") {
checkboxs.push(a) checkboxs.push(a);
} else if (a.type == "switch") { } else if (a.type == "switch") {
switchs.push(a) switchs.push(a);
} else if (a.type == "select") { } else if (a.type == "select") {
selects.push(a) selects.push(a);
}else if(a.type == "deptOrg"||a.type == "orgCentent"||a.type == "founder"){ } else if (
dofs.push(a) a.type == "deptOrg" ||
a.type == "orgCentent" ||
a.type == "founder"
) {
dofs.push(a);
} }
} }
} }
@ -398,15 +419,19 @@ function getAsfs() {
if (a.type == "associatedForms") { if (a.type == "associatedForms") {
asfs.push(a); asfs.push(a);
} else if (a.type == "radio") { } else if (a.type == "radio") {
radios.push(a) radios.push(a);
} else if (a.type == "checkbox") { } else if (a.type == "checkbox") {
checkboxs.push(a) checkboxs.push(a);
} else if (a.type == "switch") { } else if (a.type == "switch") {
switchs.push(a) switchs.push(a);
} else if (a.type == "select") { } else if (a.type == "select") {
selects.push(a) selects.push(a);
}else if(a.type == "deptOrg"||a.type == "orgCentent"||a.type == "founder"){ } else if (
dofs.push(a) a.type == "deptOrg" ||
a.type == "orgCentent" ||
a.type == "founder"
) {
dofs.push(a);
} else if (a.type == "flex" || a.type == "table") { } else if (a.type == "flex" || a.type == "table") {
if (a.type == "table") { if (a.type == "table") {
tables.push(dataList.value[i]); tables.push(dataList.value[i]);
@ -419,15 +444,19 @@ function getAsfs() {
if (q.type == "associatedForms") { if (q.type == "associatedForms") {
asfs.push(q); asfs.push(q);
} else if (q.type == "radio") { } else if (q.type == "radio") {
radios.push(q) radios.push(q);
} else if (q.type == "checkbox") { } else if (q.type == "checkbox") {
checkboxs.push(q) checkboxs.push(q);
} else if (q.type == "switch") { } else if (q.type == "switch") {
switchs.push(q) switchs.push(q);
} else if (q.type == "select") { } else if (q.type == "select") {
selects.push(q) selects.push(q);
}else if(q.type == "deptOrg"||q.type == "orgCentent"||q.type == "founder"){ } else if (
dofs.push(q) q.type == "deptOrg" ||
q.type == "orgCentent" ||
q.type == "founder"
) {
dofs.push(q);
} }
} }
} }
@ -442,19 +471,19 @@ function getAsfs() {
} }
function convertStringToArray(str: string) { function convertStringToArray(str: string) {
if (typeof str!== 'string') { if (typeof str !== "string") {
throw new Error('Input must be a string.'); throw new Error("Input must be a string.");
} }
if (str === '') { if (str === "") {
return []; return [];
} }
// //
str = str.slice(1, -1); str = str.slice(1, -1);
if (str === '') { if (str === "") {
return []; return [];
} }
let parts = str.split(','); let parts = str.split(",");
return parts.map(part => parseFloat(part)); return parts.map((part) => parseFloat(part));
} }
interface Tree { interface Tree {
@ -499,8 +528,6 @@ function isAllCharactersNumbers(str: string) {
//liwenxuan 20250120 end //liwenxuan 20250120 end
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-04-01 11:36:07 @ 时间: 2024-04-01 11:36:07
@ -514,33 +541,40 @@ const setUpClick = (val: string, id: string) => {
} else if (val.key == "showQrCode") { } else if (val.key == "showQrCode") {
//liwenxuan 20250114 start //liwenxuan 20250114 start
//, //,
let idArray = state.selectionChecked.map(item => item.id); let idArray = state.selectionChecked.map((item) => item.id);
if (idArray.length > 0) { if (idArray.length > 0) {
//console.log(props.formBasicConfig) //console.log(props.formBasicConfig)
if (props.formBasicConfig.qrCodeFlag == true) { if (props.formBasicConfig.qrCodeFlag == true) {
if (props.formBasicConfig.qrCodeInside == true) { if (props.formBasicConfig.qrCodeInside == true) {
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"&&props.formBasicConfig.qrCodeShowFields.length==0){ if (
alert("未配置表格展示字段") props.formBasicConfig.qrCodePrintStyle &&
return props.formBasicConfig.qrCodePrintStyle == "2" &&
props.formBasicConfig.qrCodeShowFields.length == 0
) {
alert("未配置表格展示字段");
return;
} }
const loadingInstance1 = ElLoading.service({ const loadingInstance1 = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '正在生成二维码,请稍候...' // text: "正在生成二维码,请稍候...", //
}); });
// //
let getDetailQrCodesData: any = {} let getDetailQrCodesData: any = {};
let currentFieldsMapArrObj: any = {} let currentFieldsMapArrObj: any = {};
getDetailQrCodes(idArray).then(({ data }) => { getDetailQrCodes(idArray)
.then(({ data }) => {
getDetailQrCodesData = JSON.parse(JSON.stringify(data)); getDetailQrCodesData = JSON.parse(JSON.stringify(data));
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){ if (
props.formBasicConfig.qrCodePrintStyle &&
props.formBasicConfig.qrCodePrintStyle == "2"
) {
let asfQueryParams1: any[] = []; let asfQueryParams1: any[] = [];
for (let key in getDetailQrCodesData) { for (let key in getDetailQrCodesData) {
currentFieldsMapArrObj[key] = getDetailQrCodesData[key] currentFieldsMapArrObj[key] = getDetailQrCodesData[key];
if (getDetailQrCodesData.hasOwnProperty(key)) { if (getDetailQrCodesData.hasOwnProperty(key)) {
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap let currentFieldsMap = getDetailQrCodesData[key].fieldsMap;
//console.log(currentFieldsMap) //console.log(currentFieldsMap)
// //
for (let attr_name in currentFieldsMap) { for (let attr_name in currentFieldsMap) {
@ -550,32 +584,48 @@ const setUpClick = (val: string, id: string) => {
radios.forEach(function (element) { radios.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
let optionsHasCurrentValue = false "!@#@!"
)[1];
let optionsHasCurrentValue = false;
element.options.forEach((element1: any) => { element.options.forEach((element1: any) => {
if (toConvertValue == element1.value) { if (toConvertValue == element1.value) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label currentFieldsMap[attr_name] =
optionsHasCurrentValue = true currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
element1.label;
optionsHasCurrentValue = true;
} }
}); });
if (optionsHasCurrentValue == false) { if (optionsHasCurrentValue == false) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"" currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
"";
} }
} }
}); });
selects.forEach(function (element) { selects.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
let optionsHasCurrentValue = false "!@#@!"
)[1];
let optionsHasCurrentValue = false;
element.options.forEach((element1: any) => { element.options.forEach((element1: any) => {
if (toConvertValue == element1.value) { if (toConvertValue == element1.value) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label currentFieldsMap[attr_name] =
optionsHasCurrentValue = true currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
element1.label;
optionsHasCurrentValue = true;
} }
}); });
if (optionsHasCurrentValue == false) { if (optionsHasCurrentValue == false) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"" currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
"";
} }
} }
}); });
@ -583,50 +633,68 @@ const setUpClick = (val: string, id: string) => {
dofs.forEach(function (element) { dofs.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
"!@#@!"
)[1];
//console.log(toConvertValue) //console.log(toConvertValue)
if (isAllCharactersNumbers(toConvertValue)) { if (isAllCharactersNumbers(toConvertValue)) {
let orgName = getLabelById(toConvertValue) let orgName = getLabelById(toConvertValue);
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+orgName currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
orgName;
} }
} }
}); });
switchs.forEach(function (element) { switchs.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
"!@#@!"
)[1];
if (toConvertValue == "0") { if (toConvertValue == "0") {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用" currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
"禁用";
} else { } else {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用" currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
"启用";
} }
} }
}); });
checkboxs.forEach(function (element) { checkboxs.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
"!@#@!"
)[1];
let toConvertArr = convertStringToArray(toConvertValue); let toConvertArr = convertStringToArray(toConvertValue);
let toAddStr = "" let toAddStr = "";
if (toConvertArr.length > 0) { if (toConvertArr.length > 0) {
toConvertArr.forEach((element1: any) => { toConvertArr.forEach((element1: any) => {
element.options.forEach((element2: any) => { element.options.forEach((element2: any) => {
if (element1 == element2.value) { if (element1 == element2.value) {
toAddStr = toAddStr+element2.label+"," toAddStr = toAddStr + element2.label + ",";
} }
}); });
}); });
toAddStr = toAddStr.slice(0, -1) toAddStr = toAddStr.slice(0, -1);
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+toAddStr currentFieldsMap[attr_name] =
currentFieldsMap[attr_name].split("!@#@!")[0] +
"!@#@!" +
toAddStr;
} }
} }
}); });
asfs.forEach(function (element) { asfs.forEach(function (element) {
if (attr_name == element.name) { if (attr_name == element.name) {
//,valueoptions //,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] let toConvertValue = currentFieldsMap[attr_name].split(
"!@#@!"
)[1];
if (toConvertValue.length > 0) { if (toConvertValue.length > 0) {
//console.log(element) //console.log(element)
let fieldCount = 0; //>0field let fieldCount = 0; //>0field
@ -634,7 +702,7 @@ const setUpClick = (val: string, id: string) => {
//field asfQueryParamsItem1,fieldasfQueryParamsItem1.asfToSelectIds1asfMasterAndAsfId1 //field asfQueryParamsItem1,fieldasfQueryParamsItem1.asfToSelectIds1asfMasterAndAsfId1
// pushasfQueryParamsItem1 // pushasfQueryParamsItem1
if (item1.field == element.name) { if (item1.field == element.name) {
fieldCount++ fieldCount++;
} }
}); });
if (fieldCount > 0) { if (fieldCount > 0) {
@ -645,7 +713,7 @@ const setUpClick = (val: string, id: string) => {
let asfMasterAndAsfId1: any = {}; let asfMasterAndAsfId1: any = {};
asfMasterAndAsfId1.asfId = toConvertValue + ""; asfMasterAndAsfId1.asfId = toConvertValue + "";
asfMasterAndAsfId1.asfMasterId = key + ""; asfMasterAndAsfId1.asfMasterId = key + "";
item1.asfToSelectIds.push(asfMasterAndAsfId1) item1.asfToSelectIds.push(asfMasterAndAsfId1);
} }
}); });
} else { } else {
@ -658,17 +726,19 @@ const setUpClick = (val: string, id: string) => {
let asfMasterAndAsfId1: any = {}; let asfMasterAndAsfId1: any = {};
asfMasterAndAsfId1.asfId = toConvertValue + ""; asfMasterAndAsfId1.asfId = toConvertValue + "";
asfMasterAndAsfId1.asfMasterId = key + ""; asfMasterAndAsfId1.asfMasterId = key + "";
asfToSelectIds1.push(asfMasterAndAsfId1) asfToSelectIds1.push(asfMasterAndAsfId1);
asfQueryParams1.push(asfQueryParamsItem1) asfQueryParams1.push(asfQueryParamsItem1);
} }
} }
} }
}) });
} }
} }
setTimeout(() => { setTimeout(() => {
getDetailQrCodesData[key].fieldsMap = modifyFieldsMap4(currentFieldsMap) getDetailQrCodesData[key].fieldsMap = modifyFieldsMap4(
},800) currentFieldsMap
);
}, 800);
} }
} }
@ -676,54 +746,52 @@ const setUpClick = (val: string, id: string) => {
let getAsfDataTitlesByIdsData = JSON.parse(JSON.stringify(data)); let getAsfDataTitlesByIdsData = JSON.parse(JSON.stringify(data));
for (let key in currentFieldsMapArrObj) { for (let key in currentFieldsMapArrObj) {
if (getDetailQrCodesData.hasOwnProperty(key)) { if (getDetailQrCodesData.hasOwnProperty(key)) {
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap let currentFieldsMap = getDetailQrCodesData[key].fieldsMap;
getAsfDataTitlesByIdsData.forEach((element1: any) => { getAsfDataTitlesByIdsData.forEach((element1: any) => {
element1.list.forEach((element2: any) => { element1.list.forEach((element2: any) => {
if (key == element2.asfMasterId) { if (key == element2.asfMasterId) {
currentFieldsMap[element1.field] = currentFieldsMap[element1.field].split("!@#@!")[0]+"!@#@!"+element2.label currentFieldsMap[element1.field] =
currentFieldsMap[element1.field].split("!@#@!")[0] +
"!@#@!" +
element2.label;
} }
}) });
}) });
} }
} }
}) });
setTimeout(() => { setTimeout(() => {
tablesData.value = getDetailQrCodesData tablesData.value = getDetailQrCodesData;
},810) }, 810);
setTimeout(() => { setTimeout(() => {
loadingInstance1.close() loadingInstance1.close();
qrCodesPrintDialogFlag.value = true qrCodesPrintDialogFlag.value = true;
},820) }, 820);
} else if (
}else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){ props.formBasicConfig.qrCodePrintStyle &&
props.formBasicConfig.qrCodePrintStyle == "1"
) {
//fieldsMap = null //fieldsMap = null
tablesData.value = getDetailQrCodesData tablesData.value = getDetailQrCodesData;
qrCodesPrintDialogFlag.value = true qrCodesPrintDialogFlag.value = true;
loadingInstance1.close() loadingInstance1.close();
} }
}).finally(()=>{
loadingInstance1.close()
}) })
.finally(() => {
loadingInstance1.close();
});
} else { } else {
alert("内部二维码功能未启用") alert("内部二维码功能未启用");
} }
} else { } else {
alert("请先为本表单开启二维码功能") alert("请先为本表单开启二维码功能");
} }
} else { } else {
alert("未选中任何一条,请先选择") alert("未选中任何一条,请先选择");
} }
//liwenxuan 20250114 end //liwenxuan 20250114 end
} else { } else {
if (idList.value.length > 0) { if (idList.value.length > 0) {
ElMessageBox.confirm("确认删除此数据项?删除后不可恢复!", "警告", { ElMessageBox.confirm("确认删除此数据项?删除后不可恢复!", "警告", {
@ -953,7 +1021,7 @@ const getPageData = () => {
switchs = []; switchs = [];
selects = []; selects = [];
tables = []; tables = [];
getAsfs() getAsfs();
}); });
} }
}; };
@ -1010,7 +1078,7 @@ const asfGetPageData = (asfFormId: any, asfToSelectMastersKey: any) => {
for (let i = 0; i < data.data.list.length; i++) { for (let i = 0; i < data.data.list.length; i++) {
let asfMasterAndAsfId: any = {}; let asfMasterAndAsfId: any = {};
//asfMasterAndAsfId.asfId = data.data.list[i][asfDetails[j].field]; //asfMasterAndAsfId.asfId = data.data.list[i][asfDetails[j].field];
asfMasterAndAsfId.asfId = data.data.list[i].id asfMasterAndAsfId.asfId = data.data.list[i].id;
asfMasterAndAsfId.asfMasterId = data.data.list[i].id; asfMasterAndAsfId.asfMasterId = data.data.list[i].id;
asfToSelectIds.push(asfMasterAndAsfId); asfToSelectIds.push(asfMasterAndAsfId);
@ -1065,8 +1133,7 @@ const asfGetPageData = (asfFormId: any, asfToSelectMastersKey: any) => {
drawerWith.value = container.value?.clientWidth; drawerWith.value = container.value?.clientWidth;
asflookPageInfoIsShow.value = true; asflookPageInfoIsShow.value = true;
//}); //});
},500) }, 500);
}); });
}; };
@ -1075,7 +1142,7 @@ onMounted(() => {
nextTick(() => { nextTick(() => {
drawerWith.value = container.value?.clientWidth; drawerWith.value = container.value?.clientWidth;
}); });
getAsfs() getAsfs();
}); });
//liwenxuan start //liwenxuan start
function getAsfDataTitlesByIds(asfQueryParams: any[]) { function getAsfDataTitlesByIds(asfQueryParams: any[]) {
@ -1505,13 +1572,13 @@ const diGuiJilian = (val: any, options: any[]) => {
:placeholder="'请选择' + item.label" :placeholder="'请选择' + item.label"
value-format="x" value-format="x"
/> />
<el-select <DeptOrgSearch
v-model="item.value" v-model="item.value"
clearable clearable
:placeholder="'请选择' + item.label" :placeholder="'请选择' + item.label"
v-if="unitIsShow(item, 'org')" v-if="unitIsShow(item, 'org')"
> >
</el-select> </DeptOrgSearch>
<DeptOrgSearch <DeptOrgSearch
v-if="unitIsShow(item, 'deptOrg')" v-if="unitIsShow(item, 'deptOrg')"
v-model:model-value="item.value" v-model:model-value="item.value"
@ -2038,18 +2105,30 @@ const diGuiJilian = (val: any, options: any[]) => {
style="margin-top: 10px" style="margin-top: 10px"
width="40%" width="40%"
> >
<div v-if="formBasicConfig.qrCodePrintStyle == '2'" style="max-width: 600px;min-height: 50px; max-height: 750px; overflow-y: auto"> <div
v-if="formBasicConfig.qrCodePrintStyle == '2'"
style="max-width: 600px; min-height: 50px; max-height: 750px; overflow-y: auto"
>
<div <div
v-for="(tableData, tableKey) in tablesData" v-for="(tableData, tableKey) in tablesData"
:id="tableKey" :id="tableKey"
:key="tableKey" :key="tableKey"
:ref="(el: any) => { if (el) tableRefs[tableKey] = el }" :ref="(el: any) => { if (el) tableRefs[tableKey] = el }"
style="margin-bottom: 30px; width: 95%;" style="margin-bottom: 30px; width: 95%"
> >
<table> <table>
<tr> <tr>
<th colspan="2">{{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}</th> <th colspan="2">
<td rowspan="6" style="width: 240px;"><img :src="tableData.bufferedImage" alt="二维码" width="200px" style="margin-top: 5px;" ></td> {{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}
</th>
<td rowspan="6" style="width: 240px">
<img
:src="tableData.bufferedImage"
alt="二维码"
width="200px"
style="margin-top: 5px"
/>
</td>
</tr> </tr>
<tr v-for="(item, fIndex) in tableData.fieldsMap" :key="fIndex"> <tr v-for="(item, fIndex) in tableData.fieldsMap" :key="fIndex">
<th>{{ item.key }}</th> <th>{{ item.key }}</th>
@ -2058,20 +2137,41 @@ const diGuiJilian = (val: any, options: any[]) => {
</table> </table>
</div> </div>
</div> </div>
<div v-if="formBasicConfig.qrCodePrintStyle == '1'" style="display: flex; flex-direction: column; align-items: center; min-height: 50px; max-height: 750px; overflow-y: auto"> <div
v-if="formBasicConfig.qrCodePrintStyle == '1'"
style="
display: flex;
flex-direction: column;
align-items: center;
min-height: 50px;
max-height: 750px;
overflow-y: auto;
"
>
<div <div
v-for="(tableData, tableKey) in tablesData" v-for="(tableData, tableKey) in tablesData"
:id="tableKey" :id="tableKey"
:key="tableKey" :key="tableKey"
:ref="(el: any) => { if (el) tableRefs[tableKey] = el }" :ref="(el: any) => { if (el) tableRefs[tableKey] = el }"
style="margin-bottom: 30px; width: 400px;" style="margin-bottom: 30px; width: 400px"
> >
<table> <table>
<tr> <tr>
<th style="font-weight: bold; font-size:medium;" colspan="1">{{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}-{{ tablesData[tableKey].dataTitle }}</th> <th style="font-weight: bold; font-size: medium" colspan="1">
{{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}-{{
tablesData[tableKey].dataTitle
}}
</th>
</tr> </tr>
<tr> <tr>
<th ><img :src="tableData.bufferedImage" alt="二维码" width="auto" height="100%"></th> <th>
<img
:src="tableData.bufferedImage"
alt="二维码"
width="auto"
height="100%"
/>
</th>
</tr> </tr>
</table> </table>
</div> </div>
@ -2079,8 +2179,19 @@ const diGuiJilian = (val: any, options: any[]) => {
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :disabled="isButton1Disabled" type="primary" plain @click="downloadTables">下载</el-button> <el-button
<el-button :disabled="isButton2Disabled" type="primary" plain @click="closeQrDownload"> :disabled="isButton1Disabled"
type="primary"
plain
@click="downloadTables"
>下载</el-button
>
<el-button
:disabled="isButton2Disabled"
type="primary"
plain
@click="closeQrDownload"
>
确定 确定
</el-button> </el-button>
</div> </div>
@ -2173,13 +2284,12 @@ table {
width: 100%; width: 100%;
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
} }
td, th { td,
th {
border: 1px solid black; border: 1px solid black;
padding: 8px; padding: 8px;
vertical-align: middle; /* 设置文字上下居中 */ vertical-align: middle; /* 设置文字上下居中 */
} }
</style> </style>

79
src/views/hr/teams/index.vue

@ -10,8 +10,11 @@ import {
addteamcont, addteamcont,
eiteteamcont, eiteteamcont,
} from "@/api/hr/org/index"; } from "@/api/hr/org/index";
import { govthree } from "@/api/opk/opk/api";
import BatchImportTimePeople from "@/views/hr/teams/batchImportTimePeople.vue"; import BatchImportTimePeople from "@/views/hr/teams/batchImportTimePeople.vue";
const downloadUrlStis =
import.meta.env.VITE_APP_BASE_API + "/systemapi/rongxin/downLoadTearms";
const searchFormRef = ref(ElForm); const searchFormRef = ref(ElForm);
const addFormRef = ref(ElForm); const addFormRef = ref(ElForm);
@ -26,6 +29,8 @@ const tiemList = ref([]);
const selectTableLength = ref(0); const selectTableLength = ref(0);
const tableIds = ref<string[]>([]); //ID const tableIds = ref<string[]>([]); //ID
const daochuOpen = ref(false);
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2025-01-13 13:48:00 @ 时间: 2025-01-13 13:48:00
@ -42,7 +47,17 @@ const gainTimeList = () => {
loadLing.value = false; loadLing.value = false;
}); });
}; };
/**
@ 作者: 秦东
@ 时间: 2025-02-27 10:47:14
@ 功能: 获取公司信息
*/
const orgList = ref<any>([]);
const govthrees = () => {
govthree({ id: 309, all: 1 }).then((data) => {
orgList.value = data.data;
});
};
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2025-01-13 13:54:15 @ 时间: 2025-01-13 13:54:15
@ -50,6 +65,7 @@ const gainTimeList = () => {
*/ */
onMounted(() => { onMounted(() => {
gainTimeList(); gainTimeList();
govthrees();
}); });
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ -253,6 +269,26 @@ const closeBatchImport = () => {
setupTeimTitle.value = ""; setupTeimTitle.value = "";
setupOpen.value = false; setupOpen.value = false;
}; };
/**
@ 作者: 秦东
@ 时间: 2025-02-27 10:34:02
@ 功能: 打开导出页面
*/
const upLoadOrg = reactive({
orgId: "",
});
const openUploadPage = () => {
daochuOpen.value = true;
};
const closeUploadPeople = () => {
daochuOpen.value = false;
};
const orgTreeProps = {
label: "name",
children: "child",
};
//
const downloadPage = () => {};
</script> </script>
<template> <template>
<div class="app-container"> <div class="app-container">
@ -289,16 +325,16 @@ const closeBatchImport = () => {
<i-ep-plus /> <i-ep-plus />
新增 新增
</el-button> </el-button>
<!-- <el-button <el-button
v-hasPerm="['339372760021086208']" v-hasPerm="['339372760021086208']"
plain plain
type="primary" type="primary"
:disabled="tiemList.length === 0" :disabled="tiemList.length === 0"
@click="handleDeleteOrgClass()" @click="openUploadPage()"
> >
<i-ep-delete />删除 <i class="fa fa-upload" />导出人员
</el-button> </el-button>
<span class="select-text">已选 {{ selectTableLength }} </span> --> <!--<span class="select-text">已选 {{ selectTableLength }} </span> -->
</div> </div>
<el-table <el-table
@ -425,6 +461,39 @@ const closeBatchImport = () => {
@closeOpen="closeBatchImport" @closeOpen="closeBatchImport"
/> />
</el-dialog> </el-dialog>
<el-dialog
v-model="daochuOpen"
title="导出班组人员"
width="250"
:before-close="closeUploadPeople"
>
<el-form ref="addFormRef" :model="upLoadOrg">
<el-form-item label="行政组织" prop="orgId">
<el-tree-select
v-model="upLoadOrg.orgId"
:data="orgList"
filterable
check-strictly
style="width: 240px"
:props="orgTreeProps"
node-key="id"
clearable
/>
</el-form-item>
<el-form-item>
<el-link
type="primary"
:underline="false"
:href="downloadUrlStis + '?org=' + upLoadOrg.orgId"
target="_blank"
>
<el-button type="primary"> 确定下载 </el-button>
</el-link>
<el-button @click="closeUploadPeople"> 取消 </el-button>
</el-form-item>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

13
src/views/sysworkflow/lowcodepage/appPage/appMenus.vue

@ -326,7 +326,18 @@ const openAppPage = (val: any) => {
<template #default="{ node, data }"> <template #default="{ node, data }">
<div class="appMenuTitle"> <div class="appMenuTitle">
<el-space wrap> <el-space wrap>
<svg-icon prefix="icon" :icon-class="data.svg" @click="setAppMenusSvg(data)" /> <el-image
v-if="data.icon != ''"
style="width: 15px; height: 15px"
:src="data.icon"
:fit="fit"
/>
<svg-icon
v-else
prefix="icon"
:icon-class="data.svg"
@click="setAppMenusSvg(data)"
/>
<!-- <el-tooltip :content="node.label" placement="top" effect="dark"> <!-- <el-tooltip :content="node.label" placement="top" effect="dark">
<el-text class="w-120px mb-2" truncated @click="openAppPage(data)">{{node.label}}</el-text> <el-text class="w-120px mb-2" truncated @click="openAppPage(data)">{{node.label}}</el-text>
</el-tooltip> --> </el-tooltip> -->

3
src/views/sysworkflow/lowcodepage/appPage/appPageForm/pageList.vue

@ -1665,7 +1665,8 @@ const dialogConfirm = (editVal: string) => {
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
<el-divider content-position="left">功能按钮</el-divider><!-- liwenxuan --> <el-divider content-position="left">功能按钮</el-divider
><!-- liwenxuan 添加扫码功能 -->
<div class="form_tabs"> <div class="form_tabs">
<el-table <el-table
ref="tableAttrBut" ref="tableAttrBut"

3
src/views/sysworkflow/lowcodepage/appPage/appSetUp/setup.vue

@ -134,8 +134,7 @@ const beforeAvatarUpload: UploadProps["beforeUpload"] = (rawFile) => {
}; };
</script> </script>
<template> <template>
<el-card shadow="always" <el-card shadow="always">
>{{ props }}
<el-divider content-position="left">App基础设置</el-divider> <el-divider content-position="left">App基础设置</el-divider>
<el-form <el-form
ref="ruleFormRef" ref="ruleFormRef"

Loading…
Cancel
Save