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
@ 备注: 卡片视图
-->
<script lang='ts' setup>
import type { ComponentSize } from 'element-plus'
import { gainFormPageListCont } from '@/api/DesignForm/requestapi'
import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue'
<script lang="ts" setup>
import type { ComponentSize } from "element-plus";
import { gainFormPageListCont } from "@/api/DesignForm/requestapi";
import FormPageCont from "@/components/DesignForm/tableListPage/formPageCont.vue";
const props = defineProps({
searchSend:{
type:Object,
default(){
return {}
}
},
viewSetup:{
type:Object,
default(){
return {}
}
},
columnsFilter:{
type:Object,
default(){
return {}
}
},
drawerWith:{
type:Number,
default:0
}
searchSend: {
type: Object,
default() {
return {};
},
},
viewSetup: {
type: Object,
default() {
return {};
},
},
columnsFilter: {
type: Object,
default() {
return {};
},
},
drawerWith: {
type: Number,
default: 0,
},
});
const size = ref<ComponentSize>('default')
const lineRanks = ref(1)
const size = ref<ComponentSize>("default");
const lineRanks = ref(1);
const imgBox = computed(() => {
let cssStyle:any = {}
if(props.viewSetup.form.imgWidth != 0){
cssStyle['width'] = props.viewSetup.form.imgWidth + "px";
}else{
cssStyle['width'] = "50px";
}
if(props.viewSetup.form.imgHeight != 0){
cssStyle['height'] = props.viewSetup.form.imgHeight + "px";
}else{
cssStyle['height'] = "50px";
}
return cssStyle
})
let cssStyle: any = {};
if (props.viewSetup.form.imgWidth != 0) {
cssStyle["width"] = props.viewSetup.form.imgWidth + "px";
} else {
cssStyle["width"] = "50px";
}
if (props.viewSetup.form.imgHeight != 0) {
cssStyle["height"] = props.viewSetup.form.imgHeight + "px";
} else {
cssStyle["height"] = "50px";
}
return cssStyle;
});
/**
@ 作者: 秦东
@ 时间: 2024-07-18 14:26:46
@ 功能: 图像设定Css
*/
const imgStyle = computed(() => {
let cssStyle:any = {}
cssStyle['border'] = "1px solid #ccc";
cssStyle['border-radius'] = props.viewSetup.form.imgBorderRadius + "px";
cssStyle['padding'] = props.viewSetup.form.imgPadding + "px";
if(props.viewSetup.form.imgWidth != 0){
cssStyle['width'] = props.viewSetup.form.imgWidth + "px";
}else{
cssStyle['width'] = "50px";
}
if(props.viewSetup.form.imgHeight != 0){
cssStyle['height'] = props.viewSetup.form.imgHeight + "px";
}else{
cssStyle['height'] = "50px";
}
// console.log("",cssStyle)
return cssStyle
})
let cssStyle: any = {};
cssStyle["border"] = "1px solid #ccc";
cssStyle["border-radius"] = props.viewSetup.form.imgBorderRadius + "px";
cssStyle["padding"] = props.viewSetup.form.imgPadding + "px";
if (props.viewSetup.form.imgWidth != 0) {
cssStyle["width"] = props.viewSetup.form.imgWidth + "px";
} else {
cssStyle["width"] = "50px";
}
if (props.viewSetup.form.imgHeight != 0) {
cssStyle["height"] = props.viewSetup.form.imgHeight + "px";
} else {
cssStyle["height"] = "50px";
}
// console.log("",cssStyle)
return cssStyle;
});
/**
@ 作者: 秦东
@ -79,204 +79,222 @@ const imgStyle = computed(() => {
@ 功能: 内容设定css
*/
const cardInfoBox = computed(() => {
let cssStyle:any = {}
cssStyle['width'] = (Math.round(24/props.viewSetup.form.ranks) - props.viewSetup.form.imgWidth) + "px";
return cssStyle
})
onMounted(()=>{
lineRanks.value = Math.round(24/props.viewSetup.form.ranks)
nextTick(()=>{
getCardList(props.searchSend)
})
})
let cssStyle: any = {};
cssStyle["width"] =
Math.round(24 / props.viewSetup.form.ranks) - props.viewSetup.form.imgWidth + "px";
return cssStyle;
});
onMounted(() => {
lineRanks.value = Math.round(24 / props.viewSetup.form.ranks);
nextTick(() => {
getCardList(props.searchSend);
});
});
// const url = ref()
// const srcList = ref([])
const handleSizeChange = (val: number) => {
// console.log(`${val} items per page`)\
props.searchSend.page = 1
props.searchSend.pagesize = val
// console.log(props.searchSend.pagesize)
getCardList(props.searchSend)
}
// console.log(`${val} items per page`)\
props.searchSend.page = 1;
props.searchSend.pagesize = val;
// console.log(props.searchSend.pagesize)
getCardList(props.searchSend);
};
const handleCurrentChange = (val: number) => {
// console.log(`current page: ${val}`)
props.searchSend.page = val
getCardList(props.searchSend)
}
// console.log(`current page: ${val}`)
props.searchSend.page = val;
getCardList(props.searchSend);
};
const url =
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'
const srcList = (url:string) =>{
return [url]
return [
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg',
'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg',
'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg',
'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg',
]
}
const cardDataList = ref([]) //
const totalNum = ref(0)
const url = "https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg";
const srcList = (url: string) => {
return [url];
return [
"https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg",
"https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg",
"https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg",
"https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg",
"https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg",
"https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg",
"https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg",
];
};
const cardDataList = ref([]); //
const totalNum = ref(0);
/**
@ 作者: 秦东
@ 时间: 2024-07-19 09:32:11
@ 功能: 获取数据
*/
const getCardList = (val:any) => {
val.viewClass = {
class:"card"
}
gainFormPageListCont(val)
.then(({data})=>{
totalNum.value = data.total
// console.log("--",data)
cardDataList.value = data.list
})
}
const getCardList = (val: any) => {
val.viewClass = {
class: "card",
};
gainFormPageListCont(val).then(({ data }) => {
totalNum.value = data.total;
// console.log("--",data)
cardDataList.value = data.list;
});
};
defineExpose({
getCardList
})
getCardList,
});
/**
@ 作者: 秦东
@ 时间: 2024-07-19 10:03:53
@ 功能: 获取图片显示
*/
const imgSrcPath = (val:any) => {
// console.log("", val[props.viewSetup.form.imgWork])
if(val[props.viewSetup.form.imgWork]){
return val[props.viewSetup.form.imgWork]
}
return ""
}
const imgSrcPath = (val: any) => {
// console.log("", val[props.viewSetup.form.imgWork])
if (val[props.viewSetup.form.imgWork]) {
return val[props.viewSetup.form.imgWork];
}
return "";
};
/**
@ 作者: 秦东
@ 时间: 2024-07-19 10:03:53
@ 功能: 获取图片数组显示
*/
const imgSrcAry = (val:any) => {
if(val[props.viewSetup.form.imgWork]){
if (val[props.viewSetup.form.imgWork] != ""){
return [val[props.viewSetup.form.imgWork]]
}else{
return []
}
}
return []
}
const imgSrcAry = (val: any) => {
if (val[props.viewSetup.form.imgWork]) {
if (val[props.viewSetup.form.imgWork] != "") {
return [val[props.viewSetup.form.imgWork]];
} else {
return [];
}
}
return [];
};
/**
@ 作者: 秦东
@ 时间: 2024-07-19 10:24:33
@ 功能: 获取内容
*/
const cardInfo = (val:any,cla:string) => {
if(cla=="title"){
if(props.viewSetup.form.title){
var titleAry = [];
if(props.viewSetup.form.title.length > 0){
props.viewSetup.form.title.forEach((item,index)=>{
// console.log("--"+index+"-->",val[item])
if(val[item]){
titleAry.push(val[item])
}
})
}
if(titleAry.length>0){
return titleAry.join()
}else{
let firstWord = ""
let powerAry = ["id","creater_time","edit_time","masters_key","states","flow_id"];
for (let key in val) {
if (val.hasOwnProperty(key)) {
if(!powerAry.includes(key)){
if(val[key] != '' && val[key] != null){
firstWord = val[key]
}
}
}
}
return firstWord
}
}
if(val[props.viewSetup.form.titleWork]){
return val[props.viewSetup.form.titleWork]
}
}else if(cla=="content"){
if(val[props.viewSetup.form.describe]){
return val[props.viewSetup.form.describe]
}
}
return ""
}
const cardInfo = (val: any, cla: string) => {
if (cla == "title") {
if (props.viewSetup.form.title) {
var titleAry = [];
if (props.viewSetup.form.title.length > 0) {
props.viewSetup.form.title.forEach((item, index) => {
// console.log("--"+index+"-->",val[item])
if (val[item]) {
titleAry.push(val[item]);
}
});
}
if (titleAry.length > 0) {
return titleAry.join();
} else {
let firstWord = "";
let powerAry = [
"id",
"creater_time",
"edit_time",
"masters_key",
"states",
"flow_id",
];
for (let key in val) {
if (val.hasOwnProperty(key)) {
if (!powerAry.includes(key)) {
if (val[key] != "" && val[key] != null) {
firstWord = val[key];
}
}
}
}
return firstWord;
}
}
if (val[props.viewSetup.form.titleWork]) {
return val[props.viewSetup.form.titleWork];
}
} else if (cla == "content") {
if (val[props.viewSetup.form.describe]) {
return val[props.viewSetup.form.describe];
}
}
return "";
};
/**
@ 作者: 秦东
@ 时间: 2024-04-03 13:24:06
@ 功能: 查看详细内容
*/
const tablePageClass = ref(1)
const lookPageInfoIsShow = ref(false)
const pageInfoCont = ref<any>()
const lookPageInfo = (val:any) => {
tablePageClass.value = 4;
pageInfoCont.value = val
lookPageInfoIsShow.value = true;
}
const tablePageClass = ref(1);
const lookPageInfoIsShow = ref(false);
const pageInfoCont = ref<any>();
const lookPageInfo = (val: any) => {
tablePageClass.value = 4;
pageInfoCont.value = val;
lookPageInfoIsShow.value = true;
};
</script>
<template>
<div>
<el-row :gutter="20">
<el-col v-for="item in cardDataList" :key="item.id" :span="lineRanks" class="cardBox">
<el-card @click="lookPageInfo(item)">
<div class="cardContBox">
<el-image
:style="imgStyle"
:src="imgSrcPath(item)"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:preview-src-list="imgSrcAry(item)"
:initial-index="4"
fit="cover"
/>
<div class="cardInfo" :style="'width: calc(100% - '+props.viewSetup.form.imgWidth+'px); height:'+props.viewSetup.form.imgHeight+'px; overflow: hidden;' ">
<div class="title">{{ cardInfo(item,"title") }}</div>
<div class="content">{{ cardInfo(item,"content") }}</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
<div class="pageBox">
<el-pagination
v-model:current-page="props.searchSend.page"
v-model:page-size="props.searchSend.pagesize"
:page-sizes="[3, 9, 12, 30, 50, 100]"
:size="size"
:background="true"
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>
<div>
<el-row :gutter="20">
<el-col
v-for="item in cardDataList"
:key="item.id"
:span="lineRanks"
class="cardBox"
>
<el-card @click="lookPageInfo(item)">
<div class="cardContBox">
<el-image
:style="imgStyle"
:src="imgSrcPath(item)"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:preview-src-list="imgSrcAry(item)"
:initial-index="4"
fit="cover"
/>
<div
class="cardInfo"
:style="
'width: calc(100% - ' +
props.viewSetup.form.imgWidth +
'px); height:' +
props.viewSetup.form.imgHeight +
'px; overflow: hidden;'
"
>
<div class="title">{{ cardInfo(item, "title") }}</div>
<div class="content">{{ cardInfo(item, "content") }}</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
<div class="pageBox">
<el-pagination
v-model:current-page="props.searchSend.page"
v-model:page-size="props.searchSend.pagesize"
:page-sizes="[3, 9, 12, 30, 50, 100]"
:size="size"
:background="true"
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>
<style lang='scss' scoped>
<style lang="scss" scoped>
.demo-image__error .image-slot {
font-size: 30px;
}
@ -287,40 +305,39 @@ const lookPageInfo = (val:any) => {
width: 100%;
height: 200px;
}
.cardBox{
padding: 10px 0 5px 0;
:deep .el-card__body{
padding:10px;
}
.title{
font-size:14px;
font-weight:bold;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
.content{
color: #909399;
overflow: hidden;
text-overflow: ellipsis;
}
.cardContBox{
display: flex;
width: 100%;
justify-content: flex-start;
}
.cardInfo{
padding-left: 5px;
}
.cardBox {
padding: 10px 0 5px 0;
:deep .el-card__body {
padding: 10px;
}
.title {
font-size: 14px;
font-weight: bold;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
.content {
color: #909399;
overflow: hidden;
text-overflow: ellipsis;
}
.cardContBox {
display: flex;
width: 100%;
justify-content: flex-start;
}
.cardInfo {
padding-left: 5px;
}
}
.pageBox{
display:flex;
justify-content: center;
width: 100%;
text-align: center;
margin-top: 10px;
.pageBox {
display: flex;
justify-content: center;
width: 100%;
text-align: center;
margin-top: 10px;
}
</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
@ 备注: 表单子表
-->
<script lang='ts' setup>
import FormItem from './formItem.vue'
import { inject, computed } from 'vue'
import Tooltips from '@/components/DesignForm/tooltip.vue'
import {constFormProps } from '@/api/DesignForm/utils'
import { jsonParseStringify } from '@/utils/DesignForm'
import LowcodeImagePage from '@/components/DesignForm/public/expand/lowcodeImage.vue'
import AssociatedForms from '@/widget/associatedforms/index.vue'
import UploadPageList from '@/components/DesignForm/public/expand/uploadPageList.vue'
import LokOrgCentent from '@/widget/org/cont.vue'
import { SCOPE } from 'element-plus'
<script lang="ts" setup>
import FormItem from "./formItem.vue";
import { inject, computed } from "vue";
import Tooltips from "@/components/DesignForm/tooltip.vue";
import { constFormProps } from "@/api/DesignForm/utils";
import { jsonParseStringify } from "@/utils/DesignForm";
import LowcodeImagePage from "@/components/DesignForm/public/expand/lowcodeImage.vue";
import AssociatedForms from "@/widget/associatedforms/index.vue";
import UploadPageList from "@/components/DesignForm/public/expand/uploadPageList.vue";
import LokOrgCentent from "@/widget/org/cont.vue";
import { SCOPE } from "element-plus";
const props = withDefaults(
defineProps<{
data: any
}>(),
{
data: () => {
return {}
}
}
)
const formProps = inject(constFormProps, {}) as any
defineProps<{
data: any;
}>(),
{
data: () => {
return {};
},
}
);
const formProps = inject(constFormProps, {}) as any;
const tableDataNew = computed(() => {
// console.log("-----1---->",props.data.name)
// console.log("-----2---->",formProps.value.model[props.data.name])
// console.log("-----3---->",formProps.value.model)
// console.log("-----4---->",formProps.value)
return formProps.value.model[props.data.name]
})
// console.log("-----1---->",props.data.name)
// console.log("-----2---->",formProps.value.model[props.data.name])
// console.log("-----3---->",formProps.value.model)
// console.log("-----4---->",formProps.value)
return formProps.value.model[props.data.name];
});
const type = computed(() => {
return formProps.value.type
})
return formProps.value.type;
});
// true
const editDisabled = computed(() => {
return formProps.value.type === 2 && props.data.config?.editDisabled
})
return formProps.value.type === 2 && props.data.config?.editDisabled;
});
const addColumn = () => {
// console.log("--------->",tableDataNew.value)
const temp: any = {}
if (props.data.list) {
props.data.list.forEach((item: any) => {
if (item.name) {
temp[item.name] = item.control.modelValue
}
})
tableDataNew.value.push(jsonParseStringify(temp))
}
}
const getText = (text: any,val:any,name:any) => {
console.log("text===>",text)
console.log("name===>",name)
console.log("val===>",val)
if (typeof text === 'string') {
return text
} else {
return text && text.toString()
}
}
// console.log("--------->",tableDataNew.value)
const temp: any = {};
if (props.data.list) {
props.data.list.forEach((item: any) => {
if (item.name) {
temp[item.name] = item.control.modelValue;
}
});
tableDataNew.value.push(jsonParseStringify(temp));
}
};
const getText = (text: any, val: any, name: any) => {
console.log("text===>", text);
console.log("name===>", name);
console.log("val===>", val);
if (typeof text === "string") {
return text;
} else {
return text && text.toString();
}
};
const delColumn = (index: number) => {
tableDataNew.value.splice(index, 1)
}
tableDataNew.value.splice(index, 1);
};
/**
@ 作者: 秦东
@ 时间: 2024-08-02 13:22:14
@ 功能: 时间戳转换对象
*/
const timeToAry = (timestamp:number) => {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = ('0' + (date.getMonth() + 1)).slice(-2);
const day = ('0' + date.getDate()).slice(-2);
const hours = ('0' + date.getHours()).slice(-2);
const minutes = ('0' + date.getMinutes()).slice(-2);
const seconds = ('0' + date.getSeconds()).slice(-2);
return {
year:year,
month:month,
day:day,
hours:hours,
minutes:minutes,
seconds
}
}
const timeToAry = (timestamp: number) => {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = ("0" + (date.getMonth() + 1)).slice(-2);
const day = ("0" + date.getDate()).slice(-2);
const hours = ("0" + date.getHours()).slice(-2);
const minutes = ("0" + date.getMinutes()).slice(-2);
const seconds = ("0" + date.getSeconds()).slice(-2);
return {
year: year,
month: month,
day: day,
hours: hours,
minutes: minutes,
seconds,
};
};
/**
@ 作者: 秦东
@ 时间: 2024-08-02 13:02:49
@ 功能: 将时间戳转换成字符串
*/
const timeToString = (timeVal:any,types:int) => {
let timeStr = ""
if(Array.isArray(timeVal)){
if(timeVal.length >= 2){
let startTime = timeToAry(timeVal[0])
let endTime = timeToAry(timeVal[1])
switch(types){
case "year": //
timeStr = `${startTime.year}${endTime.year}`;
break;
case "month": //
timeStr = `${startTime.year}-${startTime.month}${endTime.year}-${endTime.month}`;
break;
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}`;
break;
case "week": //
let startWeek = getYearWeek(startTime)
let endWeek = getYearWeek(endTime)
timeStr = `${startWeek}${endWeek}`;
break;
case "timeCalss": //
timeStr = `${startTime.hours}:${startTime.minutes}:${startTime.seconds}${endTime.hours}:${endTime.minutes}:${endTime.seconds}`;
break;
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}`;
break;
case "daterange":
timeStr = `${startTime.year}-${startTime.month}-${startTime.day}${endTime.year}-${endTime.month}-${endTime.day}`;
break;
case "monthrange":
timeStr = `${startTime.year}-${startTime.month}${endTime.year}-${endTime.month}`;
break;
default:
timeStr = `${startTime.year}-${startTime.month}-${startTime.day}${endTime.year}-${endTime.month}-${endTime.day}`;
break;
}
}else if(timeVal.length == 1){
let {year,month,day,hours,minutes,seconds} = timeToAry(timeVal[0])
switch(types){
case "year": //
timeStr = `${year}`;
break;
case "month": //
timeStr = `${year}-${month}`;
break;
case "datetime": //+
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
break;
case "week": //
timeStr = getYearWeek(timeVal)
break;
case "timeCalss": //
timeStr = `${hours}:${minutes}:${seconds}`;
break;
default:
timeStr = `${year}-${month}-${day}`
break;
}
}else{
timeStr = "未知时间"
}
}else{
let {year,month,day,hours,minutes,seconds} = timeToAry(timeVal)
switch(types){
case "year": //
timeStr = `${year}`;
break;
case "month": //
timeStr = `${year}-${month}`;
break;
case "datetime": //+
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
break;
case "week": //
timeStr = getYearWeek(timeVal)
break;
case "timeCalss": //
timeStr = `${hours}:${minutes}:${seconds}`;
break;
default:
timeStr = `${year}-${month}-${day}`
break;
}
}
return timeStr
}
let associatedFormsIndexTablekey = 0
const timeToString = (timeVal: any, types: int) => {
let timeStr = "";
if (Array.isArray(timeVal)) {
if (timeVal.length >= 2) {
let startTime = timeToAry(timeVal[0]);
let endTime = timeToAry(timeVal[1]);
switch (types) {
case "year": //
timeStr = `${startTime.year}${endTime.year}`;
break;
case "month": //
timeStr = `${startTime.year}-${startTime.month}${endTime.year}-${endTime.month}`;
break;
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}`;
break;
case "week": //
let startWeek = getYearWeek(startTime);
let endWeek = getYearWeek(endTime);
timeStr = `${startWeek}${endWeek}`;
break;
case "timeCalss": //
timeStr = `${startTime.hours}:${startTime.minutes}:${startTime.seconds}${endTime.hours}:${endTime.minutes}:${endTime.seconds}`;
break;
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}`;
break;
case "daterange":
timeStr = `${startTime.year}-${startTime.month}-${startTime.day}${endTime.year}-${endTime.month}-${endTime.day}`;
break;
case "monthrange":
timeStr = `${startTime.year}-${startTime.month}${endTime.year}-${endTime.month}`;
break;
default:
timeStr = `${startTime.year}-${startTime.month}-${startTime.day}${endTime.year}-${endTime.month}-${endTime.day}`;
break;
}
} else if (timeVal.length == 1) {
let { year, month, day, hours, minutes, seconds } = timeToAry(timeVal[0]);
switch (types) {
case "year": //
timeStr = `${year}`;
break;
case "month": //
timeStr = `${year}-${month}`;
break;
case "datetime": //+
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
break;
case "week": //
timeStr = getYearWeek(timeVal);
break;
case "timeCalss": //
timeStr = `${hours}:${minutes}:${seconds}`;
break;
default:
timeStr = `${year}-${month}-${day}`;
break;
}
} else {
timeStr = "未知时间";
}
} else {
let { year, month, day, hours, minutes, seconds } = timeToAry(timeVal);
switch (types) {
case "year": //
timeStr = `${year}`;
break;
case "month": //
timeStr = `${year}-${month}`;
break;
case "datetime": //+
timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
break;
case "week": //
timeStr = getYearWeek(timeVal);
break;
case "timeCalss": //
timeStr = `${hours}:${minutes}:${seconds}`;
break;
default:
timeStr = `${year}-${month}-${day}`;
break;
}
}
return timeStr;
};
let associatedFormsIndexTablekey = 0;
const emits = defineEmits<{
(e: 'asfValueChanged', val: any): void
}>()
(e: "asfValueChanged", val: any): void;
}>();
function asfValueChanged(val:any){
//console.log("childTable-asfValueChanged",val)
emits("asfValueChanged",val)
function asfValueChanged(val: any) {
//console.log("childTable-asfValueChanged",val)
emits("asfValueChanged", val);
}
</script>
<template>
<div class="form-table form-table-add">
<el-table
v-bind="data.control"
:class="[data.className]"
:data="tableDataNew"
>
<el-table-column
v-for="(item, index) in data.list"
:key="index"
:prop="item.name"
:label="item.item.label"
:width="item.item.span"
>
<template #default="scope">
<span v-if="item.type === 'index'">{{ scope.$index + 1 }}</span>
<div v-if="type === 4 || editDisabled">
<LokOrgCentent v-if="item.type == 'orgCentent'" :orgid="scope.row[item.name].toString()" />
<div v-else-if="item.type=='lowcodeImage'">
<LowcodeImagePage :data="item"
v-model="scope.row[item.name]" />
</div>
<div v-else-if="item.type=='upload'" >
<UploadPageList :data="item" :img-list="scope.row[item.name]" :control="item.control" />
</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=='associatedForms'">
<AssociatedForms :data="item"
v-model="scope.row[item.name]" :tablekey="associatedFormsIndexTablekey" :row-index="scope.$index"/>
</div>
<div v-else>{{ getText(scope.row[item.name],scope.row,item.name) }}</div>
</div>
<div v-else>
<form-item
v-model="scope.row[item.name]"
:tProp="`${data.name}.${scope.$index}.${item.name}`"
:row-index="scope.$index"
:data="item"
@asf-value-changed="asfValueChanged"
/>
</div>
</template>
<template #header="scope" v-if="item.help">
{{ scope.column.label }}
<Tooltip :content="item.help" />
</template>
</el-table-column>
<el-table-column
prop="del"
label="操作"
v-if="[1, 2].includes(type as number) && data.config.delBtnText && !editDisabled"
>
<template #default="scope">
<el-button link type="primary" @click="delColumn(scope.$index)">{{ data.config.delBtnText }}</el-button>
</template>
</el-table-column>
</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>
<div class="form-table form-table-add">
<el-table v-bind="data.control" :class="[data.className]" :data="tableDataNew">
<el-table-column
v-for="(item, index) in data.list"
:key="index"
:prop="item.name"
:label="item.item.label"
:width="item.item.span"
>
<template #default="scope">
<span v-if="item.type === 'index'">{{ scope.$index + 1 }}</span>
<div v-if="type === 4 || editDisabled">
<LokOrgCentent
v-if="item.type == 'orgCentent'"
:orgid="scope.row[item.name].toString()"
/>
<div v-else-if="item.type == 'lowcodeImage'">
<LowcodeImagePage :data="item" v-model="scope.row[item.name]" />
</div>
<div v-else-if="item.type == 'upload'">
<UploadPageList
:data="item"
:img-list="scope.row[item.name]"
:control="item.control"
/>
</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 == 'associatedForms'">
<AssociatedForms
:data="item"
v-model="scope.row[item.name]"
:tablekey="associatedFormsIndexTablekey"
:row-index="scope.$index"
/>
</div>
<div v-else>{{ getText(scope.row[item.name], scope.row, item.name) }}</div>
</div>
<div v-else>
<form-item
v-model="scope.row[item.name]"
:tProp="`${data.name}.${scope.$index}.${item.name}`"
:row-index="scope.$index"
:data="item"
@asf-value-changed="asfValueChanged"
/>
</div>
</template>
<template #header="scope" v-if="item.help">
{{ scope.column.label }}
<Tooltip :content="item.help" />
</template>
</el-table-column>
<el-table-column
prop="del"
label="操作"
v-if="[1, 2].includes(type as number) && data.config.delBtnText && !editDisabled"
>
<template #default="scope">
<el-button link type="primary" @click="delColumn(scope.$index)">{{
data.config.delBtnText
}}</el-button>
</template>
</el-table-column>
</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>
<style lang='scss' scoped>
</style>
<style lang="scss" scoped></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
@ 备注: 自定义应用卡片视图
-->
<script lang='ts' setup>
import { json2string,objToStringify,string2json,stringToObj } from '@/utils/DesignForm/form'
<script lang="ts" setup>
import {
json2string,
objToStringify,
string2json,
stringToObj,
} from "@/utils/DesignForm/form";
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
@ 功能: 引入组件
*/
import AppContainer from '@/views/sysworkflow/lowcodepage/newLowCode/appLayout/appContainer.vue'
import AppContainerPage from '@/views/sysworkflow/lowcodepage/newLowCode/appLayoutEdit/appContainerPage.vue' //
import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue"
import TableFlow from '@/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue'
import AppContainer from "@/views/sysworkflow/lowcodepage/newLowCode/appLayout/appContainer.vue";
import AppContainerPage from "@/views/sysworkflow/lowcodepage/newLowCode/appLayoutEdit/appContainerPage.vue"; //
import LowCodeFormPage from "@/views/sysworkflow/lowcodepage/lowCodeFormPage.vue";
import TableFlow from "@/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue";
const props = defineProps({
searchQuery:{
type:Object,
default(){
return {}
}
},
appGroup:{
type:String,
default:""
},
drawerWith:{
type:Number,
default:true
}
searchQuery: {
type: Object,
default() {
return {};
},
},
appGroup: {
type: String,
default: "",
},
drawerWith: {
type: Number,
default: true,
},
});
const emits = defineEmits(["getRongQiAttr"]);
const openTaskDrawer = ref(false) //
const openTaskDrawer = ref(false); //
/**
@ 作者: 秦东
@ 时间: 2024-07-22 09:09:29
@ 功能: 总记录数
*/
const pageTotal = ref(0)
const contList = ref<customerFormCont[]>() //
const loadingApp = ref(false)
const runIsOpen = ref(false)
const pickAppInfo = ref<customerFormCont>() //
const pageTotal = ref(0);
const contList = ref<customerFormCont[]>(); //
const loadingApp = ref(false);
const runIsOpen = ref(false);
const pickAppInfo = ref<customerFormCont>(); //
/**
@ 作者: 秦东
@ 时间: 2024-03-21 10:54:23
@ 功能: 获取表单列表
*/
const getFormAppList = (val:any) => {
loadingApp.value = true
let sendInfo = {
page:val.page,
pagesize:val.pagesize,
keywords:val.searchWork,
groupId:props.appGroup
}
getCustomerFormList(sendInfo)
.then(({ data }) => {
// console.log("-->",data);
pageTotal.value = data.total
contList.value = data.list
})
.finally(() => {
loadingApp.value = false
})
}
const getFormAppList = (val: any) => {
loadingApp.value = true;
let sendInfo = {
page: val.page,
pagesize: val.pagesize,
keywords: val.searchWork,
groupId: props.appGroup,
};
getCustomerFormList(sendInfo)
.then(({ data }) => {
// console.log("-->",data);
pageTotal.value = data.total;
contList.value = data.list;
})
.finally(() => {
loadingApp.value = false;
});
};
onMounted(() => {
nextTick(() => {
getFormAppList(props.searchQuery);
})
})
watch(()=>props.appGroup,()=>{
getFormAppList(props.searchQuery);
})
const srcList = (val:string) =>{
if(val){
return [val]
}else{
return ["https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png"]
}
}
nextTick(() => {
getFormAppList(props.searchQuery);
});
});
watch(
() => props.appGroup,
() => {
getFormAppList(props.searchQuery);
}
);
const srcList = (val: string) => {
if (val) {
return [val];
} else {
return [
"https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png",
];
}
};
/**
@ 作者: 秦东
@ 时间: 2024-07-22 09:57:45
@ 功能: 编辑应用
*/
const editIsOpen = ref(false)
const appKey = ref<string>("")
const editForm = (val:any) => {
emits("getRongQiAttr")
pickAppInfo.value = val
editIsOpen.value = true;
}
const editIsOpen = ref(false);
const appKey = ref<string>("");
const editForm = (val: any) => {
emits("getRongQiAttr");
pickAppInfo.value = val;
editIsOpen.value = true;
};
/**
@ 作者: 秦东
@ 时间: 2024-07-22 09:58:19
@ 功能: 编辑应用状态
*/
const eidtStatus = (val:any) => {
emits("getRongQiAttr")
ElMessageBox.confirm(
'请问是否真的删除?删除后数据将无法找回!',
'温馨提示!',
{
confirmButtonText: '删除',
cancelButtonText: '取消',
type: 'warning',
draggable: true,
}
)
.then(() => {
editProductionFormStatus({id:[val.id.toString()],status:3,is_delete:false})
.then(({data})=>{
getFormAppList(props.searchQuery);
})
})
.catch(() => {
getFormAppList(props.searchQuery);
})
}
const eidtStatus = (val: any) => {
emits("getRongQiAttr");
ElMessageBox.confirm("请问是否真的删除?删除后数据将无法找回!", "温馨提示!", {
confirmButtonText: "删除",
cancelButtonText: "取消",
type: "warning",
draggable: true,
})
.then(() => {
editProductionFormStatus({
id: [val.id.toString()],
status: 3,
is_delete: false,
}).then(({ data }) => {
getFormAppList(props.searchQuery);
});
})
.catch(() => {
getFormAppList(props.searchQuery);
});
};
/**
@ 作者: 秦东
@ 时间: 2024-07-22 10:01:17
@ 功能: 打开应用
*/
const openApp = (val:any) => {
emits("getRongQiAttr")
pickAppInfo.value = val
appJwtPower({id:val.signCodeStr,types:1})
.then(({data})=>{
// console.log("------>data:",data)
if(data){
runIsOpen.value = true
}else{
ElMessage({
message: '对不起!您不可使用此App!请联系管理员进行授权!',
type: 'error',
plain: true,
})
}
})
}
const openApp = (val: any) => {
emits("getRongQiAttr");
pickAppInfo.value = val;
appJwtPower({ id: val.signCodeStr, types: 1 }).then(({ data }) => {
// console.log("------>data:",data)
if (data) {
runIsOpen.value = true;
} else {
ElMessage({
message: "对不起!您不可使用此App!请联系管理员进行授权!",
type: "error",
plain: true,
});
}
});
};
defineExpose({
getFormAppList
})
getFormAppList,
});
/**
@ 作者: 秦东
@ 时间: 2024-07-23 15:27:51
@ 功能: 表单数据
*/
const state = reactive({
tableData: {
// tableProps: {}, //
columns: [],
config: {},
controlBtn:[],
operateBtn:[]
tableData: {
// tableProps: {}, //
columns: [],
config: {},
controlBtn: [],
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: [],
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:[]
}
}
,
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)
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
@ 功能: 查看表单列表
*/
const lookFormList = (val:any) => {
emits('getRongQiAttr')
// console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", val)
const lookFormList = (val: any) => {
emits("getRongQiAttr");
// console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", val)
versionId.value = val.versionId
versionTitle.value = val.name
versionId.value = val.versionId;
versionTitle.value = val.name;
if(val.listjson != "" && val.listjson != null){
lookPageIsShow.value = true
state.formId = val.idStr
let stateData = string2json(val.listjson)
// console.log(val.listjson)
// console.log("---->",stateData)
//let holeControlAndConfigStateData = string2json(data.data.appForm.mastesformjson)
if(stateData.tableData.columns&&stateData.tableData.columns.length>0){
for(let i = 0;i<stateData.tableData.columns.length;i++){
if(stateData.tableData.columns[i].config!=undefined && stateData.tableData.columns[i].control!=undefined){
// console.log(stateData.tableData.columns[i])
let paramx:string = ""+stateData.tableData.columns[i].control.optionsValue3Field
/*
if (val.listjson != "" && val.listjson != null) {
lookPageIsShow.value = true;
state.formId = val.idStr;
let stateData = string2json(val.listjson);
// console.log(val.listjson)
// console.log("---->",stateData)
//let holeControlAndConfigStateData = string2json(data.data.appForm.mastesformjson)
if (stateData.tableData.columns && stateData.tableData.columns.length > 0) {
for (let i = 0; i < stateData.tableData.columns.length; i++) {
if (
stateData.tableData.columns[i].config != undefined &&
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)
if(paramx && paramx != "" && paramx != null && paramx != "undefined"){
getFieldRecord(paramx).then(({ data }) => {
stateData.tableData.columns[i].options = data
if(stateData.searchData.length>0){
for(let j = 0;j<stateData.searchData.length;j++){
// console.log(stateData.searchData[j])
if(stateData.searchData[j].id==stateData.tableData.columns[i].id){
stateData.searchData[j].options = data
}
}
}
})
}
}
}
}
state.tableData = stateData.tableData
state.searchData = stateData.searchData
state.loading = stateData.loading
state.attrObj = stateData.attrObj
state.config = stateData.config
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
}
console.log("addCardPage---298", paramx);
if (paramx && paramx != "" && paramx != null && paramx != "undefined") {
getFieldRecord(paramx).then(({ data }) => {
stateData.tableData.columns[i].options = data;
if (stateData.searchData.length > 0) {
for (let j = 0; j < stateData.searchData.length; j++) {
// console.log(stateData.searchData[j])
if (stateData.searchData[j].id == stateData.tableData.columns[i].id) {
stateData.searchData[j].options = data;
}
}
}
});
}
}
}
}
state.tableData = stateData.tableData;
state.searchData = stateData.searchData;
state.loading = stateData.loading;
state.attrObj = stateData.attrObj;
state.config = stateData.config;
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;
}
};
/**
@ 作者: 秦东
@ 时间: 2024-03-21 10:57:11
@ 功能: 编辑表单
*/
const editFormApp = (val:any) => {
emits('getRongQiAttr')
formId.value = val.id.toString()
addFormIsShow.value= true
// console.log("",val.id,"-",formId.value,"-",addFormIsShow.value)
}
const editFormApp = (val: any) => {
emits("getRongQiAttr");
formId.value = val.id.toString();
addFormIsShow.value = true;
// console.log("",val.id,"-",formId.value,"-",addFormIsShow.value)
};
/**
@ 作者: 秦东
@ 时间: 2024-03-09 09:06:44
@ 功能: 刷新页面
*/
const refreshPage = (pageType:string) =>{
addFormIsShow.value = false;
getFormAppList(props.searchQuery);
}
const refreshPage = (pageType: string) => {
addFormIsShow.value = false;
getFormAppList(props.searchQuery);
};
/**
@ 作者: 秦东
@ 时间: 2024-08-09 11:28:39
@ 功能: 翻页
*/
const handleCurrentChange = (val:any) =>{
// console.log("",val)
props.searchQuery.page = val
getFormAppList(props.searchQuery);
}
const handleCurrentChange = (val: any) => {
// console.log("",val)
props.searchQuery.page = val;
getFormAppList(props.searchQuery);
};
</script>
<template>
<div>
<div v-loading="loadingApp" class="content1 flex flex-wrap gap-4">
<el-card v-for="item in contList" :key="item.id" class="cardBox">
<template #header>
<el-dropdown v-if="item.classify==3">
<span class="el-dropdown-link">
<el-icon><MoreFilled /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="editForm(item)" >编辑</el-dropdown-item>
<el-dropdown-item @click="eidtStatus(item)" divided>删除</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-dropdown v-else>
<span class="el-dropdown-link">
<el-icon><MoreFilled /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="editFormApp(item)" >编辑</el-dropdown-item>
<el-dropdown-item @click="eidtStatus(item)" divided>删除</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
<div v-if="item.classify==3" class="cardContBox" @click="openApp(item)">
<el-image
style="width: 100px; height: 100px"
:src="item.icon?item.icon:'https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png'"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:initial-index="4"
fit="cover"
/>
<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>
<div v-else class="cardContBox" @click="lookFormList(item)">
<el-image
style="width: 100px; height: 100px"
:src="item.icon?item.icon:'https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png'"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:initial-index="4"
fit="cover"
/>
<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 v-loading="loadingApp" class="content1 flex flex-wrap gap-4">
<el-card v-for="item in contList" :key="item.id" class="cardBox">
<template #header>
<el-dropdown v-if="item.classify == 3">
<span class="el-dropdown-link">
<el-icon><MoreFilled /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="editForm(item)">编辑</el-dropdown-item>
<el-dropdown-item @click="eidtStatus(item)" divided
>删除</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-dropdown v-else>
<span class="el-dropdown-link">
<el-icon><MoreFilled /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="editFormApp(item)">编辑</el-dropdown-item>
<el-dropdown-item @click="eidtStatus(item)" divided
>删除</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
<div v-if="item.classify == 3" class="cardContBox" @click="openApp(item)">
<el-image
style="width: 100px; height: 100px"
:src="
item.icon
? item.icon
: 'https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png'
"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:initial-index="4"
fit="cover"
/>
<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>
<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" />
<div v-else class="cardContBox" @click="lookFormList(item)">
<el-image
style="width: 100px; height: 100px"
:src="
item.icon
? item.icon
: 'https://docu.hxgk.group/images/2024_04/482167d1bf2b75a5717bcf68e18235f7.png'
"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:initial-index="4"
fit="cover"
/>
<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>
<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" />
</div>
<TableFlow
v-model:isopen="openTaskDrawer"
:versionid="versionId"
:versiontitle="versionTitle"
:drawerwith="props.drawerWith"
@searchquery="getFormAppList"
/>
</div>
</template>
<style lang='scss' scoped>
.pagination-box{
display: flex;
justify-content: center;
margin-top: 15px;
<style lang="scss" scoped>
.pagination-box {
display: flex;
justify-content: center;
margin-top: 15px;
}
.el-row:last-child {
margin-bottom: 0;
@ -483,47 +533,46 @@ const handleCurrentChange = (val:any) =>{
background-color: #eeeeee;
}
.content1{
padding:1rem 1rem 0 1rem;
::v-deep .el-card__body{
padding:5px 10px 10px 10px;
}
::v-deep .el-card__header{
border-bottom: 0;
padding: 0;
height: 10px;
display:flex;
justify-content: right;
}
.el-dropdown-link{
margin-top: 4px;
margin-right: 10px;
cursor: pointer;
}
.content1 {
padding: 1rem 1rem 0 1rem;
::v-deep .el-card__body {
padding: 5px 10px 10px 10px;
}
::v-deep .el-card__header {
border-bottom: 0;
padding: 0;
height: 10px;
display: flex;
justify-content: right;
}
.el-dropdown-link {
margin-top: 4px;
margin-right: 10px;
cursor: pointer;
}
}
.cardBox{
width:306px;
.cardContBox{
display: flex;
width: 100%;
justify-content: flex-start;
cursor: pointer;
}
.cardInfo{
padding-left: 5px;
}
.title{
font-size:14px;
font-weight:bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.content{
color: #909399;
overflow: hidden;
text-overflow: ellipsis;
}
.cardBox {
width: 306px;
.cardContBox {
display: flex;
width: 100%;
justify-content: flex-start;
cursor: pointer;
}
.cardInfo {
padding-left: 5px;
}
.title {
font-size: 14px;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.content {
color: #909399;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>

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

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

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

@ -3,216 +3,268 @@
@ 时间: 2024-06-17 15:30:36
@ 备注: App执行任务
-->
<script lang='ts' setup>
import { submitButton, afreshSubmitButton,editFormCont,draftSubmitButton,editLookFormCont } from "@/utils/workflow/const";
<script lang="ts" setup>
import {
json2string,
objToStringify,
string2json,
stringToObj
} from '@/utils/DesignForm/form'
import { haveCustomerFormVersion,generateFlow,gainTaskFormInfo,gainEditDataLog } from '@/api/taskapi/management'
submitButton,
afreshSubmitButton,
editFormCont,
draftSubmitButton,
editLookFormCont,
} from "@/utils/workflow/const";
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({
isshow:{
type:Boolean,
default:true
},
drawerWith:{
type:Number,
default:0
},
flowLogInfo:{
type:Object,
default(){
return {}
}
},
operState:{
type:Number,
default:1
}
})
isshow: {
type: Boolean,
default: true,
},
drawerWith: {
type: Number,
default: 0,
},
flowLogInfo: {
type: Object,
default() {
return {};
},
},
operState: {
type: Number,
default: 1,
},
});
const flowAry = ref<any[]>();
const emits = defineEmits(["update:isshow","getmytodolist"]);
const isOpen = computed({
get: () => props.isshow,
set: (val) => {
emits("update:isshow", val);
},
const emits = defineEmits(["update:isshow", "getmytodolist"]);
const isOpen = computed({
get: () => props.isshow,
set: (val) => {
emits("update:isshow", val);
},
});
const logistrue = ref(false)
const formLoading = ref(false)
const loadingData = ref(false) //
const flowLoading = ref(false) //
const versiontitle = ref<any>("")
const flowMap = ref<any>()
const nextStep = ref(0)
const nodeKey = ref<string>('');
const currentProgress = ref<number>(1);
const newLogAry = ref<any>("")
const oldLogAry = ref<any>("")
const newDataLen = ref<number>(0);
const logistrue = ref(false);
const formLoading = ref(false);
const loadingData = ref(false); //
const flowLoading = ref(false); //
const versiontitle = ref<any>("");
const flowMap = ref<any>();
const nextStep = ref(0);
const nodeKey = ref<string>("");
const currentProgress = ref<number>(1);
const newLogAry = ref<any>("");
const oldLogAry = ref<any>("");
const newDataLen = ref<number>(0);
//
const formState = reactive({
formData: {
list: [],
form: {},
config: {}
},
dict: {},
formId: 25,
id: 1,
loading: true
})
const formEl = ref<any>()
formData: {
list: [],
form: {},
config: {},
},
dict: {},
formId: 25,
id: 1,
loading: true,
});
const formEl = ref<any>();
const drawerBeforeClose = () => {
// console.log("",false)
emits("getmytodolist")
emits("update:isshow", false);
}
// console.log("",false)
emits("getmytodolist");
emits("update:isshow", false);
};
onMounted(()=>{
versiontitle.value = props.flowLogInfo.title
flowMap.value = JSON.parse(props.flowLogInfo.flowcont)
// console.log("",props.flowLogInfo)
gainFormData()
})
const pageLog = ref<any[]>([])
onMounted(() => {
versiontitle.value = props.flowLogInfo.title;
flowMap.value = JSON.parse(props.flowLogInfo.flowcont);
// console.log("",props.flowLogInfo)
gainFormData();
});
const pageLog = ref<any[]>([]);
//
const gainFormData = () =>{
formLoading.value = true;
// console.log("--->",props.flowLogInfo)
nextStep.value = props.flowLogInfo.nextStep
nodeKey.value = props.flowLogInfo.nodeKey;
currentProgress.value = props.flowLogInfo.currentStep
// console.log("props.flowLogInfo--5-------->",props.flowLogInfo.mastesform)
formState.formData = stringToObj(props.flowLogInfo.mastesform)
const gainFormData = () => {
formLoading.value = true;
// console.log("--->",props.flowLogInfo)
nextStep.value = props.flowLogInfo.nextStep;
nodeKey.value = props.flowLogInfo.nodeKey;
currentProgress.value = props.flowLogInfo.currentStep;
// console.log("props.flowLogInfo--5-------->",props.flowLogInfo.mastesform)
formState.formData = stringToObj(props.flowLogInfo.mastesform);
gainTaskFormInfo({ id: props.flowLogInfo.mastersKeyStr})
.then((data:any)=>{
if(data.data.logistrue){
formState.formData.list.push(editLookFormCont)
}
// console.log("res----------->",data)
formEl.value.setValue(data.data.masterDataInfo)
newLogAry.value = data.data.newData
oldLogAry.value = data.data.oldData
logistrue.value = data.data.logistrue
newDataLen.value = data.data.newDataLen
formLoading.value = false;
nextTick(()=>{
// console.log("-1111-->",data.data.tableData)
formEl.value.setValue(data.data.tableData)
})
})
.finally(()=>{
formLoading.value = false;
gainEditDataLog({id:props.flowLogInfo.mastersKeyStr})
.then(({data})=>{
// console.log("-1111-->",data)
pageLog.value = data
});
})
// haveCustomerFormVersion({id:props.flowLogInfo.version_id.toString()})
// .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>
gainTaskFormInfo({ id: props.flowLogInfo.mastersKeyStr })
.then((data: any) => {
if (data.data.logistrue) {
formState.formData.list.push(editLookFormCont);
}
// console.log("res----------->",data)
formEl.value.setValue(data.data.masterDataInfo);
newLogAry.value = data.data.newData;
oldLogAry.value = data.data.oldData;
logistrue.value = data.data.logistrue;
newDataLen.value = data.data.newDataLen;
formLoading.value = false;
nextTick(() => {
// console.log("-1111-->",data.data.tableData)
formEl.value.setValue(data.data.tableData);
});
})
.finally(() => {
formLoading.value = false;
gainEditDataLog({ id: props.flowLogInfo.mastersKeyStr }).then(({ data }) => {
// console.log("-1111-->",data)
pageLog.value = data;
});
});
// haveCustomerFormVersion({id:props.flowLogInfo.version_id.toString()})
// .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;
</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>
// 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>
</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>
<style lang='scss' scoped>
.biankuang{
border: 1px solid #D4D7DE;
padding:10px 10px;
<style lang="scss" scoped>
.biankuang {
border: 1px solid #d4d7de;
padding: 10px 10px;
}
</style>

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

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