Browse Source

流程修改

qin_v7
hreenshan112 1 year ago
parent
commit
57eaf3a4fe
  1. BIN
      src/assets/favicon.ico
  2. 529
      src/components/DesignForm/app/cardPage.vue
  3. 9256
      src/components/DesignForm/formControlPropertiNew.vue
  4. 476
      src/components/DesignForm/public/form/childTable.vue
  5. 1031
      src/components/DesignForm/tableListPage/formPageCont.vue
  6. 2483
      src/components/DesignForm/tableListPage/index.vue
  7. 905
      src/views/sysworkflow/lowcodepage/appCardPage.vue
  8. 573
      src/views/sysworkflow/lowcodepage/index.vue
  9. 438
      src/views/taskplatform/taskmanagement/lookFlowInfoApp.vue
  10. 196
      vite.config.ts.timestamp-1731975545563-47f159282f4b9.mjs

BIN
src/assets/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

529
src/components/DesignForm/app/cardPage.vue

@ -3,75 +3,75 @@
@ 时间: 2024-07-17 15:35:39 @ 时间: 2024-07-17 15:35:39
@ 备注: 卡片视图 @ 备注: 卡片视图
--> -->
<script lang='ts' setup> <script lang="ts" setup>
import type { ComponentSize } from 'element-plus' import type { ComponentSize } from "element-plus";
import { gainFormPageListCont } from '@/api/DesignForm/requestapi' import { gainFormPageListCont } from "@/api/DesignForm/requestapi";
import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue' import FormPageCont from "@/components/DesignForm/tableListPage/formPageCont.vue";
const props = defineProps({ const props = defineProps({
searchSend:{ searchSend: {
type:Object, type: Object,
default(){ default() {
return {} return {};
} },
}, },
viewSetup:{ viewSetup: {
type:Object, type: Object,
default(){ default() {
return {} return {};
} },
}, },
columnsFilter:{ columnsFilter: {
type:Object, type: Object,
default(){ default() {
return {} return {};
} },
}, },
drawerWith:{ drawerWith: {
type:Number, type: Number,
default:0 default: 0,
} },
}); });
const size = ref<ComponentSize>('default') const size = ref<ComponentSize>("default");
const lineRanks = ref(1) const lineRanks = ref(1);
const imgBox = computed(() => { const imgBox = computed(() => {
let cssStyle:any = {} let cssStyle: any = {};
if(props.viewSetup.form.imgWidth != 0){ if (props.viewSetup.form.imgWidth != 0) {
cssStyle['width'] = props.viewSetup.form.imgWidth + "px"; cssStyle["width"] = props.viewSetup.form.imgWidth + "px";
}else{ } else {
cssStyle['width'] = "50px"; cssStyle["width"] = "50px";
} }
if(props.viewSetup.form.imgHeight != 0){ if (props.viewSetup.form.imgHeight != 0) {
cssStyle['height'] = props.viewSetup.form.imgHeight + "px"; cssStyle["height"] = props.viewSetup.form.imgHeight + "px";
}else{ } else {
cssStyle['height'] = "50px"; cssStyle["height"] = "50px";
} }
return cssStyle return cssStyle;
}) });
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-18 14:26:46 @ 时间: 2024-07-18 14:26:46
@ 功能: 图像设定Css @ 功能: 图像设定Css
*/ */
const imgStyle = computed(() => { const imgStyle = computed(() => {
let cssStyle:any = {} let cssStyle: any = {};
cssStyle['border'] = "1px solid #ccc"; cssStyle["border"] = "1px solid #ccc";
cssStyle['border-radius'] = props.viewSetup.form.imgBorderRadius + "px"; cssStyle["border-radius"] = props.viewSetup.form.imgBorderRadius + "px";
cssStyle['padding'] = props.viewSetup.form.imgPadding + "px"; cssStyle["padding"] = props.viewSetup.form.imgPadding + "px";
if(props.viewSetup.form.imgWidth != 0){ if (props.viewSetup.form.imgWidth != 0) {
cssStyle['width'] = props.viewSetup.form.imgWidth + "px"; cssStyle["width"] = props.viewSetup.form.imgWidth + "px";
}else{ } else {
cssStyle['width'] = "50px"; cssStyle["width"] = "50px";
} }
if(props.viewSetup.form.imgHeight != 0){ if (props.viewSetup.form.imgHeight != 0) {
cssStyle['height'] = props.viewSetup.form.imgHeight + "px"; cssStyle["height"] = props.viewSetup.form.imgHeight + "px";
}else{ } else {
cssStyle['height'] = "50px"; cssStyle["height"] = "50px";
} }
// console.log("",cssStyle) // console.log("",cssStyle)
return cssStyle return cssStyle;
}) });
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ -79,204 +79,222 @@ const imgStyle = computed(() => {
@ 功能: 内容设定css @ 功能: 内容设定css
*/ */
const cardInfoBox = computed(() => { const cardInfoBox = computed(() => {
let cssStyle:any = {} let cssStyle: any = {};
cssStyle['width'] = (Math.round(24/props.viewSetup.form.ranks) - props.viewSetup.form.imgWidth) + "px"; cssStyle["width"] =
return cssStyle Math.round(24 / props.viewSetup.form.ranks) - props.viewSetup.form.imgWidth + "px";
}) return cssStyle;
onMounted(()=>{ });
lineRanks.value = Math.round(24/props.viewSetup.form.ranks) onMounted(() => {
nextTick(()=>{ lineRanks.value = Math.round(24 / props.viewSetup.form.ranks);
getCardList(props.searchSend) nextTick(() => {
}) getCardList(props.searchSend);
}) });
});
// const url = ref() // const url = ref()
// const srcList = ref([]) // const srcList = ref([])
const handleSizeChange = (val: number) => { const handleSizeChange = (val: number) => {
// console.log(`${val} items per page`)\ // console.log(`${val} items per page`)\
props.searchSend.page = 1 props.searchSend.page = 1;
props.searchSend.pagesize = val props.searchSend.pagesize = val;
// console.log(props.searchSend.pagesize) // console.log(props.searchSend.pagesize)
getCardList(props.searchSend) getCardList(props.searchSend);
} };
const handleCurrentChange = (val: number) => { const handleCurrentChange = (val: number) => {
// console.log(`current page: ${val}`) // console.log(`current page: ${val}`)
props.searchSend.page = val props.searchSend.page = val;
getCardList(props.searchSend) getCardList(props.searchSend);
} };
const url = const url = "https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg";
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg' const srcList = (url: string) => {
const srcList = (url:string) =>{ return [url];
return [url] return [
return [ "https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg",
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg', "https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg",
'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg', "https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg",
'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg', "https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg",
'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg', "https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg",
'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg', "https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg",
'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg', "https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg",
'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg', ];
] };
} const cardDataList = ref([]); //
const cardDataList = ref([]) // const totalNum = ref(0);
const totalNum = ref(0)
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-19 09:32:11 @ 时间: 2024-07-19 09:32:11
@ 功能: 获取数据 @ 功能: 获取数据
*/ */
const getCardList = (val:any) => { const getCardList = (val: any) => {
val.viewClass = { val.viewClass = {
class:"card" class: "card",
} };
gainFormPageListCont(val) gainFormPageListCont(val).then(({ data }) => {
.then(({data})=>{ totalNum.value = data.total;
totalNum.value = data.total // console.log("--",data)
// console.log("--",data) cardDataList.value = data.list;
cardDataList.value = data.list });
}) };
}
defineExpose({ defineExpose({
getCardList getCardList,
}) });
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-19 10:03:53 @ 时间: 2024-07-19 10:03:53
@ 功能: 获取图片显示 @ 功能: 获取图片显示
*/ */
const imgSrcPath = (val:any) => { const imgSrcPath = (val: any) => {
// console.log("", val[props.viewSetup.form.imgWork]) // console.log("", val[props.viewSetup.form.imgWork])
if(val[props.viewSetup.form.imgWork]){ if (val[props.viewSetup.form.imgWork]) {
return val[props.viewSetup.form.imgWork] return val[props.viewSetup.form.imgWork];
} }
return "" return "";
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-19 10:03:53 @ 时间: 2024-07-19 10:03:53
@ 功能: 获取图片数组显示 @ 功能: 获取图片数组显示
*/ */
const imgSrcAry = (val:any) => { const imgSrcAry = (val: any) => {
if(val[props.viewSetup.form.imgWork]){ if (val[props.viewSetup.form.imgWork]) {
if (val[props.viewSetup.form.imgWork] != ""){ if (val[props.viewSetup.form.imgWork] != "") {
return [val[props.viewSetup.form.imgWork]] return [val[props.viewSetup.form.imgWork]];
}else{ } else {
return [] return [];
} }
}
} return [];
return [] };
}
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-19 10:24:33 @ 时间: 2024-07-19 10:24:33
@ 功能: 获取内容 @ 功能: 获取内容
*/ */
const cardInfo = (val:any,cla:string) => { const cardInfo = (val: any, cla: string) => {
if(cla=="title"){ if (cla == "title") {
if(props.viewSetup.form.title){ if (props.viewSetup.form.title) {
var titleAry = []; var titleAry = [];
if(props.viewSetup.form.title.length > 0){ if (props.viewSetup.form.title.length > 0) {
props.viewSetup.form.title.forEach((item,index)=>{ props.viewSetup.form.title.forEach((item, index) => {
// console.log("--"+index+"-->",val[item]) // console.log("--"+index+"-->",val[item])
if(val[item]){ if (val[item]) {
titleAry.push(val[item]) titleAry.push(val[item]);
} }
}) });
} }
if(titleAry.length>0){ if (titleAry.length > 0) {
return titleAry.join() return titleAry.join();
}else{ } else {
let firstWord = "" let firstWord = "";
let powerAry = ["id","creater_time","edit_time","masters_key","states","flow_id"]; let powerAry = [
for (let key in val) { "id",
if (val.hasOwnProperty(key)) { "creater_time",
if(!powerAry.includes(key)){ "edit_time",
if(val[key] != '' && val[key] != null){ "masters_key",
firstWord = val[key] "states",
} "flow_id",
} ];
} for (let key in val) {
} if (val.hasOwnProperty(key)) {
return firstWord if (!powerAry.includes(key)) {
} if (val[key] != "" && val[key] != null) {
firstWord = val[key];
} }
if(val[props.viewSetup.form.titleWork]){ }
return val[props.viewSetup.form.titleWork] }
} }
}else if(cla=="content"){ return firstWord;
if(val[props.viewSetup.form.describe]){ }
return val[props.viewSetup.form.describe] }
} if (val[props.viewSetup.form.titleWork]) {
} return val[props.viewSetup.form.titleWork];
return "" }
} } else if (cla == "content") {
if (val[props.viewSetup.form.describe]) {
return val[props.viewSetup.form.describe];
}
}
return "";
};
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-04-03 13:24:06 @ 时间: 2024-04-03 13:24:06
@ 功能: 查看详细内容 @ 功能: 查看详细内容
*/ */
const tablePageClass = ref(1) const tablePageClass = ref(1);
const lookPageInfoIsShow = ref(false) const lookPageInfoIsShow = ref(false);
const pageInfoCont = ref<any>() const pageInfoCont = ref<any>();
const lookPageInfo = (val:any) => { const lookPageInfo = (val: any) => {
tablePageClass.value = 4; tablePageClass.value = 4;
pageInfoCont.value = val pageInfoCont.value = val;
lookPageInfoIsShow.value = true; lookPageInfoIsShow.value = true;
} };
</script> </script>
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col
<el-col v-for="item in cardDataList" :key="item.id" :span="lineRanks" class="cardBox"> v-for="item in cardDataList"
:key="item.id"
<el-card @click="lookPageInfo(item)"> :span="lineRanks"
<div class="cardContBox"> class="cardBox"
<el-image >
:style="imgStyle" <el-card @click="lookPageInfo(item)">
:src="imgSrcPath(item)" <div class="cardContBox">
:zoom-rate="1.2" <el-image
:max-scale="7" :style="imgStyle"
:min-scale="0.2" :src="imgSrcPath(item)"
:preview-src-list="imgSrcAry(item)" :zoom-rate="1.2"
:initial-index="4" :max-scale="7"
fit="cover" :min-scale="0.2"
/> :preview-src-list="imgSrcAry(item)"
<div class="cardInfo" :style="'width: calc(100% - '+props.viewSetup.form.imgWidth+'px); height:'+props.viewSetup.form.imgHeight+'px; overflow: hidden;' "> :initial-index="4"
<div class="title">{{ cardInfo(item,"title") }}</div> fit="cover"
<div class="content">{{ cardInfo(item,"content") }}</div> />
</div> <div
</div> class="cardInfo"
</el-card> :style="
'width: calc(100% - ' +
</el-col> props.viewSetup.form.imgWidth +
'px); height:' +
props.viewSetup.form.imgHeight +
'px; overflow: hidden;'
</el-row> "
<div class="pageBox"> >
<el-pagination <div class="title">{{ cardInfo(item, "title") }}</div>
v-model:current-page="props.searchSend.page" <div class="content">{{ cardInfo(item, "content") }}</div>
v-model:page-size="props.searchSend.pagesize" </div>
:page-sizes="[3, 9, 12, 30, 50, 100]" </div>
:size="size" </el-card>
:background="true" </el-col>
layout="total, sizes, prev, pager, next, jumper" </el-row>
:total="totalNum" <div class="pageBox">
@size-change="handleSizeChange" <el-pagination
@current-change="handleCurrentChange" v-model:current-page="props.searchSend.page"
class="page" v-model:page-size="props.searchSend.pagesize"
/> :page-sizes="[3, 9, 12, 30, 50, 100]"
</div> :size="size"
<FormPageCont v-model:is-show="lookPageInfoIsShow" :drawer-with="props.drawerWith" :page-info="pageInfoCont" :table-page-class="tablePageClass" :oper-state="operState" @getPageData="getPageData" /> :background="true"
</div> layout="total, sizes, prev, pager, next, jumper"
:total="totalNum"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
class="page"
/>
</div>
<FormPageCont
v-model:is-show="lookPageInfoIsShow"
:drawer-with="props.drawerWith"
:page-info="pageInfoCont"
:table-page-class="tablePageClass"
:oper-state="operState"
@getPageData="getPageData"
/>
</div>
</template> </template>
<style lang='scss' scoped> <style lang="scss" scoped>
.demo-image__error .image-slot { .demo-image__error .image-slot {
font-size: 30px; font-size: 30px;
} }
@ -287,40 +305,39 @@ const lookPageInfo = (val:any) => {
width: 100%; width: 100%;
height: 200px; height: 200px;
} }
.cardBox{ .cardBox {
padding: 10px 0 5px 0; padding: 10px 0 5px 0;
:deep .el-card__body{ :deep .el-card__body {
padding:10px; padding: 10px;
} }
.title{ .title {
font-size:14px; font-size: 14px;
font-weight:bold; font-weight: bold;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.content{ .content {
color: #909399; color: #909399;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.cardContBox{ .cardContBox {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: flex-start; justify-content: flex-start;
} }
.cardInfo{ .cardInfo {
padding-left: 5px; padding-left: 5px;
} }
} }
.pageBox{ .pageBox {
display:flex; display: flex;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
text-align: center; text-align: center;
margin-top: 10px; margin-top: 10px;
} }
</style> </style>

9256
src/components/DesignForm/formControlPropertiNew.vue

File diff suppressed because it is too large

476
src/components/DesignForm/public/form/childTable.vue

@ -3,264 +3,268 @@
@ 时间: 2023-07-14 08:51:25 @ 时间: 2023-07-14 08:51:25
@ 备注: 表单子表 @ 备注: 表单子表
--> -->
<script lang='ts' setup> <script lang="ts" setup>
import FormItem from './formItem.vue' import FormItem from "./formItem.vue";
import { inject, computed } from 'vue' import { inject, computed } from "vue";
import Tooltips from '@/components/DesignForm/tooltip.vue' import Tooltips from "@/components/DesignForm/tooltip.vue";
import {constFormProps } from '@/api/DesignForm/utils' import { constFormProps } from "@/api/DesignForm/utils";
import { jsonParseStringify } from '@/utils/DesignForm' import { jsonParseStringify } from "@/utils/DesignForm";
import LowcodeImagePage from '@/components/DesignForm/public/expand/lowcodeImage.vue' import LowcodeImagePage from "@/components/DesignForm/public/expand/lowcodeImage.vue";
import AssociatedForms from '@/widget/associatedforms/index.vue' import AssociatedForms from "@/widget/associatedforms/index.vue";
import UploadPageList from '@/components/DesignForm/public/expand/uploadPageList.vue' import UploadPageList from "@/components/DesignForm/public/expand/uploadPageList.vue";
import LokOrgCentent from '@/widget/org/cont.vue'
import { SCOPE } from 'element-plus'
import LokOrgCentent from "@/widget/org/cont.vue";
import { SCOPE } from "element-plus";
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
data: any data: any;
}>(), }>(),
{ {
data: () => { data: () => {
return {} return {};
} },
} }
) );
const formProps = inject(constFormProps, {}) as any const formProps = inject(constFormProps, {}) as any;
const tableDataNew = computed(() => { const tableDataNew = computed(() => {
// console.log("-----1---->",props.data.name) // console.log("-----1---->",props.data.name)
// console.log("-----2---->",formProps.value.model[props.data.name]) // console.log("-----2---->",formProps.value.model[props.data.name])
// console.log("-----3---->",formProps.value.model) // console.log("-----3---->",formProps.value.model)
// console.log("-----4---->",formProps.value) // console.log("-----4---->",formProps.value)
return formProps.value.model[props.data.name] return formProps.value.model[props.data.name];
}) });
const type = computed(() => { const type = computed(() => {
return formProps.value.type return formProps.value.type;
}) });
// true // true
const editDisabled = computed(() => { const editDisabled = computed(() => {
return formProps.value.type === 2 && props.data.config?.editDisabled return formProps.value.type === 2 && props.data.config?.editDisabled;
}) });
const addColumn = () => { const addColumn = () => {
// console.log("--------->",tableDataNew.value) // console.log("--------->",tableDataNew.value)
const temp: any = {} const temp: any = {};
if (props.data.list) { if (props.data.list) {
props.data.list.forEach((item: any) => { props.data.list.forEach((item: any) => {
if (item.name) { if (item.name) {
temp[item.name] = item.control.modelValue temp[item.name] = item.control.modelValue;
} }
}) });
tableDataNew.value.push(jsonParseStringify(temp)) tableDataNew.value.push(jsonParseStringify(temp));
} }
} };
const getText = (text: any,val:any,name:any) => { const getText = (text: any, val: any, name: any) => {
console.log("text===>",text) console.log("text===>", text);
console.log("name===>",name) console.log("name===>", name);
console.log("val===>",val) console.log("val===>", val);
if (typeof text === 'string') { if (typeof text === "string") {
return text return text;
} else { } else {
return text && text.toString() return text && text.toString();
} }
} };
const delColumn = (index: number) => { const delColumn = (index: number) => {
tableDataNew.value.splice(index, 1) tableDataNew.value.splice(index, 1);
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-08-02 13:22:14 @ 时间: 2024-08-02 13:22:14
@ 功能: 时间戳转换对象 @ 功能: 时间戳转换对象
*/ */
const timeToAry = (timestamp:number) => { const timeToAry = (timestamp: number) => {
const date = new Date(timestamp); const date = new Date(timestamp);
const year = date.getFullYear(); const year = date.getFullYear();
const month = ('0' + (date.getMonth() + 1)).slice(-2); const month = ("0" + (date.getMonth() + 1)).slice(-2);
const day = ('0' + date.getDate()).slice(-2); const day = ("0" + date.getDate()).slice(-2);
const hours = ('0' + date.getHours()).slice(-2); const hours = ("0" + date.getHours()).slice(-2);
const minutes = ('0' + date.getMinutes()).slice(-2); const minutes = ("0" + date.getMinutes()).slice(-2);
const seconds = ('0' + date.getSeconds()).slice(-2); const seconds = ("0" + date.getSeconds()).slice(-2);
return { return {
year:year, year: year,
month:month, month: month,
day:day, day: day,
hours:hours, hours: hours,
minutes:minutes, minutes: minutes,
seconds seconds,
} };
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-08-02 13:02:49 @ 时间: 2024-08-02 13:02:49
@ 功能: 将时间戳转换成字符串 @ 功能: 将时间戳转换成字符串
*/ */
const timeToString = (timeVal:any,types:int) => { const timeToString = (timeVal: any, types: int) => {
let timeStr = "" let timeStr = "";
if(Array.isArray(timeVal)){ if (Array.isArray(timeVal)) {
if(timeVal.length >= 2){ if (timeVal.length >= 2) {
let startTime = timeToAry(timeVal[0]) let startTime = timeToAry(timeVal[0]);
let endTime = timeToAry(timeVal[1]) let endTime = timeToAry(timeVal[1]);
switch(types){ switch (types) {
case "year": // case "year": //
timeStr = `${startTime.year}${endTime.year}`; timeStr = `${startTime.year}${endTime.year}`;
break; break;
case "month": // case "month": //
timeStr = `${startTime.year}-${startTime.month}${endTime.year}-${endTime.month}`; timeStr = `${startTime.year}-${startTime.month}${endTime.year}-${endTime.month}`;
break; break;
case "datetime": //+ case "datetime": //+
timeStr = `${startTime.year}-${startTime.month}-${startTime.day} ${startTime.hours}:${startTime.minutes}:${startTime.seconds}${endTime.year}-${endTime.month}-${endTime.day} ${endTime.hours}:${endTime.minutes}:${endTime.seconds}`; timeStr = `${startTime.year}-${startTime.month}-${startTime.day} ${startTime.hours}:${startTime.minutes}:${startTime.seconds}${endTime.year}-${endTime.month}-${endTime.day} ${endTime.hours}:${endTime.minutes}:${endTime.seconds}`;
break; break;
case "week": // case "week": //
let startWeek = getYearWeek(startTime) let startWeek = getYearWeek(startTime);
let endWeek = getYearWeek(endTime) let endWeek = getYearWeek(endTime);
timeStr = `${startWeek}${endWeek}`; timeStr = `${startWeek}${endWeek}`;
break; break;
case "timeCalss": // case "timeCalss": //
timeStr = `${startTime.hours}:${startTime.minutes}:${startTime.seconds}${endTime.hours}:${endTime.minutes}:${endTime.seconds}`; timeStr = `${startTime.hours}:${startTime.minutes}:${startTime.seconds}${endTime.hours}:${endTime.minutes}:${endTime.seconds}`;
break; break;
case "datetimerange": case "datetimerange":
timeStr = `${startTime.year}-${startTime.month}-${startTime.day} ${startTime.hours}:${startTime.minutes}:${startTime.seconds}${endTime.year}-${endTime.month}-${endTime.day} ${endTime.hours}:${endTime.minutes}:${endTime.seconds}`; timeStr = `${startTime.year}-${startTime.month}-${startTime.day} ${startTime.hours}:${startTime.minutes}:${startTime.seconds}${endTime.year}-${endTime.month}-${endTime.day} ${endTime.hours}:${endTime.minutes}:${endTime.seconds}`;
break; break;
case "daterange": case "daterange":
timeStr = `${startTime.year}-${startTime.month}-${startTime.day}${endTime.year}-${endTime.month}-${endTime.day}`; timeStr = `${startTime.year}-${startTime.month}-${startTime.day}${endTime.year}-${endTime.month}-${endTime.day}`;
break; break;
case "monthrange": case "monthrange":
timeStr = `${startTime.year}-${startTime.month}${endTime.year}-${endTime.month}`; timeStr = `${startTime.year}-${startTime.month}${endTime.year}-${endTime.month}`;
break; break;
default: default:
timeStr = `${startTime.year}-${startTime.month}-${startTime.day}${endTime.year}-${endTime.month}-${endTime.day}`; timeStr = `${startTime.year}-${startTime.month}-${startTime.day}${endTime.year}-${endTime.month}-${endTime.day}`;
break; break;
} }
}else if(timeVal.length == 1){ } else if (timeVal.length == 1) {
let {year,month,day,hours,minutes,seconds} = timeToAry(timeVal[0]) let { year, month, day, hours, minutes, seconds } = timeToAry(timeVal[0]);
switch(types){ switch (types) {
case "year": // case "year": //
timeStr = `${year}`; timeStr = `${year}`;
break; break;
case "month": // case "month": //
timeStr = `${year}-${month}`; timeStr = `${year}-${month}`;
break; break;
case "datetime": //+ case "datetime": //+
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
break; break;
case "week": // case "week": //
timeStr = getYearWeek(timeVal) timeStr = getYearWeek(timeVal);
break; break;
case "timeCalss": // case "timeCalss": //
timeStr = `${hours}:${minutes}:${seconds}`; timeStr = `${hours}:${minutes}:${seconds}`;
break; break;
default: default:
timeStr = `${year}-${month}-${day}` timeStr = `${year}-${month}-${day}`;
break; break;
} }
}else{ } else {
timeStr = "未知时间" timeStr = "未知时间";
} }
}else{ } else {
let {year,month,day,hours,minutes,seconds} = timeToAry(timeVal) let { year, month, day, hours, minutes, seconds } = timeToAry(timeVal);
switch(types){ switch (types) {
case "year": // case "year": //
timeStr = `${year}`; timeStr = `${year}`;
break; break;
case "month": // case "month": //
timeStr = `${year}-${month}`; timeStr = `${year}-${month}`;
break; break;
case "datetime": //+ case "datetime": //+
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
break; break;
case "week": // case "week": //
timeStr = getYearWeek(timeVal) timeStr = getYearWeek(timeVal);
break; break;
case "timeCalss": // case "timeCalss": //
timeStr = `${hours}:${minutes}:${seconds}`; timeStr = `${hours}:${minutes}:${seconds}`;
break; break;
default: default:
timeStr = `${year}-${month}-${day}` timeStr = `${year}-${month}-${day}`;
break; break;
} }
} }
return timeStr return timeStr;
} };
let associatedFormsIndexTablekey = 0 let associatedFormsIndexTablekey = 0;
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'asfValueChanged', val: any): void (e: "asfValueChanged", val: any): void;
}>() }>();
function asfValueChanged(val:any){ function asfValueChanged(val: any) {
//console.log("childTable-asfValueChanged",val) //console.log("childTable-asfValueChanged",val)
emits("asfValueChanged",val) emits("asfValueChanged", val);
} }
</script> </script>
<template> <template>
<div class="form-table form-table-add">
<div class="form-table form-table-add"> <el-table v-bind="data.control" :class="[data.className]" :data="tableDataNew">
<el-table <el-table-column
v-bind="data.control" v-for="(item, index) in data.list"
:class="[data.className]" :key="index"
:data="tableDataNew" :prop="item.name"
> :label="item.item.label"
<el-table-column :width="item.item.span"
v-for="(item, index) in data.list" >
:key="index" <template #default="scope">
:prop="item.name" <span v-if="item.type === 'index'">{{ scope.$index + 1 }}</span>
:label="item.item.label" <div v-if="type === 4 || editDisabled">
:width="item.item.span" <LokOrgCentent
> v-if="item.type == 'orgCentent'"
<template #default="scope"> :orgid="scope.row[item.name].toString()"
/>
<span v-if="item.type === 'index'">{{ scope.$index + 1 }}</span> <div v-else-if="item.type == 'lowcodeImage'">
<div v-if="type === 4 || editDisabled"> <LowcodeImagePage :data="item" v-model="scope.row[item.name]" />
<LokOrgCentent v-if="item.type == 'orgCentent'" :orgid="scope.row[item.name].toString()" /> </div>
<div v-else-if="item.type=='lowcodeImage'"> <div v-else-if="item.type == 'upload'">
<LowcodeImagePage :data="item" <UploadPageList
v-model="scope.row[item.name]" /> :data="item"
</div> :img-list="scope.row[item.name]"
<div v-else-if="item.type=='upload'" > :control="item.control"
<UploadPageList :data="item" :img-list="scope.row[item.name]" :control="item.control" /> />
</div> </div>
<div v-else-if="item.type=='datePicker'" v-html="timeToString(scope.row[item.name],item.control.type)"> <div
</div> v-else-if="item.type == 'datePicker'"
<div v-else-if="item.type=='associatedForms'"> v-html="timeToString(scope.row[item.name], item.control.type)"
<AssociatedForms :data="item" ></div>
v-model="scope.row[item.name]" :tablekey="associatedFormsIndexTablekey" :row-index="scope.$index"/> <div v-else-if="item.type == 'associatedForms'">
</div> <AssociatedForms
<div v-else>{{ getText(scope.row[item.name],scope.row,item.name) }}</div> :data="item"
</div> v-model="scope.row[item.name]"
<div v-else> :tablekey="associatedFormsIndexTablekey"
:row-index="scope.$index"
<form-item />
v-model="scope.row[item.name]" </div>
:tProp="`${data.name}.${scope.$index}.${item.name}`" <div v-else>{{ getText(scope.row[item.name], scope.row, item.name) }}</div>
:row-index="scope.$index" </div>
:data="item" <div v-else>
@asf-value-changed="asfValueChanged" <form-item
/> v-model="scope.row[item.name]"
</div> :tProp="`${data.name}.${scope.$index}.${item.name}`"
</template> :row-index="scope.$index"
<template #header="scope" v-if="item.help"> :data="item"
{{ scope.column.label }} @asf-value-changed="asfValueChanged"
<Tooltip :content="item.help" /> />
</template> </div>
</el-table-column> </template>
<el-table-column <template #header="scope" v-if="item.help">
prop="del" {{ scope.column.label }}
label="操作" <Tooltip :content="item.help" />
v-if="[1, 2].includes(type as number) && data.config.delBtnText && !editDisabled" </template>
> </el-table-column>
<template #default="scope"> <el-table-column
<el-button link type="primary" @click="delColumn(scope.$index)">{{ data.config.delBtnText }}</el-button> prop="del"
</template> label="操作"
</el-table-column> v-if="[1, 2].includes(type as number) && data.config.delBtnText && !editDisabled"
</el-table> >
<div <template #default="scope">
class="table-btn" <el-button link type="primary" @click="delColumn(scope.$index)">{{
v-if="[1, 2].includes(type as number) && data.config.addBtnText && !editDisabled" data.config.delBtnText
> }}</el-button>
<el-button size="small" @click="addColumn">{{ data.config.addBtnText }}</el-button> </template>
</div> </el-table-column>
</div> </el-table>
<div
class="table-btn"
v-if="[1, 2].includes(type as number) && data.config.addBtnText && !editDisabled"
>
<el-button size="small" @click="addColumn">{{ data.config.addBtnText }}</el-button>
</div>
</div>
</template> </template>
<style lang='scss' scoped> <style lang="scss" scoped></style>
</style>

1031
src/components/DesignForm/tableListPage/formPageCont.vue

File diff suppressed because it is too large

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

File diff suppressed because it is too large

905
src/views/sysworkflow/lowcodepage/appCardPage.vue

@ -3,471 +3,521 @@
@ 时间: 2024-07-22 08:53:50 @ 时间: 2024-07-22 08:53:50
@ 备注: 自定义应用卡片视图 @ 备注: 自定义应用卡片视图
--> -->
<script lang='ts' setup> <script lang="ts" setup>
import { json2string,objToStringify,string2json,stringToObj } from '@/utils/DesignForm/form' import {
json2string,
objToStringify,
string2json,
stringToObj,
} from "@/utils/DesignForm/form";
import { customerFormCont } from "@/api/DesignForm/type"; import { customerFormCont } from "@/api/DesignForm/type";
import { getCustomerFormList,editProductionFormStatus,appJwtPower,getFieldRecord } from '@/api/DesignForm/requestapi' import {
getCustomerFormList,
editProductionFormStatus,
appJwtPower,
getFieldRecord,
} from "@/api/DesignForm/requestapi";
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-22 11:30:11 @ 时间: 2024-07-22 11:30:11
@ 功能: 引入组件 @ 功能: 引入组件
*/ */
import AppContainer from '@/views/sysworkflow/lowcodepage/newLowCode/appLayout/appContainer.vue' import AppContainer from "@/views/sysworkflow/lowcodepage/newLowCode/appLayout/appContainer.vue";
import AppContainerPage from '@/views/sysworkflow/lowcodepage/newLowCode/appLayoutEdit/appContainerPage.vue' // import AppContainerPage from "@/views/sysworkflow/lowcodepage/newLowCode/appLayoutEdit/appContainerPage.vue"; //
import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue" import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue";
import TableFlow from '@/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue' import TableFlow from "@/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue";
const props = defineProps({ const props = defineProps({
searchQuery:{ searchQuery: {
type:Object, type: Object,
default(){ default() {
return {} return {};
} },
}, },
appGroup:{ appGroup: {
type:String, type: String,
default:"" default: "",
}, },
drawerWith:{ drawerWith: {
type:Number, type: Number,
default:true default: true,
} },
}); });
const emits = defineEmits(["getRongQiAttr"]); const emits = defineEmits(["getRongQiAttr"]);
const openTaskDrawer = ref(false) // const openTaskDrawer = ref(false); //
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-22 09:09:29 @ 时间: 2024-07-22 09:09:29
@ 功能: 总记录数 @ 功能: 总记录数
*/ */
const pageTotal = ref(0) const pageTotal = ref(0);
const contList = ref<customerFormCont[]>() // const contList = ref<customerFormCont[]>(); //
const loadingApp = ref(false) const loadingApp = ref(false);
const runIsOpen = ref(false) const runIsOpen = ref(false);
const pickAppInfo = ref<customerFormCont>() // const pickAppInfo = ref<customerFormCont>(); //
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-03-21 10:54:23 @ 时间: 2024-03-21 10:54:23
@ 功能: 获取表单列表 @ 功能: 获取表单列表
*/ */
const getFormAppList = (val:any) => { const getFormAppList = (val: any) => {
loadingApp.value = true loadingApp.value = true;
let sendInfo = { let sendInfo = {
page:val.page, page: val.page,
pagesize:val.pagesize, pagesize: val.pagesize,
keywords:val.searchWork, keywords: val.searchWork,
groupId:props.appGroup groupId: props.appGroup,
} };
getCustomerFormList(sendInfo) getCustomerFormList(sendInfo)
.then(({ data }) => { .then(({ data }) => {
// console.log("-->",data); // console.log("-->",data);
pageTotal.value = data.total pageTotal.value = data.total;
contList.value = data.list contList.value = data.list;
}) })
.finally(() => { .finally(() => {
loadingApp.value = false loadingApp.value = false;
}) });
} };
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
getFormAppList(props.searchQuery); getFormAppList(props.searchQuery);
}) });
}) });
watch(()=>props.appGroup,()=>{ watch(
getFormAppList(props.searchQuery); () => props.appGroup,
}) () => {
const srcList = (val:string) =>{ getFormAppList(props.searchQuery);
if(val){ }
return [val] );
}else{ const srcList = (val: string) => {
return ["https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png"] if (val) {
} return [val];
} } else {
return [
"https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png",
];
}
};
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-22 09:57:45 @ 时间: 2024-07-22 09:57:45
@ 功能: 编辑应用 @ 功能: 编辑应用
*/ */
const editIsOpen = ref(false) const editIsOpen = ref(false);
const appKey = ref<string>("") const appKey = ref<string>("");
const editForm = (val:any) => { const editForm = (val: any) => {
emits("getRongQiAttr") emits("getRongQiAttr");
pickAppInfo.value = val pickAppInfo.value = val;
editIsOpen.value = true; editIsOpen.value = true;
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-22 09:58:19 @ 时间: 2024-07-22 09:58:19
@ 功能: 编辑应用状态 @ 功能: 编辑应用状态
*/ */
const eidtStatus = (val:any) => { const eidtStatus = (val: any) => {
emits("getRongQiAttr") emits("getRongQiAttr");
ElMessageBox.confirm( ElMessageBox.confirm("请问是否真的删除?删除后数据将无法找回!", "温馨提示!", {
'请问是否真的删除?删除后数据将无法找回!', confirmButtonText: "删除",
'温馨提示!', cancelButtonText: "取消",
{ type: "warning",
confirmButtonText: '删除', draggable: true,
cancelButtonText: '取消', })
type: 'warning', .then(() => {
draggable: true, editProductionFormStatus({
} id: [val.id.toString()],
) status: 3,
.then(() => { is_delete: false,
editProductionFormStatus({id:[val.id.toString()],status:3,is_delete:false}) }).then(({ data }) => {
.then(({data})=>{ getFormAppList(props.searchQuery);
getFormAppList(props.searchQuery); });
}) })
}) .catch(() => {
.catch(() => { getFormAppList(props.searchQuery);
getFormAppList(props.searchQuery); });
}) };
}
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-22 10:01:17 @ 时间: 2024-07-22 10:01:17
@ 功能: 打开应用 @ 功能: 打开应用
*/ */
const openApp = (val:any) => { const openApp = (val: any) => {
emits("getRongQiAttr") emits("getRongQiAttr");
pickAppInfo.value = val pickAppInfo.value = val;
appJwtPower({id:val.signCodeStr,types:1}) appJwtPower({ id: val.signCodeStr, types: 1 }).then(({ data }) => {
.then(({data})=>{ // console.log("------>data:",data)
// console.log("------>data:",data) if (data) {
if(data){ runIsOpen.value = true;
runIsOpen.value = true } else {
}else{ ElMessage({
ElMessage({ message: "对不起!您不可使用此App!请联系管理员进行授权!",
message: '对不起!您不可使用此App!请联系管理员进行授权!', type: "error",
type: 'error', plain: true,
plain: true, });
}) }
} });
}) };
}
defineExpose({ defineExpose({
getFormAppList getFormAppList,
}) });
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-23 15:27:51 @ 时间: 2024-07-23 15:27:51
@ 功能: 表单数据 @ 功能: 表单数据
*/ */
const state = reactive({ const state = reactive({
tableData: { tableData: {
// tableProps: {}, // // tableProps: {}, //
columns: [], columns: [],
config: {}, config: {},
controlBtn:[], controlBtn: [],
operateBtn:[] operateBtn: [],
},
searchData: [],
loading: false,
attrObj: {},
config: {
pageSize: 10,
searchIsShow: true,
searchFormIsShow: true,
openPageMode: "drawer",
},
tagList: {},
formId: props.formKey || "",
formList: [], //
name: "",
treeData: {}, //
previewVisible: false,
tabsName: "second",
formFieldList: [], //
formApi: {
type: "1",
addApiUrl: "",
editApiUrl: "",
delApiUrl: "",
lookApiUrl: "",
},
dict: {},
refreshTable: true,
view: {
list: {
status: true,
isClick: false,
form: {
sortWord: "",
sortClass: 1,
title: [],
},
},
date: {
status: false,
isClick: false,
form: {
startTime: "",
endTime: "",
dayType: 1,
title: [],
},
},
time: {
status: false,
isClick: false,
form: {
sortWord: "",
sort: 1,
title: [],
},
},
gantt: {
status: false,
isClick: false,
form: {
startTime: "",
endTime: "",
dayType: 2,
sortWord: "",
sort: 1,
title: [],
},
}, },
searchData: [], map: {
loading: false, status: false,
attrObj: {}, isClick: false,
config: { form: {
pageSize:10, mapWord: "",
searchIsShow:true, sortWord: "",
searchFormIsShow:true, sort: 1,
openPageMode:"drawer" title: [],
}, },
tagList: {}, },
formId: props.formKey || '', card: {
formList: [], // status: false,
name: '', isClick: false,
treeData: {}, // form: {
previewVisible: false, sort: 1,
tabsName: 'second', sortWord: "",
formFieldList: [], // imgWork: "",
formApi:{ imgWidth: 50,
type:"1", imgHeight: 50,
addApiUrl:"", imgBorderRadius: 5,
editApiUrl:"", imgPadding: 2,
delApiUrl:"", titleWork: "",
lookApiUrl:"" describe: "",
}, ranks: 3,
dict: {}, title: [],
refreshTable: true, },
view:{ },
list:{ },
status:true, });
isClick:false, const lookPageIsShow = ref(false);
form:{ const versionTitle = ref<string>(""); //
sortWord:"", const versionId = ref<string>(""); //
sortClass:1, const formId = ref<string>("");
title:[] const addFormIsShow = ref(false);
}
},
date:{
status:false,
isClick:false,
form:{
startTime:"",
endTime:"",
dayType:1,
title:[]
}
}
,
time:{
status:false,
isClick:false,
form:{
sortWord:"",
sort:1,
title:[]
}
}
,
gantt:{
status:false,
isClick:false,
form:{
startTime:"",
endTime:"",
dayType:2,
sortWord:"",
sort:1,
title:[]
}
}
,
map:{
status:false,
isClick:false,
form:{
mapWord:"",
sortWord:"",
sort:1,
title:[]
}
},
card:{
status:false,
isClick:false,
form:{
sort:1,
sortWord:"",
imgWork:"",
imgWidth:50,
imgHeight:50,
imgBorderRadius:5,
imgPadding:2,
titleWork:"",
describe:"",
ranks:3,
title:[]
}
}
}
})
const lookPageIsShow = ref(false)
const versionTitle = ref<string>("") //
const versionId = ref<string>("") //
const formId = ref<string>("")
const addFormIsShow = ref(false)
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-04-01 14:32:18 @ 时间: 2024-04-01 14:32:18
@ 功能: 查看表单列表 @ 功能: 查看表单列表
*/ */
const lookFormList = (val:any) => { const lookFormList = (val: any) => {
emits('getRongQiAttr') emits("getRongQiAttr");
// console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", val) // console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", val)
versionId.value = val.versionId versionId.value = val.versionId;
versionTitle.value = val.name versionTitle.value = val.name;
if(val.listjson != "" && val.listjson != null){ if (val.listjson != "" && val.listjson != null) {
lookPageIsShow.value = true lookPageIsShow.value = true;
state.formId = val.idStr state.formId = val.idStr;
let stateData = string2json(val.listjson) let stateData = string2json(val.listjson);
// console.log(val.listjson) // console.log(val.listjson)
// console.log("---->",stateData) // console.log("---->",stateData)
//let holeControlAndConfigStateData = string2json(data.data.appForm.mastesformjson) //let holeControlAndConfigStateData = string2json(data.data.appForm.mastesformjson)
if(stateData.tableData.columns&&stateData.tableData.columns.length>0){ if (stateData.tableData.columns && stateData.tableData.columns.length > 0) {
for(let i = 0;i<stateData.tableData.columns.length;i++){ for (let i = 0; i < stateData.tableData.columns.length; i++) {
if(stateData.tableData.columns[i].config!=undefined && stateData.tableData.columns[i].control!=undefined){ if (
// console.log(stateData.tableData.columns[i]) stateData.tableData.columns[i].config != undefined &&
let paramx:string = ""+stateData.tableData.columns[i].control.optionsValue3Field stateData.tableData.columns[i].control != undefined
/* ) {
// console.log(stateData.tableData.columns[i])
let paramx: string =
"" + stateData.tableData.columns[i].control.optionsValue3Field;
/*
在这里请求后台获取字段 在这里请求后台获取字段
*/ */
console.log("addCardPage---298",paramx) console.log("addCardPage---298", paramx);
if(paramx && paramx != "" && paramx != null && paramx != "undefined"){ if (paramx && paramx != "" && paramx != null && paramx != "undefined") {
getFieldRecord(paramx).then(({ data }) => { getFieldRecord(paramx).then(({ data }) => {
stateData.tableData.columns[i].options = data stateData.tableData.columns[i].options = data;
if(stateData.searchData.length>0){ if (stateData.searchData.length > 0) {
for(let j = 0;j<stateData.searchData.length;j++){ for (let j = 0; j < stateData.searchData.length; j++) {
// console.log(stateData.searchData[j]) // console.log(stateData.searchData[j])
if(stateData.searchData[j].id==stateData.tableData.columns[i].id){ if (stateData.searchData[j].id == stateData.tableData.columns[i].id) {
stateData.searchData[j].options = data stateData.searchData[j].options = data;
} }
} }
} }
}) });
} }
} }
} }
} }
state.tableData = stateData.tableData state.tableData = stateData.tableData;
state.searchData = stateData.searchData state.searchData = stateData.searchData;
state.loading = stateData.loading state.loading = stateData.loading;
state.attrObj = stateData.attrObj state.attrObj = stateData.attrObj;
state.config = stateData.config state.config = stateData.config;
state.tagList = stateData.tagList state.tagList = stateData.tagList;
state.formList = stateData.formList
state.name = stateData.name
state.treeData = stateData.treeData
state.previewVisible = stateData.previewVisible
state.formFieldList = stateData.formFieldList
state.formApi = stateData.formApi
state.dict = stateData.dict
state.refreshTable = stateData.refreshTable
}else{
openTaskDrawer.value = true
}
state.formList = stateData.formList;
state.name = stateData.name;
state.treeData = stateData.treeData;
state.previewVisible = stateData.previewVisible;
} state.formFieldList = stateData.formFieldList;
state.formApi = stateData.formApi;
state.dict = stateData.dict;
state.refreshTable = stateData.refreshTable;
} else {
openTaskDrawer.value = true;
}
};
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-03-21 10:57:11 @ 时间: 2024-03-21 10:57:11
@ 功能: 编辑表单 @ 功能: 编辑表单
*/ */
const editFormApp = (val:any) => { const editFormApp = (val: any) => {
emits('getRongQiAttr') emits("getRongQiAttr");
formId.value = val.id.toString() formId.value = val.id.toString();
addFormIsShow.value= true addFormIsShow.value = true;
// console.log("",val.id,"-",formId.value,"-",addFormIsShow.value) // console.log("",val.id,"-",formId.value,"-",addFormIsShow.value)
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-03-09 09:06:44 @ 时间: 2024-03-09 09:06:44
@ 功能: 刷新页面 @ 功能: 刷新页面
*/ */
const refreshPage = (pageType:string) =>{ const refreshPage = (pageType: string) => {
addFormIsShow.value = false; addFormIsShow.value = false;
getFormAppList(props.searchQuery); getFormAppList(props.searchQuery);
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-08-09 11:28:39 @ 时间: 2024-08-09 11:28:39
@ 功能: 翻页 @ 功能: 翻页
*/ */
const handleCurrentChange = (val:any) =>{ const handleCurrentChange = (val: any) => {
// console.log("",val) // console.log("",val)
props.searchQuery.page = val props.searchQuery.page = val;
getFormAppList(props.searchQuery); getFormAppList(props.searchQuery);
} };
</script> </script>
<template> <template>
<div> <div>
<div v-loading="loadingApp" class="content1 flex flex-wrap gap-4"> <div v-loading="loadingApp" class="content1 flex flex-wrap gap-4">
<el-card v-for="item in contList" :key="item.id" class="cardBox"> <el-card v-for="item in contList" :key="item.id" class="cardBox">
<template #header>
<template #header> <el-dropdown v-if="item.classify == 3">
<el-dropdown v-if="item.classify==3"> <span class="el-dropdown-link">
<span class="el-dropdown-link"> <el-icon><MoreFilled /></el-icon>
<el-icon><MoreFilled /></el-icon> </span>
</span> <template #dropdown>
<template #dropdown> <el-dropdown-menu>
<el-dropdown-menu> <el-dropdown-item @click="editForm(item)">编辑</el-dropdown-item>
<el-dropdown-item @click="editForm(item)" >编辑</el-dropdown-item> <el-dropdown-item @click="eidtStatus(item)" divided
<el-dropdown-item @click="eidtStatus(item)" divided>删除</el-dropdown-item> >删除</el-dropdown-item
</el-dropdown-menu> >
</template> </el-dropdown-menu>
</el-dropdown> </template>
<el-dropdown v-else> </el-dropdown>
<span class="el-dropdown-link"> <el-dropdown v-else>
<el-icon><MoreFilled /></el-icon> <span class="el-dropdown-link">
</span> <el-icon><MoreFilled /></el-icon>
<template #dropdown> </span>
<el-dropdown-menu> <template #dropdown>
<el-dropdown-item @click="editFormApp(item)" >编辑</el-dropdown-item> <el-dropdown-menu>
<el-dropdown-item @click="eidtStatus(item)" divided>删除</el-dropdown-item> <el-dropdown-item @click="editFormApp(item)">编辑</el-dropdown-item>
</el-dropdown-menu> <el-dropdown-item @click="eidtStatus(item)" divided
</template> >删除</el-dropdown-item
</el-dropdown> >
</template> </el-dropdown-menu>
<div v-if="item.classify==3" class="cardContBox" @click="openApp(item)"> </template>
<el-image </el-dropdown>
style="width: 100px; height: 100px" </template>
:src="item.icon?item.icon:'https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png'" <div v-if="item.classify == 3" class="cardContBox" @click="openApp(item)">
:zoom-rate="1.2" <el-image
:max-scale="7" style="width: 100px; height: 100px"
:min-scale="0.2" :src="
:initial-index="4" item.icon
fit="cover" ? item.icon
/> : 'https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png'
<div class="cardInfo" :style="'width: calc(100% - 100px); height: 100px; overflow: hidden;' "> "
<div class="title">{{item.name}}</div> :zoom-rate="1.2"
<div class="content">{{item.describe}}</div> :max-scale="7"
</div> :min-scale="0.2"
</div> :initial-index="4"
<div v-else class="cardContBox" @click="lookFormList(item)"> fit="cover"
<el-image />
style="width: 100px; height: 100px" <div
:src="item.icon?item.icon:'https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png'" class="cardInfo"
:zoom-rate="1.2" :style="'width: calc(100% - 100px); height: 100px; overflow: hidden;'"
:max-scale="7" >
:min-scale="0.2" <div class="title">{{ item.name }}</div>
:initial-index="4" <div class="content">{{ item.describe }}</div>
fit="cover" </div>
/>
<div class="cardInfo" :style="'width: calc(100% - 100px); height: 100px; overflow: hidden;' ">
<div class="title">{{item.name}}</div>
<div class="content">{{item.describe}}</div>
</div>
</div>
</el-card>
</div>
<div class="pagination-box">
<el-pagination background v-if="pageTotal > 0" v-model:current-page="props.searchQuery.page"
v-model:page-size="props.searchQuery.pagesize"
:total="pageTotal" @current-change="handleCurrentChange" />
</div> </div>
<AppContainer v-model:run-is-open="runIsOpen" :pick-app-info="pickAppInfo" :drawer-with="props.drawerWith" :search-query="props.searchQuery" @refreshPage="getFormAppList" /> <div v-else class="cardContBox" @click="lookFormList(item)">
<AppContainerPage v-model:edit-is-open="editIsOpen" :pick-app-info="pickAppInfo" :drawer-with="props.drawerWith" :search-query="props.searchQuery" :group-key="props.appGroup" @refreshPage="getFormAppList" /> <el-image
style="width: 100px; height: 100px"
:src="
<el-drawer item.icon
v-model="lookPageIsShow" ? item.icon
title="列表预览" : 'https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png'
direction="rtl" "
:before-close="handlePreviewClose" :zoom-rate="1.2"
:size="props.drawerWith" :max-scale="7"
> :min-scale="0.2"
<ak-page-list :initial-index="4"
:data="state.tableData" fit="cover"
:search-data="state.searchData" />
:config="state.config" <div
:form-id="state.formId" class="cardInfo"
:versionid="versionId" :style="'width: calc(100% - 100px); height: 100px; overflow: hidden;'"
:viewPage="state.view" >
:versiontitle="versionTitle" <div class="title">{{ item.name }}</div>
<div class="content">{{ item.describe }}</div>
v-model:look-page-is-show="lookPageIsShow" </div>
/> </div>
</el-drawer> </el-card>
<LowCodeFormPage v-if="addFormIsShow" :drawer-with="props.drawerWith" v-model:form-key="formId" @refreshPage="refreshPage" /> </div>
<div class="pagination-box">
<el-pagination
background
v-if="pageTotal > 0"
v-model:current-page="props.searchQuery.page"
v-model:page-size="props.searchQuery.pagesize"
:total="pageTotal"
@current-change="handleCurrentChange"
/>
</div>
<AppContainer
v-model:run-is-open="runIsOpen"
:pick-app-info="pickAppInfo"
:drawer-with="props.drawerWith"
:search-query="props.searchQuery"
@refreshPage="getFormAppList"
/>
<AppContainerPage
v-model:edit-is-open="editIsOpen"
:pick-app-info="pickAppInfo"
:drawer-with="props.drawerWith"
:search-query="props.searchQuery"
:group-key="props.appGroup"
@refreshPage="getFormAppList"
/>
<el-drawer
v-model="lookPageIsShow"
title="列表预览"
direction="rtl"
:before-close="handlePreviewClose"
:size="props.drawerWith"
>
<ak-page-list
:data="state.tableData"
:search-data="state.searchData"
:config="state.config"
:form-id="state.formId"
:versionid="versionId"
:viewPage="state.view"
:versiontitle="versionTitle"
v-model:look-page-is-show="lookPageIsShow"
/>
</el-drawer>
<LowCodeFormPage
v-if="addFormIsShow"
:drawer-with="props.drawerWith"
v-model:form-key="formId"
@refreshPage="refreshPage"
/>
<TableFlow v-model:isopen="openTaskDrawer" :versionid="versionId" :versiontitle="versionTitle" :drawerwith="props.drawerWith" @searchquery="getFormAppList" /> <TableFlow
</div> v-model:isopen="openTaskDrawer"
:versionid="versionId"
:versiontitle="versionTitle"
:drawerwith="props.drawerWith"
@searchquery="getFormAppList"
/>
</div>
</template> </template>
<style lang='scss' scoped> <style lang="scss" scoped>
.pagination-box{ .pagination-box {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-top: 15px; margin-top: 15px;
} }
.el-row:last-child { .el-row:last-child {
margin-bottom: 0; margin-bottom: 0;
@ -483,47 +533,46 @@ const handleCurrentChange = (val:any) =>{
background-color: #eeeeee; background-color: #eeeeee;
} }
.content1 {
.content1{ padding: 1rem 1rem 0 1rem;
padding:1rem 1rem 0 1rem; ::v-deep .el-card__body {
::v-deep .el-card__body{ padding: 5px 10px 10px 10px;
padding:5px 10px 10px 10px; }
} ::v-deep .el-card__header {
::v-deep .el-card__header{ border-bottom: 0;
border-bottom: 0; padding: 0;
padding: 0; height: 10px;
height: 10px; display: flex;
display:flex; justify-content: right;
justify-content: right; }
} .el-dropdown-link {
.el-dropdown-link{ margin-top: 4px;
margin-top: 4px; margin-right: 10px;
margin-right: 10px; cursor: pointer;
cursor: pointer; }
}
} }
.cardBox{ .cardBox {
width:306px; width: 306px;
.cardContBox{ .cardContBox {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: flex-start; justify-content: flex-start;
cursor: pointer; cursor: pointer;
} }
.cardInfo{ .cardInfo {
padding-left: 5px; padding-left: 5px;
} }
.title{ .title {
font-size:14px; font-size: 14px;
font-weight:bold; font-weight: bold;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.content{ .content {
color: #909399; color: #909399;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
</style> </style>

573
src/views/sysworkflow/lowcodepage/index.vue

@ -3,201 +3,198 @@
@ 时间: 2024-07-20 15:31:12 @ 时间: 2024-07-20 15:31:12
@ 备注: 应用设置 @ 备注: 应用设置
--> -->
<script lang='ts' setup> <script lang="ts" setup>
import { SearchForm,customerFormCont,customerFormConfig } from "@/api/DesignForm/type"; import { SearchForm, customerFormCont, customerFormConfig } from "@/api/DesignForm/type";
import { customerFormGroupList,editFormGroupState,createApp,gainAppEditPsge } from '@/api/DesignForm/requestapi' import {
customerFormGroupList,
editFormGroupState,
createApp,
gainAppEditPsge,
} from "@/api/DesignForm/requestapi";
import { Search } from '@element-plus/icons-vue' import { Search } from "@element-plus/icons-vue";
// //
import AppCardPage from "@/views/sysworkflow/lowcodepage/appCardPage.vue" import AppCardPage from "@/views/sysworkflow/lowcodepage/appCardPage.vue";
import AppListPage from "@/views/sysworkflow/lowcodepage/appListPage.vue" import AppListPage from "@/views/sysworkflow/lowcodepage/appListPage.vue";
import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue" import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue";
import LowCodeFormGroupPage from "@/views/sysworkflow/lowcodepage/lowCodeFormGroupPage.vue" import LowCodeFormGroupPage from "@/views/sysworkflow/lowcodepage/lowCodeFormGroupPage.vue";
import DesignAPPpage from "@/views/sysworkflow/lowcodepage/appPage/index.vue" // import DesignAPPpage from "@/views/sysworkflow/lowcodepage/appPage/index.vue"; //
const contbody = ref(); //
const contbody = ref() // const carPage = ref();
const carPage = ref() const appListPage = ref();
const appListPage = ref() const appGroup = ref("1");
const appGroup = ref("1") const page = ref<number>(1); //
const page = ref<number>(1) // const pageSize = ref<number>(12000); //
const pageSize = ref<number>(12000) // const pageTotal = ref<number>(0); //
const pageTotal = ref<number>(0) // const groupFormList = ref<any[]>([]); //
const groupFormList = ref<any[]>([]) // const drawerWith = ref(); //
const drawerWith = ref(); // const appPageShow = ref(false);
const appPageShow = ref(false) const addFormGroupIsShow = ref(false);
const addFormGroupIsShow = ref(false) const formKey = ref<string>(""); //
const formKey = ref<string>("") // const formGroupKey = ref<string>(""); //
const formGroupKey = ref<string>("") // const drawerGroupWith = ref(); //
const drawerGroupWith = ref(); // const groupKey = ref<string>(""); //
const groupKey = ref<string>("") // const squareUrl = ref<string>(
const squareUrl = ref<string>('https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png') "https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png"
);
const searchQuery = reactive({ const searchQuery = reactive({
page:1, page: 1,
pagesize:20, pagesize: 20,
searchWork:"" searchWork: "",
}) });
const isClick = ref(1) const isClick = ref(1);
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-03-21 09:30:27 @ 时间: 2024-03-21 09:30:27
@ 功能: 获取表单分组 @ 功能: 获取表单分组
*/ */
const isUpdate = ref(false) const isUpdate = ref(false);
const gainFormGroup = () => { const gainFormGroup = () => {
let sendInfo = { let sendInfo = {
page:page.value, page: page.value,
pagesize:pageSize.value, pagesize: pageSize.value,
state:1 state: 1,
} };
customerFormGroupList(sendInfo) customerFormGroupList(sendInfo).then((data) => {
.then((data) =>{ pageTotal.value = data.data.total;
// pageTotal.value = 400
pageTotal.value = data.data.total groupFormList.value = data.data.list;
// pageTotal.value = 400 console.log("重新排序", groupFormList.value);
groupFormList.value = data.data.list isUpdate.value = true;
console.log("重新排序",groupFormList.value) if (data.data.list && data.data.list.length > 0) {
isUpdate.value = true let otherGroup = true;
if(data.data.list&&data.data.list.length > 0){ data.data.list.forEach((item, index) => {
let otherGroup = true if (item.isTrue) {
data.data.list.forEach((item,index)=>{ appGroup.value = item.idStr.toString();
if(item.isTrue){ otherGroup = false;
appGroup.value = item.idStr.toString() }
otherGroup = false });
} if (otherGroup) {
}) let lengNum = data.data.list.length;
if(otherGroup){ data.data.list.forEach((item, index) => {
let lengNum = data.data.list.length if (lengNum > 1) {
data.data.list.forEach((item,index)=>{ if (index == 1) {
if(lengNum > 1){ appGroup.value = item.idStr.toString();
if(index == 1){ }
appGroup.value = item.idStr.toString() } else {
} if (index == 0) {
}else{ appGroup.value = item.idStr.toString();
if(index == 0){ }
appGroup.value = item.idStr.toString() }
} });
} }
}
}) nextTick(() => {
} searchSub();
} });
nextTick(()=>{ });
searchSub() };
}) const handleClick = (val: any) => {
}) // console.log("",val,appGroup)
};
}
const handleClick = (val:any) => {
// console.log("",val,appGroup)
}
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-22 08:50:03 @ 时间: 2024-07-22 08:50:03
@ 功能: 改变视图展示模式 @ 功能: 改变视图展示模式
*/ */
const viewChannel = (val:number) =>{ const viewChannel = (val: number) => {
isClick.value = val; isClick.value = val;
} };
onMounted(()=>{ onMounted(() => {
drawerWith.value = contbody.value?.clientWidth drawerWith.value = contbody.value?.clientWidth;
gainFormGroup() gainFormGroup();
}) });
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-20 16:19:45 @ 时间: 2024-07-20 16:19:45
@ 功能: 获取表单数据 @ 功能: 获取表单数据
*/ */
const handleCurrentChange = (val:any) => {} const handleCurrentChange = (val: any) => {};
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-07-22 10:08:33 @ 时间: 2024-07-22 10:08:33
@ 功能: 搜索 @ 功能: 搜索
*/ */
const searchSub = () =>{ const searchSub = () => {
if(isClick.value == 1){ if (isClick.value == 1) {
carPage.value.getFormAppList(searchQuery) carPage.value.getFormAppList(searchQuery);
}else{ } else {
appListPage.value.getFormAppList(searchQuery) appListPage.value.getFormAppList(searchQuery);
} }
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-04-01 14:27:51 @ 时间: 2024-04-01 14:27:51
@ 功能: 获取容器宽度 @ 功能: 获取容器宽度
*/ */
const getRongQiAttr = () => { const getRongQiAttr = () => {
drawerWith.value = contbody.value?.clientWidth drawerWith.value = contbody.value?.clientWidth;
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-03-09 09:06:32 @ 时间: 2024-03-09 09:06:32
@ 功能: 选择添加项目 @ 功能: 选择添加项目
*/ */
const handleCommand = (command: string,groupId: string) => { const handleCommand = (command: string, groupId: string) => {
// ElMessage(`click on item ${command}`) // ElMessage(`click on item ${command}`)
if (command == "addForm"){ if (command == "addForm") {
formKey.value = "" formKey.value = "";
formGroupKey.value = groupId formGroupKey.value = groupId;
// addFormIsShow.value = true // addFormIsShow.value = true
drawerWith.value = contbody.value?.clientWidth drawerWith.value = contbody.value?.clientWidth;
addFormIsShow.value = true; addFormIsShow.value = true;
}else if(command == "addFormApp"){ } else if (command == "addFormApp") {
drawerWith.value = contbody.value?.clientWidth;
drawerWith.value = contbody.value?.clientWidth let sendInfo = {
let sendInfo = { id: groupId.toString(),
id:groupId.toString() };
} createApp(sendInfo)
createApp(sendInfo) .then((data) => {
.then((data)=>{ formKey.value = data.data.uuid;
formKey.value = data.data.uuid groupKey.value = groupId.toString();
groupKey.value = groupId.toString() nextTick(() => {
nextTick(() =>{ appPageShow.value = true;
appPageShow.value = true });
}); })
}) .finally(() => {});
.finally(() => { } else {
groupKey.value = "";
}) addFormGroupIsShow.value = true;
drawerGroupWith.value = 400;
}else{ }
groupKey.value = "" };
addFormGroupIsShow.value = true
drawerGroupWith.value = 400
}
}
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-03-21 13:53:29 @ 时间: 2024-03-21 13:53:29
@ 功能: 编辑分组 @ 功能: 编辑分组
*/ */
const editFormGroup = (id: string) =>{ const editFormGroup = (id: string) => {
groupKey.value = id groupKey.value = id;
addFormGroupIsShow.value = true addFormGroupIsShow.value = true;
drawerGroupWith.value = 400 drawerGroupWith.value = 400;
} };
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ 时间: 2024-03-09 09:06:44 @ 时间: 2024-03-09 09:06:44
@ 功能: 刷新页面 @ 功能: 刷新页面
*/ */
const refreshPage = (pageType:string) =>{ const refreshPage = (pageType: string) => {
if(pageType == "formPage"){ if (pageType == "formPage") {
addFormIsShow.value = false; addFormIsShow.value = false;
}else{ } else {
addFormGroupIsShow.value = false; addFormGroupIsShow.value = false;
} }
console.log("刷新页面") console.log("刷新页面");
gainFormGroup() gainFormGroup();
};
}
/** /**
@ 作者: 秦东 @ 作者: 秦东
@ -205,134 +202,188 @@ const refreshPage = (pageType:string) =>{
@ 功能: 改变分组状态 @ 功能: 改变分组状态
*/ */
const eidtGroupStatus = (id: string, state: number) => { const eidtGroupStatus = (id: string, state: number) => {
ElMessageBox.confirm(
ElMessageBox.confirm( "您确定要删除此分组吗?一经删除!数据将不可恢复!请慎重执行此操作!!!",
'您确定要删除此分组吗?一经删除!数据将不可恢复!请慎重执行此操作!!!', "温馨提示",
'温馨提示', {
{ confirmButtonText: "确定",
confirmButtonText: '确定', cancelButtonText: "取消",
cancelButtonText: '取消', type: "warning",
type: 'warning', }
} ).then(() => {
) let sendInfo = {
.then(() => { id: id.toString(),
let sendInfo = { status: state,
id: id.toString(), };
status: state editFormGroupState(sendInfo).then((data) => {
} ElMessageBox.alert(data.msg, "温馨提示!", {
editFormGroupState(sendInfo) confirmButtonText: "确定",
.then((data) =>{ callback: (action: Action) => {
ElMessageBox.alert(data.msg, '温馨提示!', { gainFormGroup();
confirmButtonText: '确定', },
callback: (action: Action) => { });
gainFormGroup() });
} });
}); };
})
})
}
</script> </script>
<template> <template>
<div ref="contbody" class="tab-box"> <div ref="contbody" class="tab-box">
<el-tabs v-model="appGroup" :key="isUpdate" class="demo-tabs" @tab-click="handleClick"> <el-tabs
<el-tab-pane v-for="item in groupFormList" :label="item.title" :name="item.idStr"></el-tab-pane> v-model="appGroup"
:key="isUpdate"
</el-tabs> class="demo-tabs"
@tab-click="handleClick"
>
<el-tab-pane
v-for="item in groupFormList"
:label="item.title"
:name="item.idStr"
></el-tab-pane>
</el-tabs>
<div class="appSubButton">
<el-input
v-model="searchQuery.searchWork"
style="max-width: 150px; margin: 15px 10px 15px 0"
placeholder="请输入名称"
class="input-with-select"
clearable
>
<template #append>
<el-button :icon="Search" @click="searchSub()" />
</template>
</el-input>
<el-button-group class="butGroup">
<el-button
class="fa fa-object-group"
:color="isClick == 1 ? '#a0cfff' : ''"
@click="viewChannel(1)"
/>
<el-button
class="fa fa-table"
:color="isClick != 1 ? '#a0cfff' : ''"
@click="viewChannel(2)"
/>
<div class="appSubButton"> <el-dropdown>
<el-input <el-button class="fa fa-reorder leftLink" />
v-model="searchQuery.searchWork" <template #dropdown>
style="max-width: 150px;margin: 15px 10px 15px 0;" <el-dropdown-item @click="handleCommand('addFormGroup', appGroup)"
placeholder="请输入名称" >新增分组</el-dropdown-item
class="input-with-select" >
clearable <el-dropdown-item
> @click="handleCommand('addForm', appGroup)"
<template #append> style="display: none"
<el-button :icon="Search" @click="searchSub()" /> >添加表单</el-dropdown-item
</template> >
</el-input> <el-dropdown-item @click="handleCommand('addFormApp', appGroup)"
<el-button-group class="butGroup"> >添加应用</el-dropdown-item
<el-button class="fa fa-object-group" :color="isClick==1?'#a0cfff':''" @click="viewChannel(1)" /> >
<el-button class="fa fa-table" :color="isClick!=1?'#a0cfff':''" @click="viewChannel(2)" /> <el-dropdown-item @click="editFormGroup(appGroup)" divided
>编辑</el-dropdown-item
<el-dropdown> >
<el-button class="fa fa-reorder leftLink" /> <el-dropdown-item @click="eidtGroupStatus(appGroup, 3)"
<template #dropdown> >删除</el-dropdown-item
<el-dropdown-item @click="handleCommand('addFormGroup',appGroup)" >新增分组</el-dropdown-item> >
<el-dropdown-item @click="handleCommand('addForm',appGroup)" style="display:none" >添加表单</el-dropdown-item> </template>
<el-dropdown-item @click="handleCommand('addFormApp',appGroup)" >添加应用</el-dropdown-item> </el-dropdown>
<el-dropdown-item @click="editFormGroup(appGroup)" divided>编辑</el-dropdown-item> </el-button-group>
<el-dropdown-item @click="eidtGroupStatus(appGroup,3)">删除</el-dropdown-item> </div>
</template> </div>
</el-dropdown>
</el-button-group> <div class="app-container">
</div> <AppCardPage
</div> ref="carPage"
v-if="isClick == 1"
<div class="app-container"> :app-group="appGroup"
<AppCardPage ref="carPage" v-if="isClick==1" :app-group="appGroup" :search-query="searchQuery" :drawer-with="drawerWith" @getRongQiAttr="getRongQiAttr" /> :search-query="searchQuery"
<AppListPage ref="appListPage" v-else :app-group="appGroup" :search-query="searchQuery" :drawer-with="drawerWith" @getRongQiAttr="getRongQiAttr" /> :drawer-with="drawerWith"
</div> @getRongQiAttr="getRongQiAttr"
<DesignAPPpage v-model:is-show="appPageShow" :drawer-with="drawerWith" v-model:form-key="formKey" :group-key="groupKey" @refreshPage="refreshPage" /> />
<AppListPage
<LowCodeFormPage v-if="addFormIsShow" :drawer-with="drawerWith" v-model:form-key="formKey" :form-group-key="formGroupKey" @refreshPage="refreshPage" /> ref="appListPage"
<LowCodeFormGroupPage v-if="addFormGroupIsShow" :drawer-with="drawerGroupWith" :group-key="groupKey" @refreshPage="refreshPage" /> v-else
:app-group="appGroup"
:search-query="searchQuery"
:drawer-with="drawerWith"
@getRongQiAttr="getRongQiAttr"
/>
</div>
<DesignAPPpage
v-model:is-show="appPageShow"
:drawer-with="drawerWith"
v-model:form-key="formKey"
:group-key="groupKey"
@refreshPage="refreshPage"
/>
<LowCodeFormPage
v-if="addFormIsShow"
:drawer-with="drawerWith"
v-model:form-key="formKey"
:form-group-key="formGroupKey"
@refreshPage="refreshPage"
/>
<LowCodeFormGroupPage
v-if="addFormGroupIsShow"
:drawer-with="drawerGroupWith"
:group-key="groupKey"
@refreshPage="refreshPage"
/>
</template> </template>
<style lang='scss' scoped> <style lang="scss" scoped>
.app-container { .app-container {
height: calc(100% - 125px); height: calc(100% - 125px);
width: calc(100% - 40px); width: calc(100% - 40px);
overflow: hidden; overflow: hidden;
overflow-y: auto; overflow-y: auto;
padding-bottom:10px; padding-bottom: 10px;
} }
.tab-box{ .tab-box {
margin: 20px; margin: 20px;
height: 63px;
background: #fff;
border-radius: 5px;
padding: 0 20px;
display: flex;
justify-content: space-between;
.appSubButton {
display: flex;
justify-content: space-between;
.butGroup {
margin-top: 15px;
}
.leftLink {
border-left: 1px solid #ccc;
}
}
::v-deep(.el-tabs) {
height: 63px;
width: calc(100% - 300px);
}
::v-deep(.el-tabs__nav) {
height: 63px; height: 63px;
background: #fff; font-size: 16px;
border-radius: 5px; }
padding: 0 20px; ::v-deep(.el-tabs__item) {
display: flex; margin-top: 15px;
justify-content: space-between; font-size: 16px;
.appSubButton{ }
display: flex; ::v-deep(.el-tabs__nav-prev) {
justify-content: space-between; line-height: 0px;
.butGroup{ margin-top: 30px;
margin-top: 15px; }
} ::v-deep(.el-tabs__nav-next) {
.leftLink{ line-height: 0px;
border-left : 1px solid #ccc; margin-top: 30px;
} }
}
::v-deep(.el-tabs){
height: 63px;
width: calc(100% - 300px);
}
::v-deep(.el-tabs__nav){
height: 63px;
font-size: 16px;
}
::v-deep(.el-tabs__item){
margin-top: 15px;
font-size: 16px;
}
::v-deep(.el-tabs__nav-prev){
line-height:0px;
margin-top:30px;
}
::v-deep(.el-tabs__nav-next){
line-height:0px;
margin-top:30px;
}
} }
.el-dropdown-link{ .el-dropdown-link {
font-size:30px; font-size: 30px;
margin-top: 20px; margin-top: 20px;
margin-left: 10px; margin-left: 10px;
} }
</style> </style>

438
src/views/taskplatform/taskmanagement/lookFlowInfoApp.vue

@ -3,216 +3,268 @@
@ 时间: 2024-06-17 15:30:36 @ 时间: 2024-06-17 15:30:36
@ 备注: App执行任务 @ 备注: App执行任务
--> -->
<script lang='ts' setup> <script lang="ts" setup>
import { submitButton, afreshSubmitButton,editFormCont,draftSubmitButton,editLookFormCont } from "@/utils/workflow/const";
import { import {
json2string, submitButton,
objToStringify, afreshSubmitButton,
string2json, editFormCont,
stringToObj draftSubmitButton,
} from '@/utils/DesignForm/form' editLookFormCont,
} from "@/utils/workflow/const";
import { haveCustomerFormVersion,generateFlow,gainTaskFormInfo,gainEditDataLog } from '@/api/taskapi/management' import {
json2string,
objToStringify,
string2json,
stringToObj,
} from "@/utils/DesignForm/form";
import RunFlowStepApp from '@/views/taskplatform/taskmanagement/runFlowStepApp.vue' import {
haveCustomerFormVersion,
generateFlow,
gainTaskFormInfo,
gainEditDataLog,
} from "@/api/taskapi/management";
import { judgeSubmitCancel,startRunFlow,afreshRunFlow,onlyPublishFlow,gainEditFormFlowInfo } from '@/api/DesignForm/requestapi' import RunFlowStepApp from "@/views/taskplatform/taskmanagement/runFlowStepApp.vue";
import {
judgeSubmitCancel,
startRunFlow,
afreshRunFlow,
onlyPublishFlow,
gainEditFormFlowInfo,
} from "@/api/DesignForm/requestapi";
import FlowStep from '@/views/taskplatform/taskmanagement/flowStep.vue' import FlowStep from "@/views/taskplatform/taskmanagement/flowStep.vue";
const props = defineProps({ const props = defineProps({
isshow:{ isshow: {
type:Boolean, type: Boolean,
default:true default: true,
}, },
drawerWith:{ drawerWith: {
type:Number, type: Number,
default:0 default: 0,
}, },
flowLogInfo:{ flowLogInfo: {
type:Object, type: Object,
default(){ default() {
return {} return {};
} },
}, },
operState:{ operState: {
type:Number, type: Number,
default:1 default: 1,
} },
}) });
const flowAry = ref<any[]>(); const flowAry = ref<any[]>();
const emits = defineEmits(["update:isshow","getmytodolist"]); const emits = defineEmits(["update:isshow", "getmytodolist"]);
const isOpen = computed({ const isOpen = computed({
get: () => props.isshow, get: () => props.isshow,
set: (val) => { set: (val) => {
emits("update:isshow", val); emits("update:isshow", val);
}, },
}); });
const logistrue = ref(false) const logistrue = ref(false);
const formLoading = ref(false) const formLoading = ref(false);
const loadingData = ref(false) // const loadingData = ref(false); //
const flowLoading = ref(false) // const flowLoading = ref(false); //
const versiontitle = ref<any>("") const versiontitle = ref<any>("");
const flowMap = ref<any>() const flowMap = ref<any>();
const nextStep = ref(0) const nextStep = ref(0);
const nodeKey = ref<string>(''); const nodeKey = ref<string>("");
const currentProgress = ref<number>(1); const currentProgress = ref<number>(1);
const newLogAry = ref<any>("") const newLogAry = ref<any>("");
const oldLogAry = ref<any>("") const oldLogAry = ref<any>("");
const newDataLen = ref<number>(0); const newDataLen = ref<number>(0);
// //
const formState = reactive({ const formState = reactive({
formData: { formData: {
list: [], list: [],
form: {}, form: {},
config: {} config: {},
}, },
dict: {}, dict: {},
formId: 25, formId: 25,
id: 1, id: 1,
loading: true loading: true,
}) });
const formEl = ref<any>() const formEl = ref<any>();
const drawerBeforeClose = () => { const drawerBeforeClose = () => {
// console.log("",false) // console.log("",false)
emits("getmytodolist") emits("getmytodolist");
emits("update:isshow", false); emits("update:isshow", false);
} };
onMounted(()=>{ onMounted(() => {
versiontitle.value = props.flowLogInfo.title versiontitle.value = props.flowLogInfo.title;
flowMap.value = JSON.parse(props.flowLogInfo.flowcont) flowMap.value = JSON.parse(props.flowLogInfo.flowcont);
// console.log("",props.flowLogInfo) // console.log("",props.flowLogInfo)
gainFormData() gainFormData();
}) });
const pageLog = ref<any[]>([]) const pageLog = ref<any[]>([]);
// //
const gainFormData = () =>{ const gainFormData = () => {
formLoading.value = true; formLoading.value = true;
// console.log("--->",props.flowLogInfo) // console.log("--->",props.flowLogInfo)
nextStep.value = props.flowLogInfo.nextStep nextStep.value = props.flowLogInfo.nextStep;
nodeKey.value = props.flowLogInfo.nodeKey; nodeKey.value = props.flowLogInfo.nodeKey;
currentProgress.value = props.flowLogInfo.currentStep currentProgress.value = props.flowLogInfo.currentStep;
// console.log("props.flowLogInfo--5-------->",props.flowLogInfo.mastesform) // console.log("props.flowLogInfo--5-------->",props.flowLogInfo.mastesform)
formState.formData = stringToObj(props.flowLogInfo.mastesform) formState.formData = stringToObj(props.flowLogInfo.mastesform);
gainTaskFormInfo({ id: props.flowLogInfo.mastersKeyStr}) gainTaskFormInfo({ id: props.flowLogInfo.mastersKeyStr })
.then((data:any)=>{ .then((data: any) => {
if(data.data.logistrue){ if (data.data.logistrue) {
formState.formData.list.push(editLookFormCont) formState.formData.list.push(editLookFormCont);
} }
// console.log("res----------->",data) // console.log("res----------->",data)
formEl.value.setValue(data.data.masterDataInfo) formEl.value.setValue(data.data.masterDataInfo);
newLogAry.value = data.data.newData newLogAry.value = data.data.newData;
oldLogAry.value = data.data.oldData oldLogAry.value = data.data.oldData;
logistrue.value = data.data.logistrue logistrue.value = data.data.logistrue;
newDataLen.value = data.data.newDataLen newDataLen.value = data.data.newDataLen;
formLoading.value = false; formLoading.value = false;
nextTick(()=>{ nextTick(() => {
// console.log("-1111-->",data.data.tableData) // console.log("-1111-->",data.data.tableData)
formEl.value.setValue(data.data.tableData) formEl.value.setValue(data.data.tableData);
}) });
}) })
.finally(()=>{ .finally(() => {
formLoading.value = false; formLoading.value = false;
gainEditDataLog({id:props.flowLogInfo.mastersKeyStr}) gainEditDataLog({ id: props.flowLogInfo.mastersKeyStr }).then(({ data }) => {
.then(({data})=>{ // console.log("-1111-->",data)
// console.log("-1111-->",data) pageLog.value = data;
pageLog.value = data });
}); });
}) // haveCustomerFormVersion({id:props.flowLogInfo.version_id.toString()})
// haveCustomerFormVersion({id:props.flowLogInfo.version_id.toString()}) // .then(({ data }) =>{
// .then(({ data }) =>{
// formState.dict = string2json(data.dict)
// judgeSubmitCancel({"name":data.mastesformjson})
// .then((dataBut:any) =>{
// if(dataBut.code == 0){
// formState.formData.list.push(afreshSubmitButton)
// // console.log("res----------->",dataBut,props.operState)
// // if (dataBut.data == 3 || dataBut.data == 4){
// // formInfo.formData.list.push(editFormCont)
// // }
// }
// })
// })
// .finally(() => {
// formLoading.value = false;
// formEl
// })
}
</script>
<template>
<el-drawer v-model="isOpen" v-loading="loadingData" element-loading-my-text="Loading..." :title="versiontitle" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" :size="props.drawerWith" class="drawerClass" :before-close="drawerBeforeClose">
<table border="0" class="tableFlowBox">
<tr>
<td valign="top">
<div class="drawerFormBox boxLeft">
<ak-form
ref="formEl"
v-loading="formLoading" element-loading-text="Loading..."
:form-data="formState.formData"
:type="formType"
:dict="formState.dict"
request-url="getFormContent"
add-url="saveFormContent"
edit-url="editFormContent"
:before-submit="beforeSubmit"
:close-app-submit="closeAppSubmit"
:change-key-val="changeKeyVal"
:anew-submit = "anewSubmit"
:save-edit-form-info="saveEditFormInfo"
:send-draft-submit= "sendDraftSubmit"
/>
<el-divider v-if="pageLog&&pageLog.length > 0" content-position="left">历史2记录</el-divider>
<el-timeline>
<el-timeline-item v-for="(item,index) in pageLog" :key="index" :timestamp="item.time+' 操作人:'+item.creater" placement="top">
<el-card>
<el-descriptions border>
<el-descriptions-item v-for="(mastItem,mastIndex) in item.masterdata" :key="mastIndex" :label="mastIndex">
{{mastItem}}
</el-descriptions-item>
</el-descriptions>
<el-tabs v-if="item.sunList" type="border-card" style="margin-top:20px;">
<el-tab-pane v-for="(sonItem,sonIndex) in item.sunList" :label="sonIndex" :key="sonIndex">
<el-descriptions v-for="(sonVal,sonIndex) in sonItem" :key="sonIndex" border>
<el-descriptions-item v-for="(sonCentor,sonKey) in sonVal" :key="sonKey" :label="sonKey"> {{sonCentor}}
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
</el-tabs>
<table style="margin-top:20px;">
<tr>
<td class="biankuang" width="100">修改说明</td>
<td class="biankuang">{{item.explicate}}</td>
</tr>
</table>
</el-card>
</el-timeline-item>
</el-timeline>
// formState.dict = string2json(data.dict)
// judgeSubmitCancel({"name":data.mastesformjson})
// .then((dataBut:any) =>{
// if(dataBut.code == 0){
// formState.formData.list.push(afreshSubmitButton)
// // console.log("res----------->",dataBut,props.operState)
// // if (dataBut.data == 3 || dataBut.data == 4){
// // formInfo.formData.list.push(editFormCont)
// // }
// }
// })
// })
// .finally(() => {
// formLoading.value = false;
</div> // formEl
// })
</td> };
<td valign="top" width="350"> </script>
<RunFlowStepApp ref="runstep" v-model:flowary="flowAry" :flow-key="props.flowLogInfo.idStr" :current-progress="currentProgress" @updatelist="drawerBeforeClose" /> <template>
</td> <el-drawer
</tr> v-model="isOpen"
</table> v-loading="loadingData"
element-loading-my-text="Loading..."
</el-drawer> :title="versiontitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
:size="props.drawerWith"
class="drawerClass"
:before-close="drawerBeforeClose"
>
<table border="0" class="tableFlowBox">
<tr>
<td valign="top">
<div class="drawerFormBox boxLeft">
<ak-form
ref="formEl"
v-loading="formLoading"
element-loading-text="Loading..."
:form-data="formState.formData"
:type="formType"
:dict="formState.dict"
request-url="getFormContent"
add-url="saveFormContent"
edit-url="editFormContent"
:before-submit="beforeSubmit"
:close-app-submit="closeAppSubmit"
:change-key-val="changeKeyVal"
:anew-submit="anewSubmit"
:save-edit-form-info="saveEditFormInfo"
:send-draft-submit="sendDraftSubmit"
/>
<el-divider v-if="pageLog && pageLog.length > 0" content-position="left"
>历史2记录</el-divider
>
<el-timeline>
<el-timeline-item
v-for="(item, index) in pageLog"
:key="index"
:timestamp="item.time + ' 操作人:' + item.creater"
placement="top"
>
<el-card>
<el-descriptions border>
<el-descriptions-item
v-for="(mastItem, mastIndex) in item.masterdata"
:key="mastIndex"
:label="mastIndex"
>
{{ mastItem }}
</el-descriptions-item>
</el-descriptions>
<el-tabs
v-if="item.sunList"
type="border-card"
style="margin-top: 20px"
>
<el-tab-pane
v-for="(sonItem, sonIndex) in item.sunList"
:label="sonIndex"
:key="sonIndex"
>
<el-descriptions
v-for="(sonVal, sonIndex) in sonItem"
:key="sonIndex"
border
>
<el-descriptions-item
v-for="(sonCentor, sonKey) in sonVal"
:key="sonKey"
:label="sonKey"
>
{{ sonCentor }}
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
</el-tabs>
<table style="margin-top: 20px">
<tr>
<td class="biankuang" width="100">修改说明</td>
<td class="biankuang">{{ item.explicate }}</td>
</tr>
</table>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
</td>
<td valign="top" width="350">
<RunFlowStepApp
ref="runstep"
v-model:flowary="flowAry"
:flow-key="props.flowLogInfo.idStr"
:current-progress="currentProgress"
@updatelist="drawerBeforeClose"
/>
</td>
</tr>
</table>
</el-drawer>
</template> </template>
<style lang='scss' scoped> <style lang="scss" scoped>
.biankuang{ .biankuang {
border: 1px solid #D4D7DE; border: 1px solid #d4d7de;
padding:10px 10px; padding: 10px 10px;
} }
</style> </style>

196
vite.config.ts.timestamp-1731975545563-47f159282f4b9.mjs

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save