Browse Source

修正数据

lwx_v1
超级管理员 1 year ago
parent
commit
193cd28a58
  1. 221
      src/components/DesignForm/app/calendar/calendar1/calendarItem.vue
  2. 134
      src/components/DesignForm/app/calendar/calendar1/calendarPage.vue
  3. 166
      src/components/DesignForm/app/calendar/calendar1/dayPage.vue
  4. 188
      src/components/DesignForm/app/calendar/calendar1/monthPage.vue
  5. 169
      src/components/DesignForm/app/calendar/calendar1/weekPage.vue
  6. 2
      src/components/DesignForm/app/calendarPage.vue
  7. 296
      src/components/DesignForm/app/cardPage.vue
  8. 2
      src/components/DesignForm/app/formPage.vue
  9. 33
      src/components/DesignForm/app/gannttPage.vue
  10. 371
      src/components/DesignForm/app/index.vue
  11. 113
      src/components/DesignForm/app/mapPage.vue
  12. 115
      src/components/DesignForm/app/timeAxis.vue
  13. 2
      src/components/DesignForm/public/form/formGroup.vue
  14. 1
      src/components/DesignForm/tableListPage/formPageCont.vue
  15. 402
      src/components/DesignForm/tableListPage/index.vue
  16. 22
      src/layout/components/Navbar.vue
  17. 6
      src/main.ts
  18. 2
      src/permission.ts
  19. 8
      src/store/modules/user.ts

221
src/components/DesignForm/app/calendar/calendar1/calendarItem.vue

@ -0,0 +1,221 @@
<script lang="ts" setup>
import { PropType } from 'vue';
import DateClass from '@/api/calendar/DateClass';
import { dateBase } from '@/api/calendar/Calendar';
import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue'
const props = defineProps({
col: {
type: Object as PropType<dateBase>,
default: () => {
return {};
},
},
time: {
type: String,
default: '',
},
drawerWith:{
type:Number,
default:0
}
});
const isCurrentMonth = (time: string) => {
// console.log("",time)
const months = time.split('-')[1];
return DateClass.getCurrent()[1] === Number(months);
}
const emit = defineEmits(['changeTargetDate']);
const changeTargetDate = (time: dateBase) => {
emit('changeTargetDate', time);
}
/**
@ 作者: 秦东
@ 时间: 2024-07-16 10:32:41
@ 功能: 搜索数据
*/
const searchtData = (val:any,time?:any) => {
return time
}
/**
@ 作者: 秦东
@ 时间: 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;
}
</script>
<template>
<div
class="calendar-item-container"
:class="[
{
'is-current': col.isCurrent,
'is-holidays': col.isHolidays,
'is-week': col.isWeek,
'is-selected': col.date === props.time,
'is-current-month': isCurrentMonth(col.date),
},
]"
@click="changeTargetDate(col)"
>
<div class="dayStyle">
<span >{{ col.title }}</span>
<div v-if="col.isHolidays"></div>
<span >{{ col.lunarsChina }}</span>
</div>
<div v-if="col.list&&col.list.length" class="dayList">
<div v-for="lt in col.list" :key="lt.id" class="dayLogCont" @click="lookPageInfo(lt)">
{{ lt.serialNumber1718584909710 }}
</div>
</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 scoped lang="less">
.calendar-item-container {
width: 100%;
height: 100%;
flex-direction: column;
box-sizing: border-box;
border-radius: 6px;
border: 2px solid #ffffff;
.dayList{
height: calc(100% - 20px);
overflow-y: auto;
}
.dayLogCont{
white-space: nowrap; /* 确保文本在一行内显示 */
overflow: hidden; /* 隐藏溢出的内容 */
text-overflow: ellipsis; /* 使用省略号表示文本溢出 */
font-size: 0.95rem;
border: 1px solid #bcbcbc;
border-radius: 5px;
margin-bottom:5px;
padding: 0 5px;
}
.dayStyle{
display: flex;
// align-items: top;
justify-content: space-between;
font-size: 12px;
color: #999999;
}
.calendar-title {
font-size: 1.2rem;
color: #999999;
}
.calendar-lunar {
margin-top: 6px;
font-size: 0.85rem;
color: #bcbcbc;
}
transition: all 0.2s;
}
.calendar-item-container:hover {
cursor: pointer;
border: 2px solid #409eff;
}
.is-holidays {
.holidays-text {
position: absolute;
top: 6px;
left: 14px;
font-size: 0.85rem;
color: #ffa2a2;
}
.calendar-title {
color: #ffa2a2;
}
.dayStyle{
color: #ffa2a2;
}
background-color: #feeeef;
}
.is-selected {
border: 2px solid #409eff;
}
.is-holidays.is-selected {
border: 2px solid #ffa2a2;
}
.is-selected.is-current-month {
border: 2px solid #409eff;
}
.is-holidays.is-selected.is-current-month {
border: 2px solid #f62b2b;
}
.is-week {
.calendar-title {
color: #ffa2a2;
}
.dayStyle{
color: #ffa2a2;
}
}
.calendar-item-container.is-current {
.calendar-title {
color: #333333;
}
.dayStyle{
color: #333333;
}
.calendar-lunar {
color: #666666;
}
}
.calendar-item-container.is-current.is-holidays {
.holidays-text {
position: absolute;
top: 6px;
left: 14px;
font-size: 0.85rem;
color: #f62b2b;
}
background-color: #fbe3e4;
}
.calendar-item-container.is-current.is-holidays,
.calendar-item-container.is-current.is-week {
.calendar-title {
color: #f62b2b;
}
.dayStyle{
color: #f62b2b;
}
}
.calendar-item-container.is-current.is-holidays {
.holidays-text {
position: absolute;
top: 6px;
left: 14px;
font-size: 0.85rem;
color: #fb4949;
}
.calendar-title {
color: #fb6e6e;
}
.dayStyle{
color: #fb6e6e;
}
background-color: #ffe4e7;
}
.calendar-item-container.is-holidays:hover {
border: 2px solid #f62b2b;
}
</style>

134
src/components/DesignForm/app/calendar/calendar1/calendarPage.vue

