Browse Source

修复子表标签无法设置问题

qin_14
hreenshan112 10 months ago
parent
commit
c877c955b3
  1. 8
      src/components/DesignForm/app/formPage.vue
  2. 3
      src/components/DesignForm/assembly/index.ts
  3. 101
      src/components/DesignForm/formControlPropertiNew.vue
  4. 7
      src/views/hr/archives/index.vue

8
src/components/DesignForm/app/formPage.vue

@ -1270,14 +1270,6 @@ watch(
'detail-form': type === 3 || type === 4 || type === 1,
}"
>
<FormGroup
:tableinfo="formData.form"
:numrun="numrun"
:data="formData.list"
:alldata="formData"
@optionsValue3Get2="optionsValue3Get2"
/>
<slot></slot>
</el-form>
</div>

3
src/components/DesignForm/assembly/index.ts

@ -658,6 +658,9 @@ export default [
icon: 'table',
iconFont: 'fa-table',
list: [],
item:{
label:""
},
tableData: [], // 子表表格列表数据集合
control: {
border: true

101
src/components/DesignForm/formControlPropertiNew.vue

@ -79,8 +79,8 @@ const { formConfig, formData } = toRefs(props);
const store = useDesignFormStore() as any;
const controlData = computed(() => {
// console.log("----------------->",props.formInfo)
// console.log("--------1--------->",store.controlAttr)
// console.log("---------3-------->",controlData.value.customRules)
// console.log("--------1--------->", store.controlAttr);
// console.log("---------3-------->", controlData.value.customRules);
return store.controlAttr;
});
//Demo
@ -291,12 +291,12 @@ const attrList = computed(() => {
}
}
//
// console.log("--->",typeof(controlData.value.customRules))
// console.log("--->", item);
if (typeof controlData.value.customRules == "object") {
if (Array.isArray(controlData.value.customRules)) {
let otherPick = [];
controlData.value.customRules.forEach((item: any) => {
// console.log("-1-->",item)
// console.log("-1-->", item);
if (item.type == ValidateText.type) {
ValidateText.checkbox = true;
} else {
@ -317,7 +317,7 @@ const attrList = computed(() => {
ValidateText.checkbox = false;
radioVerify.type = "";
}
// console.log("-1-->", item);
const temp = reactive<PublicAtrr[]>([
{
label: "标签名称",
@ -1167,14 +1167,25 @@ const controlChange = (obj: any, val: any) => {
if (data.code == 0) {
if (data.data != "") {
if (!fileSignAry.includes(data.data)) {
if (controlData.value.type == "table") {
controlData.value.name = "table_" + data.data;
} else {
controlData.value.name = data.data;
}
fileSignAry.push(data.data);
} else {
let isEnd = true;
do {
let titleVal = data.data + Rand(10000000, 99999999);
if (!fileSignAry.includes(titleVal)) {
// controlData.value.name = titleVal;
if (controlData.value.type == "table") {
controlData.value.name = "table_" + titleVal;
} else {
controlData.value.name = titleVal;
}
fileSignAry.push(titleVal);
isEnd = false;
}
@ -1182,12 +1193,22 @@ const controlChange = (obj: any, val: any) => {
}
} else {
if (!fileSignAry.includes(val)) {
if (controlData.value.type == "table") {
controlData.value.name = "table_" + val;
} else {
controlData.value.name = val;
}
// controlData.value.name = val;
fileSignAry.push(val);
} else {
let titleVal = val + Rand(10000000, 99999999);
if (!fileSignAry.includes(titleVal)) {
// controlData.value.name = titleVal;
if (controlData.value.type == "table") {
controlData.value.name = "table_" + titleVal;
} else {
controlData.value.name = titleVal;
}
fileSignAry.push(titleVal);
}
}
@ -1266,6 +1287,7 @@ const Rand = (Min: number, Max: number) => {
const getPropByPath = (obj: any, path: string, val: any) => {
let tempObj = obj;
const keyArr = path.split(".");
console.log("修改指定路径下的值", keyArr, tempObj);
let i = 0;
for (i; i < keyArr.length - 1; i++) {
const key = keyArr[i];
@ -2154,23 +2176,22 @@ const transferDataSourceOptions = [
//liwenxuan20240313 lowcodeImage end
//liwenxuan20250103 qrCode start
let qrCodeImgInside = ""
const qrCodeInsideDialogFlag = ref(false)
function showQrCodeOutside(){
alert("暂不支持外部填单")
let qrCodeImgInside = "";
const qrCodeInsideDialogFlag = ref(false);
function showQrCodeOutside() {
alert("暂不支持外部填单");
}
function showQrCodeInside(){
function showQrCodeInside() {
//,,app,,
//,,,
//cfid
getQrCodeImgInside().then(({ data }) => {
qrCodeImgInside = data
if(qrCodeInsideDialogFlag.value==false){
qrCodeImgInside = data;
if (qrCodeInsideDialogFlag.value == false) {
//console.log(qrCodeImgInside)
qrCodeInsideDialogFlag.value = true
qrCodeInsideDialogFlag.value = true;
}
})
});
}
function getQrCodeImgInside() {
return request({
@ -2185,12 +2206,13 @@ function getQrCodeImgInside() {
function showQrCodeOutPrintConfig(){
qrCodeOutPrintConfigFlag.value = true
} */
function handleMaxSelect(){
function handleMaxSelect() {
//console.log(formData.value.qrCodeShowFields.length)
if(formData.value.qrCodeShowFields.length>5){
alert("最多可选择5个字段")
if (formData.value.qrCodeShowFields.length > 5) {
alert("最多可选择5个字段");
}
while (formData.value.qrCodeShowFields.length > 5) {//
while (formData.value.qrCodeShowFields.length > 5) {
//
formData.value.qrCodeShowFields.pop();
}
}
@ -2201,7 +2223,8 @@ import AssociatedFormsTinyaceRange from "@/widget/associatedforms/associatedForm
import AssociatedFormsFillRole from "@/widget/associatedforms/associatedFormsFillRole.vue";
import AssociatedFormsChildFillRole from "@/widget/associatedforms/associatedFormsChildFillRole.vue";
const treeDefaultProps = {//
const treeDefaultProps = {
//
children: "children",
label: "label",
};
@ -2503,7 +2526,10 @@ function getAssociatedFormsCurrentFieldTree1() {
(item: { type: string | null }) => item.type != "table"
);
resDataNoTableNoAsf = resDataNoTable.filter(
(item: { type: string | null }) => item.type != "associatedForms"&&item.type != "table"&&item.type != "checkbox"
(item: { type: string | null }) =>
item.type != "associatedForms" &&
item.type != "table" &&
item.type != "checkbox"
);
associatedFormsCurrentFormFieldTreeNoTable.value = [
@ -2515,7 +2541,7 @@ function getAssociatedFormsCurrentFieldTree1() {
},
];
associatedFormsCurrentFormFieldTreeNoTable1.value = [...resDataNoTable]
associatedFormsCurrentFormFieldTreeNoTable1.value = [...resDataNoTable];
let resDataForGlxxsz = ref(data.children.slice(8));
@ -3342,11 +3368,11 @@ const gainFormGroupList = () => {
.finally(() => {
loadingmore.value = false;
console.log("组件加载完毕--------1----------->", formData.value);
console.log("组件加载完毕--------2----------->", props.formList);
console.log("组件加载完毕--------3----------->", state.dataSourceList);
// console.log("--------1----------->", formData.value);
// console.log("--------2----------->", props.formList);
// console.log("--------3----------->", state.dataSourceList);
if (formData.value.dataSource == "yes" && state.dataSourceList.length < 1) {
console.log("组件加载完毕--------4----------->", state.dataSourceList);
// console.log("--------4----------->", state.dataSourceList);
tableFileList();
}
});
@ -3446,10 +3472,10 @@ onMounted(() => {
watch(
() => state.tabsName,
(val: string) => {
console.log("监听字段切换", val);
// console.log("", val);
if (val == "first") {
if (formData.value.dataSource == "yes" && state.dataSourceList.length < 1) {
console.log("组件加载完毕--------4----------->", formData.value);
// console.log("--------4----------->", formData.value);
tableFileList();
}
}
@ -3569,7 +3595,7 @@ const requiredText = (val: any) => {
});
}
}
console.log("判断校验规则-1-->", controlData.value.customRules);
// console.log("-1-->", controlData.value.customRules);
};
/**
@ -4858,8 +4884,11 @@ const updataBase = (val: any) => {
查看外部二维码图片
</el-button>
</el-form-item>
<el-form-item v-if="formData.qrCodeFlag" class="form_cont" label="二维码打印样式">
<el-form-item
v-if="formData.qrCodeFlag"
class="form_cont"
label="二维码打印样式"
>
<!-- <el-button
type="primary"
text
@ -4874,14 +4903,17 @@ const updataBase = (val: any) => {
</el-radio-group>
</el-form-item>
<el-form-item v-if="formData.qrCodeFlag&&formData.qrCodePrintStyle==2" class="form_cont" label="表格卡片显示字段">
<el-form-item
v-if="formData.qrCodeFlag && formData.qrCodePrintStyle == 2"
class="form_cont"
label="表格卡片显示字段"
>
<el-select
v-model="formData.qrCodeShowFields"
multiple
placeholder="请选择"
style="width: 240px"
@change="handleMaxSelect"
>
<el-option
v-for="item in associatedFormsCurrentFormFieldTreeNoTable1"
@ -5241,7 +5273,6 @@ const updataBase = (val: any) => {
</el-dialog>
<!-- 穿梭框设置弹窗 liwenxuan 20240217 end -->
<!-- 二维码展示弹窗 liwenxuan 20250103 start -->
<el-dialog
@ -5254,7 +5285,7 @@ const updataBase = (val: any) => {
style="margin-top: 70px"
width="50%"
>
<img :src="qrCodeImgInside" style="width: 50%;height: 50%;" />
<img :src="qrCodeImgInside" style="width: 50%; height: 50%" />
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="qrCodeInsideDialogFlag = false">

7
src/views/hr/archives/index.vue

@ -232,7 +232,7 @@ const totalNum = ref<number>();
*/
const uploadTrue = (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
excelLoading.value = false;
// console.log("response",response);
console.log("response", response);
// console.log("uploadFile",uploadFile);
// console.log("uploadFiles",uploadFiles);
peopleListAry.push("文件上传成功!开始解析数据并写入数据库!");
@ -247,6 +247,7 @@ const uploadTrue = (response: any, uploadFile: UploadFile, uploadFiles: UploadFi
rewPunYearsIng.value = response.data.rewPunYearsIng;
redisListKey.value = response.data.redisListKey;
totalNum.value = response.data.totalNum;
// console.log("===>", staffChengji);
insetPeopleCont();
}
};
@ -267,7 +268,7 @@ const excelUpload = ref<any>();
const excelUploadStaff = ref<any>();
const insetPeopleCont = () => {
// console.log("",jiBuQiVal,totalNum.value)
console.log("启动数据写入数据库===============》", jiBuQiVal, totalNum.value);
if (jiBuQiVal < totalNum.value) {
let sendData = {
meritsYearIng: meritsYearIng.value,
@ -276,7 +277,7 @@ const insetPeopleCont = () => {
number: jiBuQiVal,
orgId: tempForm.orgId.toString(),
};
// console.log("",sendData)
console.log("启动数据写入数据库", sendData);
analysisRedisOrgExelect(sendData).then((data: any) => {
// console.log("11111",data,data.data.msgStr)
peopleMsg.value.push(data.data.msgStr);

Loading…
Cancel
Save