@ -5,6 +5,14 @@
-->
<script lang='ts' setup>
import DateClass from '@/api/calendar/DateClass';
import { clockFactory } from '@/api/calendar/utils';
//
import MonthPage from './monthPage.vue'
import WeekPage from './weekPage.vue'
import DayPage from './dayPage.vue'
const props = defineProps({
data: {
type: Object,
@ -13,17 +21,41 @@ const props = defineProps({
},
},
bodyHight:Number,
searchSend:{
type:Object,
default(){
return {}
}
},
drawerWith:{
type:Number,
default:0
}
});
const taday = ref<any>([]);
const curtteDayType = ref(1)
const curtteDay = ref(1)
const monthPageRef = ref(null)
const weekPageRef = ref(null)
const dayPageRef = ref(null)
onMounted(() => {
if(taday.value.length <= 0){
taday.value = DateClass.getCurrent()
}
console.log("系统加载",taday.value)
})
const curttWeek = computed(()=>{
if(taday.value.length <= 0){
taday.value = DateClass.getCurrent()
}
return DateClass.getWeek(DateClass.solarWeek(taday.value[0],taday.value[1],taday.value[2]))
if(curtteDayType.value != 2){
return DateClass.getWeek(DateClass.solarWeek(taday.value[0],taday.value[1],taday.value[2]))
}else{
return taday.value.start[1] + "月" + taday.value.start[2] + "-" + taday.value.end[1] + "月" + taday.value.end[2]
}
})
@ -31,9 +63,19 @@ const curtteMonth = computed(()=>{
if(taday.value.length <= 0){
taday.value = DateClass.getCurrent()
}
if(taday.value.length >= 2){
return taday.value[0]+"年"+taday.value[1]+"月"
if(curtteDayType.value != 2){
if(taday.value.length >= 2){
return taday.value[0]+"年"+taday.value[1]+"月"
}
}else{
if(taday.value.start != undefined){
return taday.value.start[0]+"年"
}else{
return taday.value[0]+"年"+taday.value[1]+"月"
}
}
})
/**
@ 作者: 秦东
@ -44,7 +86,15 @@ const backTime = () =>{
if(taday.value.length <= 0){
taday.value = DateClass.getCurrent()
}
taday.value = DateClass.gobackTime(taday.value[0],taday.value[1],taday.value[2],curtteDayType.value)
if(curtteDayType.value != 2){
taday.value = DateClass.gobackTime(taday.value[0],taday.value[1],taday.value[2],curtteDayType.value,-1)
}else{
let weekObject = DateClass.gobackTime(taday.value.start[0],taday.value.start[1],taday.value.start[2],curtteDayType.value,-1)
taday.value = weekObject
}
}
/**
@ -56,7 +106,69 @@ const forwardTime = () =>{
if(taday.value.length <= 0){
taday.value = DateClass.getCurrent()
}
if(curtteDayType.value != 2){
taday.value = DateClass.moveTime(taday.value[0],taday.value[1],taday.value[2],curtteDayType.value)
}else{
let weekObject = DateClass.moveTime(taday.value.start[0],taday.value.start[1],taday.value.start[2],curtteDayType.value)
taday.value = weekObject
}
}
/**
@ 作者: 秦东
@ 时间: 2024-07-13 08:33:01
@ 功能: 选择时间
*/
const pickTime = (val:number) => {
curtteDayType.value = val
switch (val) {
case 2:
taday.value = DateClass.getCurrent()
let weekObject = DateClass.gobackTime(taday.value[0],taday.value[1],taday.value[2],curtteDayType.value)
taday.value = weekObject
// curtteMonth.value = taday.value[0]+""
// curttWeek.value = taday.value[1]+""+taday.value[2]+""
// console.log("formEl---------4--------->",curttWeek.value )
break;
case 3:
taday.value = DateClass.getCurrent()
break;
default:
taday.value = DateClass.getCurrent()
break;
}
}
/**
@ 作者: 秦东
@ 时间: 2024-07-13 16:58:07
@ 功能: 回到今日
*/
const emit = defineEmits(['getDate']);
const goTady = () => {
taday.value = DateClass.getCurrent()
let time = taday.value[0] + "-" + clockFactory(taday.value[1]) + "-" + clockFactory(taday.value[2])
emit('getDate', time);
}
/**
@ 作者: 秦东
@ 时间: 2024-07-16 13:06:23
@ 功能: 查询数据
*/
const calendarSearchData = (val:any) => {
switch(curtteDayType.value){
case 2:
break;
case 3:
dayPageRef.value.searchatDayList(val);
default:
break;
}
console.log("查询数据",props.searchSend)
}
defineExpose({
calendarSearchData
})
</script>
<template>
<div class="calBox" :style="'height:calc(100vh - '+ props.bodyHight +'px)'">
@ -69,17 +181,19 @@ const forwardTime = () =>{
</div>
<div>
<el-button-group class="ml-4">
<el-button size="small" >今天</el-button>
<el-button :color="curtteDayType==1?'#a0cfff':''" @click="curtteDayType=1" size="small" ></el-button>
<el-button :color="curtteDayType==2?'#a0cfff':''" @click="curtteDayType=2" size="small" ></el-button>
<el-button :color="curtteDayType==3?'#a0cfff':''" @click="curtteDayType=3" size="small" ></el-button>
<el-button size="small" @click="goTady()">今天</el-button>
<el-button :color="curtteDayType==1?'#a0cfff':''" @click="pickTime(1)" size="small" ></el-button>
<el-button :color="curtteDayType==2?'#a0cfff':''" @click="pickTime(2)" size="small" ></el-button>
<el-button :color="curtteDayType==3?'#a0cfff':''" @click="pickTime(3)" size="small" ></el-button>
<el-button size="small" class="fa fa-angle-left" @click="backTime()"></el-button>
<el-button size="small" class="fa fa-angle-right" @click="forwardTime()"></el-button>
</el-button-group>
</div>
</div>
<div class="weekNumber">
{{DateClass.getMonday(taday[0],taday[1],taday[2],'e',0) }}
<MonthPage ref="monthPageRef" v-if="curtteDayType==1" :body-hight="props.bodyHight" :ta-day="taday" :search-send="props.searchSend" :drawer-with="props.drawerWith" />
<WeekPage ref="weekPageRef" v-if="curtteDayType==2" :body-hight="props.bodyHight" :ta-day="taday" :search-send="props.searchSend" :drawer-with="props.drawerWith" />
<DayPage ref="dayPageRef" v-if="curtteDayType==3" :body-hight="props.bodyHight" :ta-day="taday" :search-send="props.searchSend" :drawer-with="props.drawerWith" />
</div>
</div>
</template>
@ -102,7 +216,7 @@ const forwardTime = () =>{
}
}
.weekNumber{
}
}
</style>

166
src/components/DesignForm/app/calendar/calendar1/dayPage.vue

@ -0,0 +1,166 @@
<!--
@ 作者: 秦东
@ 时间: 2024-07-13 09:34:47
@ 备注: 日日历
-->
<script lang='ts' setup>
import Calendar from '@/api/calendar/Calendar';
import DateClass from '@/api/calendar/DateClass';
import { dateBase } from '@/api/calendar/Calendar';
import { clockFactory } from '@/api/calendar/utils';
import { gainCalendarList } from '@/api/calendar/request';
const props = defineProps({
bodyHight:Number,
taDay:{
type:Array,
default() {
return [2024,7,13];
},
},
searchSend:{
type:Object,
default(){
return {}
}
},
drawerWith:{
type:Number,
default:0
}
});
//
const drawingBoardHeight = computed(()=>{
return props.bodyHight + 50
})
const curttWeek = computed(()=>{
console.log("画板高度---------->",props.taDay[0])
return DateClass.getWeek(DateClass.solarWeek(props.taDay[0],props.taDay[1],props.taDay[2]))
})
const dayInfo = ref<any>();
onMounted(()=>{
dayInfo.value = Calendar.gainOneDay(props.taDay[0],props.taDay[1],props.taDay[2])
console.log("初次加载",dayInfo.value,props.searchSend)
searchatDayList(props.searchSend)
nextTick(()=>{
let ddTime = DateClass.getCurrent()
selectedTime.value = ddTime[0] + "-" + clockFactory(ddTime[1]) + "-" + clockFactory(ddTime[2])
})
})
watch(()=>props.taDay,(val:any)=>{
dayInfo.value = Calendar.gainOneDay(val[0],val[1],val[2])
console.log("监听变化",dayInfo.value)
searchatDayList(props.searchSend)
},{
deep: true,
})
const selectedTime = ref(props.taDay[0] + "-" + clockFactory(props.taDay[1]) + "-" + clockFactory(props.taDay[2]))
const emit = defineEmits(['getDate']);
const changeDate = (time: dateBase) => {
selectedTime.value = time.date;
emit('getDate', time);
}
const loadDay = ref(false)
/**
@ 作者: 秦东
@ 时间: 2024-07-16 11:53:35
@ 功能: 获取数据
*/
const searchatDayList = (val:any) => {
val.viewClass = {
class:"date",
sortWord:"creater_time",
sort:1,
startTime:"",
endTime:"",
dayType:"",
mapWord:""
}
console.log("获取每天数据",val)
let sendInfo = {
search:val,
timeAry:[dayInfo.value]
}
console.log("获取每天数据条件",sendInfo)
gainCalendarList(sendInfo)
.then(({data})=>{
console.log("获取数据",data)
dayInfo.value = data
})
.finally(()=>{ loadDay.value = false })
}
defineExpose({
searchatDayList
})
</script>
<template>
<div class="monthCalendarBox" :style="'height:calc(100vh - '+ drawingBoardHeight +'px)'">
<ul class="t-calendar-header">
<li>
{{ curttWeek }}
</li>
</ul>
<div class="t-calendar-day" v-loading="loadDay">
<template v-if="dayInfo">
<div
class="t-calendar-row"
>
<CalendarItem
:col="dayInfo"
:time="selectedTime"
:drawer-with="props.drawerWith"
@changeTargetDate="changeDate"
></CalendarItem>
</div>
</template>
<template v-else>
<div class="no-date">抱歉,暂无数据</div>
</template>
</div>
</div>
</template>
<style lang='scss' scoped>
.monthCalendarBox{
width: 100%;
margin-top: 10px;
.t-calendar-header {
display: flex;
width: 100%;
height: 42px;
padding: 0;
box-sizing: border-box;
li {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
font-size: 0.95rem;
}
}
.t-calendar-day {
display: flex;
width: 100%;
height: calc(100% - 42px);
padding: 0;
box-sizing: border-box;
border-right: 1px solid #ebeef5;
.t-calendar-row {
width: 100%;
font-size: 0.95rem;
border-bottom: 1px solid #ebeef5;
border-top: 1px solid #ebeef5;
border-left: 1px solid #ebeef5;
}
}
}
</style>

188
src/components/DesignForm/app/calendar/calendar1/monthPage.vue

@ -0,0 +1,188 @@
<!--
@ 作者: 秦东
@ 时间: 2024-07-13 09:34:05
@ 备注: 月日历
-->
<script lang='ts' setup>
import Calendar from '@/api/calendar/Calendar';
import DateClass from '@/api/calendar/DateClass';
import { dateBase } from '@/api/calendar/Calendar';
import { clockFactory } from '@/api/calendar/utils';
import { gainCalendarList } from '@/api/calendar/request';
import CalendarItem from './calendarItem.vue';
const props = defineProps({
bodyHight:Number,
taDay:{
type:Array,
default() {
return [2024,7,13];
},
},
searchSend:{
type:Object,
default(){
return {}
}
},
drawerWith:{
type:Number,
default:0
}
});
const TBody = ref<any[]>([])
const loadMonth = ref(false)
onMounted(()=>{
TBody.value = Calendar.table(props.taDay)
searchatMonthList(props.searchSend)
nextTick(()=>{
selectedTime.value = props.taDay[0] + "-" + clockFactory(props.taDay[1]) + "-" + clockFactory(props.taDay[2])
})
})
watch(()=>props.taDay,(val:any)=>{
TBody.value = Calendar.table(props.taDay)
searchatMonthList(props.searchSend)
},{
deep: true,
})
const selectedTime = ref(props.taDay[0] + "-" + clockFactory(props.taDay[1]) + "-" + clockFactory(props.taDay[2]))
const emit = defineEmits(['getDate']);
const changeDate = (time: dateBase) => {
selectedTime.value = time.date;
emit('getDate', time);
}
//
const drawingBoardHeight = computed(()=>{
return props.bodyHight + 50
})
//
const THeader = Calendar.title();
//
// const TBody = computed(() =>
// Calendar.table(props.taDay)
// );
/**
@ 作者: 秦东
@ 时间: 2024-07-16 11:53:35
@ 功能: 获取数据
*/
const searchatMonthList = (val:any) => {
loadMonth.value = true
val.viewClass = {
class:"date",
sortWord:"",
sort:1,
startTime:"",
endTime:"",
dayType:"",
mapWord:""
}
console.log("获取每天数据",val)
let sendInfo = {
search:val,
timeMonthAry:TBody.value,
types:1
}
console.log("获取每天数据条件",sendInfo)
gainCalendarList(sendInfo)
.then(({data})=>{
console.log("获取月份数据",data)
TBody.value = data
})
.finally(()=>{ loadMonth.value = false })
}
defineExpose({
gainCalendarList
})
</script>
<template>
<div class="monthCalendarBox" :style="'height:calc(100vh - '+ drawingBoardHeight +'px)'">
<ul class="t-calendar-header">
<li v-for="(item, index) in THeader" :key="index">
{{ item }}
</li>
</ul>
<div v-loading="loadMonth" class="t-calendar-day">
<template v-if="TBody.length">
<div
class="t-calendar-row"
v-for="(item, index) in TBody"
:key="index"
>
<div
class="t-calendar-col"
v-for="(col, colIdx) in item"
:key="colIdx"
>
<CalendarItem
:col="col"
:time="selectedTime"
:drawer-with="props.drawerWith"
@changeTargetDate="changeDate"
></CalendarItem>
</div>
</div>
</template>
<template v-else>
<div class="no-date">抱歉,暂无数据</div>
</template>
</div>
</div>
</template>
<style lang='scss' scoped>
.monthCalendarBox{
width: 100%;
margin-top: 10px;
.t-calendar-header {
display: flex;
width: 100%;
height: 42px;
padding: 0;
box-sizing: border-box;
li {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
font-size: 0.95rem;
}
}
.t-calendar-day {
display: flex;
flex-direction: column;
width: 100%;
height: calc(100% - 42px);
.t-calendar-row {
width: 100%;
height: 60px;
display: flex;
flex: 1;
border-bottom: 1px solid #ebeef5;
.t-calendar-col{
box-sizing: border-box;
flex: 1;
border-left: 1px solid #ebeef5;
padding: 2px;
font-size: 16px;
transition: all 0.2s;
width: calc(100%/7);
}
.t-calendar-col:last-child {
border-right: 1px solid #ebeef5;
}
}
.t-calendar-row:first-child {
border-top: 1px solid #ebeef5;
}
}
}
</style>

169
src/components/DesignForm/app/calendar/calendar1/weekPage.vue

@ -0,0 +1,169 @@
<!--
@ 作者: 秦东
@ 时间: 2024-07-13 09:34:24
@ 备注:
-->
<script lang='ts' setup>
import Calendar from '@/api/calendar/Calendar';
import DateClass from '@/api/calendar/DateClass';
import { dateBase } from '@/api/calendar/Calendar';
import { clockFactory } from '@/api/calendar/utils';
import { gainCalendarList } from '@/api/calendar/request';
const props = defineProps({
bodyHight:Number,
taDay:{
type:Array,
default() {
return [2024,7,13];
},
},
searchSend:{
type:Object,
default(){
return {}
}
},
drawerWith:{
type:Number,
default:0
}
});
//
const drawingBoardHeight = computed(()=>{
return props.bodyHight + 50
})
//
const THeader = Calendar.title();
// const WeekBody = computed(()=>{
// Calendar.gainDayOfWeek(props.taDay.start[0],props.taDay.start[1],props.taDay.start[2]);
// console.log("--->",props.taDay.start[0]);
// return Calendar.gainDayOfWeek(props.taDay.start[0],props.taDay.start[1],props.taDay.start[2]);
// });
const WeekBody = ref<any>([])
onMounted(()=>{
WeekBody.value = Calendar.gainDayOfWeek(props.taDay.start[0],props.taDay.start[1],props.taDay.start[2]);
searchatWeekList(props.searchSend)
nextTick(()=>{
let ddTime = DateClass.getCurrent()
selectedTime.value = ddTime[0] + "-" + clockFactory(ddTime[1]) + "-" + clockFactory(ddTime[2])
})
})
const selectedTime = ref(props.taDay[0] + "-" + clockFactory(props.taDay[1]) + "-" + clockFactory(props.taDay[2]))
const emit = defineEmits(['getDate']);
const changeDate = (time: dateBase) => {
selectedTime.value = time.date;
emit('getDate', time);
}
const loadWeek = ref(false)
/**
@ 作者: 秦东
@ 时间: 2024-07-16 11:53:35
@ 功能: 获取数据
*/
const searchatWeekList = (val:any) => {
loadWeek.value = true
val.viewClass = {
class:"date",
sortWord:"",
sort:1,
startTime:"",
endTime:"",
dayType:"",
mapWord:""
}
console.log("获取每天数据",val)
let sendInfo = {
search:val,
timeAry:WeekBody.value
}
console.log("获取每天数据条件",sendInfo)
gainCalendarList(sendInfo)
.then(({data})=>{
console.log("获取数据",data)
WeekBody.value = data
})
.finally(()=>{ loadWeek.value = false })
}
watch(()=>props.taDay,(val:any)=>{
WeekBody.value = Calendar.gainDayOfWeek(props.taDay.start[0],props.taDay.start[1],props.taDay.start[2]);
console.log("监听变化",WeekBody.value)
searchatWeekList(props.searchSend)
},{
deep: true,
})
defineExpose({
searchatWeekList
})
</script>
<template>
<div class="monthCalendarBox" :style="'height:calc(100vh - '+ drawingBoardHeight +'px)'">
<ul class="t-calendar-header">
<li v-for="(item, index) in THeader" :key="index">
{{ item }}
</li>
</ul>
<div class="t-calendar-day" v-loading="loadWeek">
<template v-if="WeekBody.length">
<div
class="t-calendar-row"
v-for="(item, index) in WeekBody"
:key="index"
>
<CalendarItem
:col="item"
:time="selectedTime"
:drawer-with="props.drawerWith"
@changeTargetDate="changeDate"
></CalendarItem>
</div>
</template>
<template v-else>
<div class="no-date">抱歉,暂无数据</div>
</template>
</div>
</div>
</template>
<style lang='scss' scoped>
.monthCalendarBox{
width: 100%;
margin-top: 10px;
.t-calendar-header {
display: flex;
width: 100%;
height: 42px;
padding: 0;
box-sizing: border-box;
li {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
font-size: 0.95rem;
}
}
.t-calendar-day {
display: flex;
width: 100%;
height: calc(100% - 42px);
padding: 0;
box-sizing: border-box;
border-right: 1px solid #ebeef5;
.t-calendar-row {
width: calc(100%/7);
font-size: 0.95rem;
border-bottom: 1px solid #ebeef5;
border-top: 1px solid #ebeef5;
border-left: 1px solid #ebeef5;
}
}
}
</style>

2
src/components/DesignForm/app/calendarPage.vue

@ -25,7 +25,7 @@ let timek = new Date()
</script>
<template>
<CalendarPage :body-hight="345" />
<CalendarPage :body-hight="265" />
</template>
<style lang='scss' scoped>

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

@ -0,0 +1,296 @@
<!--
@ 作者: 秦东
@ 时间: 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'
const props = defineProps({
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 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
})
/**
@ 作者: 秦东
@ 时间: 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
})
/**
@ 作者: 秦东
@ 时间: 2024-07-18 14:26:57
@ 功能: 内容设定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)
})
})
// 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)
}
const handleCurrentChange = (val: number) => {
// 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)
/**
@ 作者: 秦东
@ 时间: 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
})
}
defineExpose({
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 ""
}
/**
@ 作者: 秦东
@ 时间: 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 []
}
/**
@ 作者: 秦东
@ 时间: 2024-07-19 10:24:33
@ 功能: 获取内容
*/
const cardInfo = (val:any,cla:string) => {
if(cla=="title"){
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;
}
</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>
</template>
<style lang='scss' scoped>
.demo-image__error .image-slot {
font-size: 30px;
}
.demo-image__error .image-slot .el-icon {
font-size: 30px;
}
.demo-image__error .el-image {
width: 100%;
height: 200px;
}
.cardBox{
padding: 10px 0 5px 0;
:deep .el-card__body{
padding:10px;
}
.title{
font-size:14px;
font-weight:bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.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;
}
</style>

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

@ -740,6 +740,8 @@ const appFormSubmit = (params = {}) => {
afterSubmit('success', data)
})
})
}else{
afterSubmit('success', data)
}
})

33
src/components/DesignForm/app/gannttPage.vue

@ -0,0 +1,33 @@
<!--
@ 作者: 秦东
@ 时间: 2024-07-17 15:35:39
@ 备注: 卡片视图
-->
<script lang='ts' setup>
const props = defineProps({
searchSend:{
type:Object,
default(){
return {}
}
},
viewSetup:{
type:Object,
default(){
return {}
}
},
drawerWith:{
type:Number,
default:0
}
});
</script>
<template>
<div>
{{viewSetup}}
</div>
</template>
<style lang='scss' scoped>
</style>

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

@ -1,7 +1,7 @@
<!--
@ 作者: 秦东
@ 时间: 2024-06-03 13:23:59
@ 备注: App表单列表
@ 备注: App表单列表1
-->
<script lang='ts' setup>
import { json2string,objToStringify,string2json,stringToObj } from '@/utils/DesignForm/form'
@ -12,7 +12,7 @@ import { inputUnit,timeUnit,choiceUnit,switchUnit,orgUnit,checkboxUnit } from '@
import type { FormInstance, FormRules,ElNotification } from 'element-plus'
import { gainFormPageListCont } from '@/api/DesignForm/requestapi'
import { Picture,InfoFilled,QuestionFilled } from '@element-plus/icons-vue'
import request from '@/utils/request';
import { softDeletion,retractRunWorkFlow } from '@/api/taskapi/management'
@ -22,7 +22,10 @@ import { softDeletion,retractRunWorkFlow } from '@/api/taskapi/management'
import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue'
import TableFlow from '@/views/sysworkflow/lowcodepage/pageFlow/appTableFlow.vue'
import TimeAxisPage from '@/components/DesignForm/app/timeAxis.vue'
import CalendarPage from '@/components/DesignForm/app/calendarPage.vue'
import CardPage from '@/components/DesignForm/app/cardPage.vue'
import GanttPageIng from '@/components/DesignForm/app/gannttPage.vue'
import MapPage from '@/components/DesignForm/app/mapPage.vue'
import CalendarPage from '@/components/DesignForm/app/calendar/calendar1/calendarPage.vue'
const props = withDefaults(
@ -99,6 +102,7 @@ const designStore = useDesignFormStore()
const route = useRoute()
const router = useRouter()
const tableDataList = ref([]) //
const currentAsfTableDataList = ref([])//
const openTaskDrawer = ref(false) //
const state = reactive({
@ -191,7 +195,7 @@ const resetFields = (formEl: FormInstance | undefined) => {
@ 功能: 功能按钮动作
*/
const setUpClick = (val:string,id:string) =>{
console.log("功能按钮动作",val,"----id----->",props.versionid,"-----formId---->",props.versiontitle)
// console.log("",val,"----id----->",props.versionid,"-----formId---->",props.versiontitle)
if(val.key == "newAdd"){
drawerWith.value = container.value?.clientWidth
openTaskDrawer.value = true
@ -208,7 +212,7 @@ const setUpClick = (val:string,id:string) =>{
}
softDeletion(sendData)
.then((data)=>{
console.log('cancel!',data)
// console.log('cancel!',data)
ElNotification({
title: '温馨提示!',
message: data.mag,
@ -233,16 +237,16 @@ const setUpClick = (val:string,id:string) =>{
const selectionChange = (row: any) => {
state.selectionChecked = row
emits('selectionChange', row)
console.log('selectionChange', row)
// console.log('selectionChange', row)
idList.value.length = 0
console.log('idList.value-1-->', idList.value)
// console.log('idList.value-1-->', idList.value)
if(row && row.length>0){
row.forEach((item:any) => {
console.log('item', item.masters_key)
// console.log('item', item.masters_key)
idList.value.push(item.masters_key.toString())
})
}
console.log('idList.value--->', idList.value)
// console.log('idList.value--->', idList.value)
}
/**
@ 作者: 秦东
@ -264,13 +268,14 @@ const columnsFilter = computed(() => {
@ 功能: 翻页操作
*/
const handleSizeChange = (page: number) => {
console.log("翻页操作",page)
// console.log("",page)
state.pageSize = page
getListData(1)
}
const handleCurrentChange = (page: number) => {
getListData(page)
}
/**
@ 作者: 秦东
@ 时间: 2024-04-01 14:15:16
@ -296,13 +301,17 @@ watch(()=>props.formId,(val:any)=>{
})
const timeAxisRef = ref(null)
const calendarPageRef = ref(null)
const cardPageRef = ref(null)
const searchSend = reactive({
formId:props.formId,
page:state.currentPage,
pagesize:state.pageSize,
searchData:json2string(props.searchData)
searchData:json2string(props.searchData),
viewClass:{}
})
let asfDetails = []
let asfQueryParams: any[] = []
/**
@ 作者: 秦东
@ 时间: 2024-04-01 15:51:32
@ -310,22 +319,27 @@ const searchSend = reactive({
*/
const getPageData = () => {
// let sendData = {
// formId:props.formId,
// page:state.currentPage,
// pagesize:state.pageSize,
// searchData:json2string(props.searchData)
// }
let sendData = {
formId:props.formId,
page:state.currentPage,
pagesize:state.pageSize,
searchData:json2string(props.searchData)
}
// console.log("",sendData)
switch(viewType.value){
case 2:
nextTick(()=>{
// console.log("-------555---------->",calendarPageRef.value)
calendarPageRef.value.calendarSearchData(sendData)
})
// calendarPageRef.value.calendarSearchData()
break;
case 3:
nextTick(()=>{
console.log("获取列表详细信息-------222---------->",timeAxisRef.value)
// timeAxisRef.value.searchTimeList(searchSend)
// console.log("-------222---------->",timeAxisRef.value)
timeAxisRef.value.searchTimeList(sendData,1)
})
break;
@ -333,12 +347,86 @@ const getPageData = () => {
break;
case 5:
break;
case 6:
nextTick(()=>{
cardPageRef.value.getCardList(sendData)
})
break;
default:
state.loading = true;
gainFormPageListCont(searchSend)
gainFormPageListCont(sendData)
.then((data)=>{
console.log("获取列表详细信息----------------->",data)
tableDataList.value = data.data.list
// console.log("----------------->",data)
//liwenxuan start
let dataList = data
//console.log(dataList)
asfDetails = props.data.columns.filter((item: any) => {
return item.fieldClass=="associatedForms"
})
if(asfDetails.length>0&&data.data.list!=null){
//console.log(data.data.list)
//,asf
asfQueryParams = []
for(let j = 0;j< asfDetails.length;j++){
let asfQueryParamsItem :any = {}
//console.log(asfDetails[j])
asfQueryParamsItem.formId = asfDetails[j].control.formid
asfQueryParamsItem.field = asfDetails[j].field
let asfToSelectIds = []
// console.log(data.data.list)
for(let i = 0;i<data.data.list.length;i++){
let asfMasterAndAsfId:any = {}
asfMasterAndAsfId.asfId = data.data.list[i][asfDetails[j].field]
asfMasterAndAsfId.asfMasterId = data.data.list[i].id
asfToSelectIds.push(asfMasterAndAsfId)
}
asfQueryParamsItem.asfToSelectIds = asfToSelectIds
asfQueryParams.push(asfQueryParamsItem)
}
let queryCount = 0
for(let i = 0;i<asfQueryParams[0].asfToSelectIds.length;i++){
if(asfQueryParams[0].asfToSelectIds[i].asfId!=""){
queryCount++
}
}
//console.log(asfQueryParams)
if(queryCount>0){
getAsfDataTitlesByIds(asfQueryParams).then(({ data }) => {
//console.log(data)
for(let i = 0;i<dataList.data.list.length; i++){
//console.log(dataList.data.list[i])
for(let j = 0;j<data.length;j++){
//console.log(data[j])
for(let n = 0;n<data[j].list.length;n++){
if(dataList.data.list[i].id==data[j].list[n].asfMasterId){
dataList.data.list[i][data[j].field] = data[j].list[n].label
}
//console.log(data[j].list[n])
}
}
}
tableDataList.value = dataList.data.list
});
}else{
tableDataList.value = data.data.list
}
}else{
tableDataList.value = data.data.list
}
//tableDataList.value = data.data.list
//liwenxuan end
state.total = data.data.total
state.loading = false;
})
@ -347,8 +435,162 @@ const getPageData = () => {
})
}
}
const asfGetPageData = (asfFormId: any,asfToSelectMastersKey: any) => {
let searchData = [{"id":"id","label":"Id","field":"id","type":"bigint(20)","attribute":"","pattern":"bigint","fieldClass":"id","activeValue":"","inactiveValue":"","config":{"optionsType":0},"control":{"optionsValue3Formid":"","optionsValue3Field":""},"options":[],"isSearch":true,"value":asfToSelectMastersKey}]
//state.loading = true;
let sendData = {
formId:asfFormId,
page:1,
pagesize:1,
searchData:json2string(searchData)
}
//console.log("asf",sendData)
gainFormPageListCont(sendData)
.then((data)=>{
//console.log("----------------->",data)
//liwenxuan start
let dataList = data
//console.log(dataList)
asfDetails = props.data.columns.filter((item: any) => {
return item.fieldClass=="associatedForms"
})
if(asfDetails.length>0){
//console.log(data.data.list)
//,asf
let asfAsfQueryParams = []
for(let j = 0;j< asfDetails.length;j++){
let asfQueryParamsItem :any = {}
//console.log(asfDetails[j])
asfQueryParamsItem.formId = asfDetails[j].control.formid
asfQueryParamsItem.field = asfDetails[j].field
let asfToSelectIds = []
for(let i = 0;i<data.data.list.length;i++){
let asfMasterAndAsfId:any = {}
asfMasterAndAsfId.asfId = data.data.list[i][asfDetails[j].field]
asfMasterAndAsfId.asfMasterId = data.data.list[i].id
asfToSelectIds.push(asfMasterAndAsfId)
}
asfQueryParamsItem.asfToSelectIds = asfToSelectIds
asfAsfQueryParams.push(asfQueryParamsItem)
}
let queryCount = 0
for(let i = 0;i<asfAsfQueryParams[0].asfToSelectIds.length;i++){
if(asfAsfQueryParams[0].asfToSelectIds[i].asfId!=undefined&&asfAsfQueryParams[0].asfToSelectIds[i].asfId!=""){
queryCount++
}
}
//console.log(asfAsfQueryParams)
if(queryCount>0){
getAsfDataTitlesByIds(asfAsfQueryParams).then(({ data }) => {
//console.log(data)
for(let i = 0;i<dataList.data.list.length; i++){
//console.log(dataList.data.list[i])
for(let j = 0;j<data.length;j++){
//console.log(data[j])
for(let n = 0;n<data[j].list.length;n++){
if(dataList.data.list[i].id==data[j].list[n].asfMasterId){
dataList.data.list[i][data[j].field] = data[j].list[n].label
}
//console.log(data[j].list[n])
}
}
}
currentAsfTableDataList.value = dataList.data.list
});
}else{
currentAsfTableDataList.value = data.data.list
}
}else{
currentAsfTableDataList.value = data.data.list
}
/* //liwenxuan 关联表单数据获取 end
state.total = data.data.total
state.loading = false; */
})
.finally(()=>{
/* state.loading = false; */
//
tablePageClass.value = 4;
drawerWith.value = container.value?.clientWidth
asflookPageInfoIsShow.value = true;
})
}
//liwenxuan start
function getAsfDataTitlesByIds(asfQueryParams: any[]) {
return request({
url: '/javasys/lowCode/AssociatedForms/getAsfDataTitlesByIds',
method: 'post',
data: asfQueryParams,
});
}
//liwenxuan end
//liwenxuan start
function showAsfDetailDialog(item: any,scope: any,asfQueryParams: any){
let val = scope.row
//asfShowDetailsFlag.value= true
/* console.log("item----------------->",item)
console.log("scope----------------->",scope)
console.log("asfQueryParams----------------->",asfQueryParams)
console.log("val----------------->",val) */
let asfFormId = item.control.formid//customer_formid
//alert("asfFormId:"+asfFormId)
let scopeColumnProperty = scope.column.property//exp:associatedForms1720570283525
let asfQueryParamsNAsfToSelectIdsNAsfMasterId = val.id
//alert(asfQueryParamsNAsfToSelectIdsNAsfMasterId)
let asfToSelectMastersKey = ""
for(let i = 0;i<asfQueryParams.length;i++){
if(asfQueryParams[i].field == scopeColumnProperty){
for(let j = 0;j<asfQueryParams[i].asfToSelectIds.length;j++){
if(asfQueryParams[i].asfToSelectIds[j].asfMasterId==asfQueryParamsNAsfToSelectIdsNAsfMasterId){
asfToSelectMastersKey = asfQueryParams[i].asfToSelectIds[j].asfId
}
}
}
}
//alert("asfToSelectMastersKey:"+asfToSelectMastersKey)
asfGetPageData(asfFormId,asfToSelectMastersKey)
}
//liwenxuan end
onMounted(()=>{
console.log("视图数据提交---》",props.viewPage);
getPageData()
nextTick(()=>{
drawerWith.value = container.value?.clientWidth
})
})
/**
@ 作者: 秦东
@ -391,7 +633,7 @@ const confirmEvent = (val:any) => {
}
softDeletion(sendData)
.then((data)=>{
console.log('cancel!',data)
// console.log('cancel!',data)
ElNotification({
title: '系统提示!',
message: data.mag?data.mag:"删除成功",
@ -412,13 +654,14 @@ const drawerWith = ref(); //编辑表单时抽屉宽度
*/
const tablePageClass = ref(1)
const lookPageInfoIsShow = ref(false)
const asflookPageInfoIsShow = ref(false)
const pageInfoCont = ref<any>()
const lookPageInfo = (val:any) => {
tablePageClass.value = 4;
pageInfoCont.value = val
drawerWith.value = container.value?.clientWidth
lookPageInfoIsShow.value = true;
lookPageInfoIsShow.value = true;
}
/**
@ 作者: 秦东
@ -427,7 +670,7 @@ const lookPageInfo = (val:any) => {
*/
const editInfo = (val:any) => {
console.log('修改数据!',val)
// console.log('!',val)
operState.value = 5;
tablePageClass.value = 2;
pageInfoCont.value = val
@ -452,7 +695,7 @@ const submitApproval = (val:any) => {
@ 功能: 撤回申请
*/
const withdrawApplication = (val:any) => {
console.log("撤回申请", val);
// console.log("", val);
let sendInfo = {
// id: val.masters_key,
id: val.runFlowId
@ -501,19 +744,21 @@ const tabsView = (val:any,types:number) => {
viewType.value = types
val.isClick = true
viewLayout.value = val
console.log("切换视图展示方式",val)
// console.log("",val)
switch(types){
case 2:
props.viewPage.list.isClick = false
props.viewPage.time.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.map.isClick = false
props.viewPage.card.isClick = false
break;
case 3:
props.viewPage.list.isClick = false
props.viewPage.date.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.map.isClick = false
props.viewPage.card.isClick = false
getPageData()
break;
case 4:
@ -521,15 +766,25 @@ const tabsView = (val:any,types:number) => {
props.viewPage.date.isClick = false
props.viewPage.time.isClick = false
props.viewPage.map.isClick = false
props.viewPage.card.isClick = false
break;
case 5:
props.viewPage.card.isClick = false
props.viewPage.list.isClick = false
props.viewPage.date.isClick = false
props.viewPage.time.isClick = false
props.viewPage.gantt.isClick = false
break;
case 6:
props.viewPage.list.isClick = false
props.viewPage.date.isClick = false
props.viewPage.time.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.map.isClick = false
break;
default:
props.viewPage.date.isClick = false
props.viewPage.card.isClick = false
props.viewPage.time.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.map.isClick = false
@ -540,7 +795,6 @@ const tabsView = (val:any,types:number) => {
</script>
<template>
<div ref="container" v-loading="state.loading" class="table-list-comm">
<el-row class="rowBox">
<el-col :span="24">
<el-form v-if="config.searchIsShow" ref="ruleSearchForm" class="seacherForm">
@ -622,7 +876,6 @@ const tabsView = (val:any,types:number) => {
</el-form>
</el-col>
<el-col :span="24">
<div class="operateButArea">
<div class="operatLeft">
<el-text v-if="data.controlBtn.length === 0" class="mx-1 tipBox" type="info">操作按钮区域</el-text>
@ -647,51 +900,59 @@ const tabsView = (val:any,types:number) => {
<el-button size="small" @click="config.searchIsShow=!config.searchIsShow" class="fa fa-search" />
</el-tooltip>
<el-tooltip
v-if="viewPage.list.status"
v-if="props.viewPage.list.status"
class="box-item"
effect="dark"
content="列表视图"
placement="top"
>
<el-button size="small" class="fa fa-table" :color="viewPage.list.isClick?'#a0cfff':''" @click="tabsView(viewPage.list,1)" />
<el-button size="small" class="fa fa-table" :color="props.viewPage.list.isClick?'#a0cfff':''" @click="tabsView(props.viewPage.list,1)" />
</el-tooltip>
<el-tooltip
v-if="viewPage.date.status"
v-if="props.viewPage.card&&props.viewPage.card.status"
class="box-item"
effect="dark"
content="卡片视图"
placement="top"
>
<el-button size="small" class="fa fa-id-card-o" :color="props.viewPage.card&&props.viewPage.card.isClick?'#a0cfff':''" @click="tabsView(props.viewPage.card,6)" />
</el-tooltip>
<el-tooltip
v-if="props.viewPage.date.status"
class="box-item"
effect="dark"
content="日历视图"
placement="top"
>
<el-button size="small" class="fa fa-calendar" :color="viewPage.date.isClick?'#a0cfff':''" @click="tabsView(viewPage.date,2)" />
<el-button size="small" class="fa fa-calendar" :color="props.viewPage.date.isClick?'#a0cfff':''" @click="tabsView(props.viewPage.date,2)" />
</el-tooltip>
<el-tooltip
v-if="viewPage.time.status"
v-if="props.viewPage.time.status"
class="box-item"
effect="dark"
content="时间轴"
placement="top"
>
<el-button size="small" class="fa fa-clock-o" :color="viewPage.time.isClick?'#a0cfff':''" @click="tabsView(viewPage.time,3)" />
<el-button size="small" class="fa fa-clock-o" :color="props.viewPage.time.isClick?'#a0cfff':''" @click="tabsView(props.viewPage.time,3)" />
</el-tooltip>
<el-tooltip
v-if="viewPage.gantt.status"
v-if="props.viewPage.gantt.status"
class="box-item"
effect="dark"
content="甘特图"
placement="top"
>
<el-button size="small" class="fa fa-bar-chart" :color="viewPage.gantt.isClick?'#a0cfff':''" @click="tabsView(viewPage.gantt,4)" />
<el-button size="small" class="fa fa-bar-chart" :color="props.viewPage.gantt.isClick?'#a0cfff':''" @click="tabsView(props.viewPage.gantt,4)" />
</el-tooltip>
<el-tooltip
v-if="viewPage.map.status"
v-if="props.viewPage.map.status"
class="box-item"
effect="dark"
content="地图视图"
placement="top"
>
<el-button size="small" class="fa fa-map-signs" :color="viewPage.map.isClick?'#a0cfff':''" @click="tabsView(viewPage.map,5)" />
<el-button size="small" class="fa fa-map-signs" :color="props.viewPage.map.isClick?'#a0cfff':''" @click="tabsView(props.viewPage.map,5)" />
</el-tooltip>
</el-button-group>
</div>
</div>
@ -839,6 +1100,17 @@ const tabsView = (val:any,types:number) => {
<template v-if="item.fieldClass=='baidumap'" #default="scope">
{{scope.row[scope.column.property]}}
</template>
<template v-if="item.fieldClass=='associatedForms'" #default="scope">
<el-button
key="primary"
type="primary"
link
@click="showAsfDetailDialog(item,scope,asfQueryParams)"
>
{{scope.row[scope.column.property]}}
</el-button>
</template>
</el-table-column>
</template>
</el-table>
@ -857,16 +1129,19 @@ const tabsView = (val:any,types:number) => {
</div>
</el-col>
<el-col v-if="viewType==2" :span="24">
<CalendarPage />
<CalendarPage ref="calendarPageRef" :search-send="searchSend" :body-hight="265" :drawer-with="drawerWith" :view-setup="viewPage.card" />
</el-col>
<el-col v-if="viewType==3" :span="24">
<TimeAxisPage ref="timeAxisRef" :data="tableDataList" :view-layout="viewLayout" :columns-filter="columnsFilter" :search-send="searchSend" />
<TimeAxisPage ref="timeAxisRef" :data="tableDataList" :view-layout="viewLayout" :columns-filter="columnsFilter" :search-send="searchSend" :drawer-with="drawerWith" />
</el-col>
<el-col v-if="viewType==4" :span="24">
甘特图
<GanttPageIng ref="ganttPageRef" :search-send="searchSend" :drawer-with="drawerWith" :view-setup="viewPage.gantt" />
</el-col>
<el-col v-if="viewType==5" :span="24">
地图
<MapPage ref="mapPageRef" :search-send="searchSend" :drawer-with="drawerWith" :view-setup="viewPage.map" />
</el-col>
<el-col v-if="viewType==6" :span="24">
<CardPage ref="cardPageRef" :search-send="searchSend" :drawer-with="drawerWith" :view-setup="viewPage.card" :columns-filter="columnsFilter" />
</el-col>
<el-col :span="24" style="display:none">
<el-button-group>
@ -931,7 +1206,7 @@ const tabsView = (val:any,types:number) => {
</el-col>
</el-row>
<FormPageCont v-model:is-show="lookPageInfoIsShow" :drawer-with="drawerWith" :page-info="pageInfoCont" :table-page-class="tablePageClass" :oper-state="operState" @getPageData="getPageData" />
<FormPageCont v-model:is-show="asflookPageInfoIsShow" :drawer-with="drawerWith" :page-info="currentAsfTableDataList[0]" :table-page-class="tablePageClass" :oper-state="operState" @getPageData="getPageData" />
<TableFlow v-model:isopen="openTaskDrawer" :versionid="props.versionid" :versiontitle="props.versiontitle" :drawerwith="drawerWith" :pick-app-menu="pickAppMenu" @searchquery="getListData" />
</div>
@ -941,7 +1216,7 @@ const tabsView = (val:any,types:number) => {
width:100%;
}
.table-list-comm{
padding:0px 15px 15px 15px;
padding:0px 15px 5px 15px;
}
.seacherForm{
min-height: auto;

113
src/components/DesignForm/app/mapPage.vue

@ -0,0 +1,113 @@
<!--
@ 作者: 秦东
@ 时间: 2024-07-17 15:37:59
@ 备注: 地图视图
-->
<script lang='ts' setup>
const props = defineProps({
searchSend:{
type:Object,
default(){
return {}
}
},
viewSetup:{
type:Object,
default(){
return {}
}
},
drawerWith:{
type:Number,
default:0
}
});
let mapId = "pickMapView"+ Math.ceil(Math.random());
const longitude= ref<number>(117.14272945140574)
const latitude= ref<number>(35.91808471435389)
/**
@ 作者: 秦东
@ 时间: 2024-07-19 14:55:24
@ 功能: 引入外部js
*/
const loadJScript = () => {
const script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://api.map.baidu.com/getscript?v=3.0&ak=ljiKlTAsS7SNVqDM16IUwRVFFhrvbxiF';
script.onload = () => {
mapInit()
}
document.body.appendChild(script);
}
//
const mapInit = () => {
const map = new window.BMap.Map("pickMapView"); // Map
var opts = {type: BMAP_NAVIGATION_CONTROL_LARGE}
map.addControl(new BMap.NavigationControl(opts)); //
map.addControl(new BMap.ScaleControl());
map.addControl(new BMap.MapTypeControl());
map.enableScrollWheelZoom(); //
mapHandle(map)
// const point = new BMap.Point(longitude.value,latitude.value); //
// map.centerAndZoom(point, 16);
// var label = new BMap.Label("", { //
// position: point, //
// offset: new BMap.Size(10, 20) //
// }).addEventListener("click", function(){
// alert("");
// });
// // var marker = new BMap.Marker(point);
// map.addOverlay(label);
// const points = new BMap.Point(117.14372945240574,35.92808471455389); //
// map.centerAndZoom(points, 16);
// var markerd = new BMap.Marker(points);
// map.addOverlay(markerd);
}
/**
@ 作者: 秦东
@ 时间: 2024-07-19 15:31:05
@ 功能: 处理地图时间
*/
const mapHandle = (map:any) => {
let blz = []
for(var i = 1; i < 5;){
const points = new BMap.Point(117.14372945240574,35.92808471455389+i); //
map.centerAndZoom(points, 16);
// var markerd = new BMap.Marker(points);
// map.addOverlay(markerd);
// let blz = "label"+i
blz[i] = new BMap.Label("山东恒信高科"+i, { //
position: points, //
offset: new BMap.Size(10, 20) //
})
blz[i].addEventListener("click", function(){
alert(i);
});
map.addOverlay(blz[i]);
i++
}
}
onMounted(() =>{
loadJScript()
})
</script>
<template>
<div>
<div id="pickMapView" :ref="mapId" class="openMapView"></div>
</div>
</template>
<style lang='scss' scoped>
.openMapView{
width:100%;
margin: 10px 0 0 0;
height: calc(100vh - 320px);
}
</style>

115
src/components/DesignForm/app/timeAxis.vue

@ -5,6 +5,7 @@
-->
<script lang='ts' setup>
import { multiViewPage } from '@/api/DesignForm/requestapi'
import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue'
import {
json2string
} from '@/utils/DesignForm/form'
@ -32,6 +33,10 @@ const props = defineProps({
default(){
return {}
}
},
drawerWith:{
type:Number,
default:0
}
});
const svg = `
@ -56,6 +61,8 @@ const loadTimeLog = () =>{
if(loadTimePage.value){
props.searchSend.page= chuDiNumber
searchTimeList(props.searchSend)
}else{
loadTimePage.value = false
}
}
@ -67,7 +74,7 @@ const timeInfoList = ref<any[]>([])
@ 时间: 2024-07-08 13:11:43
@ 功能: 时间轴数据搜索
*/
const searchTimeList = (val:any) =>{
const searchTimeList = (val:any,clas?:number) =>{
loadTimePage.value = true
console.log("时间轴数据搜索",val)
console.log("时间轴数据搜索--->",props.columnsFilter)
@ -80,13 +87,16 @@ const searchTimeList = (val:any) =>{
dayType:"",
mapWord:""
}
console.log("时间轴数据搜索-11111-->",timeInfoList.value.length)
if(timeInfoList.value.length > 0){
val.oldData = json2string(timeInfoList.value)
}else{
val.oldData = ""
if(clas && clas != 1){
console.log("时间轴数据搜索-11111-->",timeInfoList.value.length)
if(timeInfoList.value.length > 0){
val.oldData = json2string(timeInfoList.value)
}else{
val.oldData = ""
}
}
multiViewPage(val)
.then((data:any) =>{
console.log("时间轴数据搜索--1->",data)
@ -118,7 +128,7 @@ defineExpose({
@ 功能: 判断当前值
*/
const judgeGainVal = (key:string,val:any) => {
console.log("判断当前值--1->",val)
// console.log("--1->",val)
if(val[key]){
return val[key]
}
@ -146,6 +156,20 @@ const showWork = computed(() => {
}
return ary
})
/**
@ 作者: 秦东
@ 时间: 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;
}
</script>
<template>
<ul v-infinite-scroll="loadTimeLog" class="infinite-list" :infinite-scroll-disabled="timeDisabled">
@ -156,45 +180,45 @@ const showWork = computed(() => {
<el-timeline-item center v-for="(item,sunIndex) in timeInfoList" :key="index" :hollow="item.class_type$unit==1" :type="item.class_type$unit==1?'primary':''" :icon="item.class_type$unit==1?'':'MoreFilled'" :size="item.class_type$unit==1?'large':''">
<div class="timeLeft" v-if="item.class_type$unit==1">
<table>
<tr>
<td rowspan="2">
<el-text class="leftDay">{{item.day}}</el-text>
</td>
<td >
<el-text>{{item.weekDay}}</el-text>
</td>
</tr>
<tr>
<td >
<el-text>{{item.dateTime}}</el-text>
</td>
</tr>
</table>
</div>
<div class="leftCont" v-if="item.class_type$unit==1">
</div>
<el-card v-if="item.class_type$unit!=1">
<table>
<tr>
<td rowspan="2">
<el-text class="leftDay">{{item.day}}</el-text>
</td>
<td >
<el-text>{{item.weekDay}}</el-text>
</td>
</tr>
<tr>
<td >
<el-text>{{item.dateTime}}</el-text>
</td>
</tr>
</table>
</div>
<div class="leftCont" v-if="item.class_type$unit==1">
</div>
<el-card v-if="item.class_type$unit!=1" @click="lookPageInfo(item)">
<el-descriptions
class="margin-top"
title=""
:column="3"
border
>
<el-descriptions-item v-for="itemField in showWork" :label="itemField.label" >
{{judgeGainVal(itemField.field,item)}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions
class="margin-top"
title=""
:column="3"
border
>
<el-descriptions-item v-for="itemField in showWork" :label="itemField.label" >
{{judgeGainVal(itemField.field,item)}}
</el-descriptions-item>
</el-descriptions>
<!-- <div v-for="itemField in props.columnsFilter" >
<div v-if="itemField.fieldClass!='-'&&itemField.fieldClass!='__control'">
{{itemField.label}}:{{judgeGainVal(itemField.field,item)}}
</div>
</div> -->
</el-card>
<!-- <div v-for="itemField in props.columnsFilter" >
<div v-if="itemField.fieldClass!='-'&&itemField.fieldClass!='__control'">
{{itemField.label}}:{{judgeGainVal(itemField.field,item)}}
</div>
</div> -->
</el-card>
</el-timeline-item>
@ -236,11 +260,12 @@ const showWork = computed(() => {
element-loading-svg-view-box="-10, -10, 50, 50"
></p>
<p class="jichuClass sizeMove" v-if="noMore">数据已全部展示</p>
<FormPageCont v-model:is-show="lookPageInfoIsShow" :drawer-with="props.drawerWith" :page-info="pageInfoCont" :table-page-class="tablePageClass" :oper-state="operState" @getPageData="getPageData" />
</ul>
</template>
<style lang='scss' scoped>
.infinite-list {
height: calc(100vh - 345px);
height: calc(100vh - 280px);
// height:100px;
padding: 10px 0 0 0;
margin: 20px 0 0 0;

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

@ -374,7 +374,7 @@ onMounted(()=>{
})
const getFormItemLableStyle = (ele: any) => {
if(ele?.labelStyle){
if(ele?.labelStyle){
// console.log("3",AnalysisCss(ele?.labelStyle))
return AnalysisCss(ele?.labelStyle)
}

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

@ -133,6 +133,7 @@ const getCustomrrFormInfo = () => {
})
.finally(()=>{
formLoading.value = false;
//alert(props.pageInfo.masters_key)
gainEditDataLog({id:props.pageInfo.masters_key})
.then(({data})=>{
console.log("获取修改记录-1111-->",data)

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

@ -12,13 +12,18 @@ import { inputUnit,timeUnit,choiceUnit,switchUnit,orgUnit,checkboxUnit } from '@
import type { FormInstance, FormRules,ElNotification } from 'element-plus'
import { gainFormPageListCont } from '@/api/DesignForm/requestapi'
import { Picture,InfoFilled,QuestionFilled } from '@element-plus/icons-vue'
import request from '@/utils/request';
import { softDeletion,retractRunWorkFlow } from '@/api/taskapi/management'
//
import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue'
import TableFlow from '@/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue'
import TimeAxisPage from '@/components/DesignForm/app/timeAxis.vue'
import CardPage from '@/components/DesignForm/app/cardPage.vue'
import GanttPage from '@/components/DesignForm/app/gannttPage.vue'
import MapPage from '@/components/DesignForm/app/mapPage.vue'
import CalendarPage from '@/components/DesignForm/app/calendar/calendar1/calendarPage.vue'
const props = withDefaults(
defineProps<{
@ -89,6 +94,7 @@ const designStore = useDesignFormStore()
const route = useRoute()
const router = useRouter()
const tableDataList = ref([]) //
const currentAsfTableDataList = ref([])//
const openTaskDrawer = ref(false) //
const state = reactive({
@ -104,6 +110,9 @@ const state = reactive({
columnsCheck: designStore.getColumnsCheck(route.path),
currentNodeKey: ''
})
const viewType = ref(1)
const viewLayout = ref<any>()
/**
@ 作者: 秦东
@ 时间: 2024-03-28 16:03:12
@ -281,6 +290,19 @@ watch(()=>props.lookPageIsShow,(val:boolean)=>{
}
})
const timeAxisRef = ref(null)
const calendarPageRef = ref(null)
const cardPageRef = ref(null)
const searchSend = reactive({
formId:props.formId,
page:state.currentPage,
pagesize:state.pageSize,
searchData:json2string(props.searchData),
viewClass:{}
})
let asfDetails = []
let asfQueryParams: any[] = []
/**
@ 作者: 秦东
@ 时间: 2024-04-01 15:51:32
@ -293,22 +315,273 @@ const getPageData = () => {
page:state.currentPage,
pagesize:state.pageSize,
searchData:json2string(props.searchData)
//searchData:"id:1"
}
console.log("获取列表详细信息",sendData)
switch(viewType.value){
case 2:
nextTick(()=>{
// console.log("-------555---------->",calendarPageRef.value)
calendarPageRef.value.calendarSearchData(sendData)
})
// calendarPageRef.value.calendarSearchData()
break;
case 3:
nextTick(()=>{
// console.log("-------222---------->",timeAxisRef.value)
timeAxisRef.value.searchTimeList(sendData,1)
})
break;
case 4:
break;
case 5:
break;
case 6:
nextTick(()=>{
cardPageRef.value.getCardList(sendData)
})
break;
default:
gainFormPageListCont(sendData)
.then((data)=>{
//console.log("----------------->",data)
//liwenxuan start
let dataList = data
//console.log(dataList)
asfDetails = props.data.columns.filter((item: any) => {
return item.fieldClass=="associatedForms"
})
if(asfDetails.length>0&&data.data.list!=null){
//console.log(data.data.list)
//,asf
asfQueryParams = []
for(let j = 0;j< asfDetails.length;j++){
let asfQueryParamsItem :any = {}
//console.log(asfDetails[j])
asfQueryParamsItem.formId = asfDetails[j].control.formid
asfQueryParamsItem.field = asfDetails[j].field
let asfToSelectIds = []
for(let i = 0;i<data.data.list.length;i++){
let asfMasterAndAsfId:any = {}
asfMasterAndAsfId.asfId = data.data.list[i][asfDetails[j].field]
asfMasterAndAsfId.asfMasterId = data.data.list[i].id
asfToSelectIds.push(asfMasterAndAsfId)
}
asfQueryParamsItem.asfToSelectIds = asfToSelectIds
asfQueryParams.push(asfQueryParamsItem)
}
let queryCount = 0
for(let i = 0;i<asfQueryParams[0].asfToSelectIds.length;i++){
if(asfQueryParams[0].asfToSelectIds[i].asfId!=""){
queryCount++
}
}
//console.log(asfQueryParams)
if(queryCount>0){
getAsfDataTitlesByIds(asfQueryParams).then(({ data }) => {
//console.log(data)
for(let i = 0;i<dataList.data.list.length; i++){
//console.log(dataList.data.list[i])
for(let j = 0;j<data.length;j++){
//console.log(data[j])
for(let n = 0;n<data[j].list.length;n++){
if(dataList.data.list[i].id==data[j].list[n].asfMasterId){
dataList.data.list[i][data[j].field] = data[j].list[n].label
}
//console.log(data[j].list[n])
}
}
}
tableDataList.value = dataList.data.list
});
}else{
tableDataList.value = data.data.list
}
}else{
tableDataList.value = data.data.list
}
//liwenxuan end
state.total = data.data.total
state.loading = false;
})
.finally(()=>{
state.loading = false;
})
}
}
const asfGetPageData = (asfFormId: any,asfToSelectMastersKey: any) => {
let searchData = [{"id":"id","label":"Id","field":"id","type":"bigint(20)","attribute":"","pattern":"bigint","fieldClass":"id","activeValue":"","inactiveValue":"","config":{"optionsType":0},"control":{"optionsValue3Formid":"","optionsValue3Field":""},"options":[],"isSearch":true,"value":asfToSelectMastersKey}]
//state.loading = true;
let sendData = {
formId:asfFormId,
page:1,
pagesize:1,
searchData:json2string(searchData)
}
//console.log("asf",sendData)
gainFormPageListCont(sendData)
.then((data)=>{
console.log("获取列表详细信息----------------->",data)
tableDataList.value = data.data.list
//console.log("----------------->",data)
//liwenxuan start
let dataList = data
//console.log(dataList)
asfDetails = props.data.columns.filter((item: any) => {
return item.fieldClass=="associatedForms"
})
if(asfDetails.length>0){
//console.log(data.data.list)
//,asf
let asfAsfQueryParams = []
for(let j = 0;j< asfDetails.length;j++){
let asfQueryParamsItem :any = {}
//console.log(asfDetails[j])
asfQueryParamsItem.formId = asfDetails[j].control.formid
asfQueryParamsItem.field = asfDetails[j].field
let asfToSelectIds = []
for(let i = 0;i<data.data.list.length;i++){
let asfMasterAndAsfId:any = {}
asfMasterAndAsfId.asfId = data.data.list[i][asfDetails[j].field]
asfMasterAndAsfId.asfMasterId = data.data.list[i].id
asfToSelectIds.push(asfMasterAndAsfId)
}
asfQueryParamsItem.asfToSelectIds = asfToSelectIds
asfAsfQueryParams.push(asfQueryParamsItem)
}
let queryCount = 0
for(let i = 0;i<asfAsfQueryParams[0].asfToSelectIds.length;i++){
if(asfAsfQueryParams[0].asfToSelectIds[i].asfId!=undefined&&asfAsfQueryParams[0].asfToSelectIds[i].asfId!=""){
queryCount++
}
}
//console.log(asfAsfQueryParams)
if(queryCount>0){
getAsfDataTitlesByIds(asfAsfQueryParams).then(({ data }) => {
//console.log(data)
for(let i = 0;i<dataList.data.list.length; i++){
//console.log(dataList.data.list[i])
for(let j = 0;j<data.length;j++){
//console.log(data[j])
for(let n = 0;n<data[j].list.length;n++){
if(dataList.data.list[i].id==data[j].list[n].asfMasterId){
dataList.data.list[i][data[j].field] = data[j].list[n].label
}
//console.log(data[j].list[n])
}
}
}
currentAsfTableDataList.value = dataList.data.list
});
}else{
currentAsfTableDataList.value = data.data.list
}
}else{
currentAsfTableDataList.value = data.data.list
}
/* //liwenxuan 关联表单数据获取 end
state.total = data.data.total
state.loading = false;
state.loading = false; */
})
.finally(()=>{
state.loading = false;
/* state.loading = false; */
//
tablePageClass.value = 4;
drawerWith.value = container.value?.clientWidth
asflookPageInfoIsShow.value = true;
})
}
onMounted(()=>{
getPageData()
nextTick(()=>{
drawerWith.value = container.value?.clientWidth
})
})
//liwenxuan start
function getAsfDataTitlesByIds(asfQueryParams: any[]) {
return request({
url: '/javasys/lowCode/AssociatedForms/getAsfDataTitlesByIds',
method: 'post',
data: asfQueryParams,
});
}
//liwenxuan end
const asfShowDetailsFlag = ref(false)
//liwenxuan start
function showAsfDetailDialog(item: any,scope: any,asfQueryParams: any){
let val = scope.row
//asfShowDetailsFlag.value= true
/* console.log("item----------------->",item)
console.log("scope----------------->",scope)
console.log("asfQueryParams----------------->",asfQueryParams)
console.log("val----------------->",val) */
let asfFormId = item.control.formid//customer_formid
//alert("asfFormId:"+asfFormId)
let scopeColumnProperty = scope.column.property//exp:associatedForms1720570283525
let asfQueryParamsNAsfToSelectIdsNAsfMasterId = val.id
//alert(asfQueryParamsNAsfToSelectIdsNAsfMasterId)
let asfToSelectMastersKey = ""
for(let i = 0;i<asfQueryParams.length;i++){
if(asfQueryParams[i].field == scopeColumnProperty){
for(let j = 0;j<asfQueryParams[i].asfToSelectIds.length;j++){
if(asfQueryParams[i].asfToSelectIds[j].asfMasterId==asfQueryParamsNAsfToSelectIdsNAsfMasterId){
asfToSelectMastersKey = asfQueryParams[i].asfToSelectIds[j].asfId
}
}
}
}
//alert("asfToSelectMastersKey:"+asfToSelectMastersKey)
asfGetPageData(asfFormId,asfToSelectMastersKey)
}
//liwenxuan end
/**
@ 作者: 秦东
@ 时间: 2024-04-02 13:59:21
@ -371,6 +644,7 @@ const drawerWith = ref(); //编辑表单时抽屉宽度
*/
const tablePageClass = ref(1)
const lookPageInfoIsShow = ref(false)
const asflookPageInfoIsShow = ref(false)
const pageInfoCont = ref<any>()
const lookPageInfo = (val:any) => {
tablePageClass.value = 4;
@ -448,10 +722,67 @@ const editFormSendFlow = (val:any) => {
drawerWith.value = container.value?.clientWidth
lookPageInfoIsShow.value = true;
}
/**
@ 作者: 秦东
@ 时间: 2024-07-08 09:39:52
@ 功能: 切换视图展示方式
*/
const tabsView = (val:any,types:number) => {
viewType.value = types
val.isClick = true
viewLayout.value = val
console.log("切换视图展示方式",val)
switch(types){
case 2:
props.viewPage.list.isClick = false
props.viewPage.time.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.map.isClick = false
props.viewPage.card.isClick = false
break;
case 3:
props.viewPage.list.isClick = false
props.viewPage.date.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.map.isClick = false
props.viewPage.card.isClick = false
getPageData()
break;
case 4:
props.viewPage.list.isClick = false
props.viewPage.date.isClick = false
props.viewPage.time.isClick = false
props.viewPage.map.isClick = false
props.viewPage.card.isClick = false
break;
case 5:
props.viewPage.list.isClick = false
props.viewPage.date.isClick = false
props.viewPage.time.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.card.isClick = false
break;
case 6:
props.viewPage.list.isClick = false
props.viewPage.date.isClick = false
props.viewPage.time.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.map.isClick = false
break;
default:
props.viewPage.date.isClick = false
props.viewPage.card.isClick = false
props.viewPage.time.isClick = false
props.viewPage.gantt.isClick = false
props.viewPage.map.isClick = false
break;
}
}
</script>
<template>
<div ref="container" v-loading="state.loading" class="table-list-comm">
<el-row class="rowBox">
<el-col :span="24">
<el-form v-if="config.searchIsShow" ref="ruleSearchForm" class="seacherForm">
@ -542,13 +873,12 @@ const editFormSendFlow = (val:any) => {
:key="item.type"
@click="setUpClick(item)"
>
{{ item.label }}123
{{ item.label }}
</el-button>
</div>
<div>
<el-button-group class="ml-4">
<el-tooltip
v-if="config.searchFormIsShow"
class="box-item"
effect="dark"
content="折叠查询表单"
@ -563,7 +893,16 @@ const editFormSendFlow = (val:any) => {
content="列表视图"
placement="top"
>
<el-button size="small" class="fa fa-table" :color="viewPage.list.isClick?'#a0cfff':''" @click="tabsView(viewPage.list)" />
<el-button size="small" class="fa fa-table" :color="viewPage.list.isClick?'#a0cfff':''" @click="tabsView(viewPage.list,1)" />
</el-tooltip>
<el-tooltip
v-if="props.viewPage.card&&props.viewPage.card.status"
class="box-item"
effect="dark"
content="卡片视图"
placement="top"
>
<el-button size="small" class="fa fa-id-card-o" :color="props.viewPage.card&&props.viewPage.card.isClick?'#a0cfff':''" @click="tabsView(props.viewPage.card,6)" />
</el-tooltip>
<el-tooltip
v-if="viewPage.date.status"
@ -572,7 +911,7 @@ const editFormSendFlow = (val:any) => {
content="日历视图"
placement="top"
>
<el-button size="small" class="fa fa-calendar" />
<el-button size="small" class="fa fa-calendar" :color="viewPage.date.isClick?'#a0cfff':''" @click="tabsView(viewPage.date,2)" />
</el-tooltip>
<el-tooltip
v-if="viewPage.time.status"
@ -581,7 +920,7 @@ const editFormSendFlow = (val:any) => {
content="时间轴"
placement="top"
>
<el-button size="small" class="fa fa-clock-o" />
<el-button size="small" class="fa fa-clock-o" :color="viewPage.time.isClick?'#a0cfff':''" @click="tabsView(viewPage.time,3)" />
</el-tooltip>
<el-tooltip
v-if="viewPage.gantt.status"
@ -590,7 +929,7 @@ const editFormSendFlow = (val:any) => {
content="甘特图"
placement="top"
>
<el-button size="small" class="fa fa-bar-chart" />
<el-button size="small" class="fa fa-bar-chart" :color="viewPage.gantt.isClick?'#a0cfff':''" @click="tabsView(viewPage.gantt,4)" />
</el-tooltip>
<el-tooltip
v-if="viewPage.map.status"
@ -599,14 +938,14 @@ const editFormSendFlow = (val:any) => {
content="地图视图"
placement="top"
>
<el-button size="small" class="fa fa-map-signs" />
<el-button size="small" class="fa fa-map-signs" :color="viewPage.map.isClick?'#a0cfff':''" @click="tabsView(viewPage.map,5)" />
</el-tooltip>
</el-button-group>
</div>
</div>
</el-col>
<el-col :span="24">
<el-col v-if="viewType==1" :span="24">
<el-table
v-bind="data.tableProps"
ref="table"
@ -748,11 +1087,22 @@ const editFormSendFlow = (val:any) => {
<template v-if="item.fieldClass=='baidumap'" #default="scope">
{{scope.row[scope.column.property]}}
</template>
<template v-if="item.fieldClass=='associatedForms'" #default="scope">
<el-button
key="primary"
type="primary"
link
@click="showAsfDetailDialog(item,scope,asfQueryParams)"
>
{{scope.row[scope.column.property]}}
</el-button>
</template>
</el-table-column>
</template>
</el-table>
</el-col>
<el-col v-if="state.total > 0" :span="24">
<el-col v-if="viewType==1&&state.total > 0" :span="24">
<div class="pageBox">
<el-pagination
v-model:currentPage="state.currentPage"
@ -765,6 +1115,21 @@ const editFormSendFlow = (val:any) => {
/>
</div>
</el-col>
<el-col v-if="viewType==2" :span="24">
<CalendarPage ref="calendarPageRef" :search-send="searchSend" :body-hight="265" :drawer-with="drawerWith" :view-setup="viewPage.card" />
</el-col>
<el-col v-if="viewType==3" :span="24">
<TimeAxisPage ref="timeAxisRef" :data="tableDataList" :view-layout="viewLayout" :columns-filter="columnsFilter" :search-send="searchSend" :drawer-with="drawerWith" />
</el-col>
<el-col v-if="viewType==4" :span="24">
<GanttPage ref="ganttPageRef" :search-send="searchSend" :drawer-with="drawerWith" :view-setup="viewPage.gantt" />
</el-col>
<el-col v-if="viewType==5" :span="24">
<MapPage ref="mapPageRef" :search-send="searchSend" :drawer-with="drawerWith" :view-setup="viewPage.map" />
</el-col>
<el-col v-if="viewType==6" :span="24">
<CardPage ref="cardPageRef" :search-send="searchSend" :drawer-with="drawerWith" :view-setup="viewPage.card" :columns-filter="columnsFilter" />
</el-col>
<el-col :span="24" style="display:none">
{{ tableDataList}}
@ -832,8 +1197,13 @@ const editFormSendFlow = (val:any) => {
</el-col>
</el-row>
<FormPageCont v-model:is-show="lookPageInfoIsShow" :drawer-with="drawerWith" :page-info="pageInfoCont" :table-page-class="tablePageClass" :oper-state="operState" @getPageData="getPageData" />
<FormPageCont v-model:is-show="asflookPageInfoIsShow" :drawer-with="drawerWith" :page-info="currentAsfTableDataList[0]" :table-page-class="tablePageClass" :oper-state="operState" @getPageData="getPageData" />
<TableFlow v-model:isopen="openTaskDrawer" :versionid="props.versionid" :versiontitle="props.versiontitle" :drawerwith="drawerWith" @searchquery="getListData" />
<el-dialog v-model="asfShowDetailsFlag" title="关联表单详情查看" top="20px" style="margin-top:70px,margin-left:270px">
的事发生飞洒地方撒旦撒旦发
</el-dialog>
</div>
</template>

22
src/layout/components/Navbar.vue

@ -19,6 +19,28 @@ function toggleSideBar() {
appStore.toggleSidebar(true);
}
const date: Date = new Date();
const tipsType = ref<number>(1)
const greetings = computed(() => {
if (date.getHours() >= 6 && date.getHours() < 8) {
tipsType.value = 1
return "晨起披衣出草堂,轩窗已自喜微凉🌅!";
} else if (date.getHours() >= 8 && date.getHours() < 12) {
tipsType.value = 2
return "上午好🌞!";
} else if (date.getHours() >= 12 && date.getHours() < 18) {
tipsType.value = 3
return "下午好☕!";
} else if (date.getHours() >= 18 && date.getHours() < 24) {
tipsType.value = 4
return "晚上好🌃!";
} else if (date.getHours() >= 0 && date.getHours() < 6) {
tipsType.value = 5
return "偷偷向银河要了一把碎星,只等你闭上眼睛撒入你的梦中,晚安🌛!";
}
});
</script>

6
src/main.ts

@ -24,6 +24,8 @@ import 'uno.css';
import '@/styles/workflowcss/override-element-ui.scss'
import ComComponents from '@/components/DesignForm/index'
import ComWidget from '@/widget/index'
import AKDesign from '@/views/sysworkflow/codepage/index'
import * as pinia from './store/index'
@ -44,8 +46,8 @@ app.directive('focus', {
}
});
app.use(router).use(i18n).use(ComComponents).use(ElementPlus, {
app.use(router).use(i18n).use(ComComponents).use(ComWidget).use(ElementPlus, {
locale: zhCn
}).use(pinia.store).mount('#app');
}).use(AKDesign).use(pinia.store).mount('#app');

2
src/permission.ts

@ -18,7 +18,7 @@ router.beforeEach(async (to:any, from:any, next:any) => {
NProgress.start();
const hasToken = localStorage.getItem(appTokenKey);
console.log("白名单路由----》",hasToken,"--->",to.path);
// console.log("白名单路由----》",hasToken,"--->",to.path);
if (hasToken) {
// console.log("白名单路由--22--》",hasToken,to.path);
if (to.path === "/login") {

8
src/store/modules/user.ts

@ -35,7 +35,7 @@ export const useUserStore = defineStore("user", () => {
return new Promise<void>((resolve, reject) => {
loginApiIng(loginData)
.then((response:any) => {
console.log("登陆使用",response);
//console.log("登陆使用",response);
const { tokenType, accessToken, key, token,userinfo } = response.data;
tokenIng.value = key + "_" + token; // Bearer eyJhbGciOiJIUzI1NiJ9.xxx.xxx
userKey.value = key;
@ -51,11 +51,11 @@ export const useUserStore = defineStore("user", () => {
function loginSilent(loginData: any) {
console.log("登陆使用1",loginData);
//console.log("登陆使用1",loginData);
return new Promise<void>((resolve, reject) => {
silentLogin(loginData)
.then((response:any) => {
console.log("登陆使用",response);
//console.log("登陆使用",response);
const { tokenType, accessToken, key, token,userinfo } = response.data;
tokenIng.value = key + "_" + token; // Bearer eyJhbGciOiJIUzI1NiJ9.xxx.xxx
userKey.value = key;
@ -92,7 +92,7 @@ export const useUserStore = defineStore("user", () => {
// });
getUserInfoIng()
.then(({data})=>{
console.log("获取用户信息:角色必须是非null数组!",data);
// console.log("获取用户信息:角色必须是非null数组!",data);
// debugger;
if (!data) {
return reject("验证失败,请重新登录。");

Loading…
Cancel
Save