iZaiZaiA 2 vuotta sitten
vanhempi
commit
87c317acda

+ 8 - 0
src/api/modules/tasks/flow.js

@@ -41,4 +41,12 @@ export default {
             data: form
         }, msg);
     },
+    //删除
+    async removeFixedFlowData(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-business/fixedFlow/remove',
+            method: 'post',
+            params: form
+        }, msg);
+    },
 }

+ 0 - 25
src/styles/data-fill/wbs.scss

@@ -95,31 +95,6 @@
         flex: 1;
         position: relative;
         margin-left: 24px;
-        .hc-card-max-h-box {
-            position: relative;
-            height: calc(100% - 56px);
-            overflow-y: auto;
-            scroll-behavior: smooth;
-            &.node-tree {
-                height: 100%;
-                .hc-tree-foot-tip-box {
-                    padding: 15px 0;
-                    text-align: center;
-                    border: 0;
-                    z-index: 11;
-                    .dot-view {
-                        width: auto;
-                        margin-top: 0;
-                    }
-                    .dot-view + .dot-view {
-                        margin-left: 80px;
-                    }
-                }
-            }
-            &::-webkit-scrollbar {
-                width: 0;
-            }
-        }
         .data-fill-foot-box {
             position: absolute;
             bottom: 0;

+ 1 - 0
src/views/data-fill/components/ListItem.vue

@@ -597,6 +597,7 @@ defineExpose({
 <style lang="scss" scoped>
 .data-fill-list-box {
     position: relative;
+    margin-bottom: 25%;
     .hc-collapse-item-header {
         flex: 1;
         position: relative;

+ 1 - 0
src/views/data-fill/wbs.vue

@@ -136,6 +136,7 @@
                     <el-scrollbar ref="ListItemScrollRef" v-loading="ListItemLoading" v-if="ListItemDatas.length > 0">
                         <ListItem ref="ListItemRef" :datas="ListItemDatas" :status="NodeStatus" :classify="authBtnTabKey" @offsetTop="ListItemOffsetTop" @renew="getTableDataAll"/>
                     </el-scrollbar>
+
                     <HcStatus text="暂无表单" v-else/>
 
                     <!--底部按钮区域-->

+ 3 - 4
src/views/gauge/bezier.vue

@@ -649,12 +649,11 @@ const partRules = {
         required: true,
         validator: (rule, value, callback) => {
             const reg = /^[A-Z]+$/
-            if (!value) {
-                callback(new Error('请输入桩号前缀'))
-            } else if (!reg.test(value)) {
+            if (value && !reg.test(value)) {
                 callback(new Error('只允许输入大写的英文字母'))
+            } else {
+                callback()
             }
-            callback()
         },
         trigger: "blur",
     }

+ 102 - 32
src/views/ledger/components/table-form.vue

@@ -6,16 +6,23 @@
                     <div class="hc-excel-table-form-view" :id="`table-form-${excelIdVal}`"></div>
                 </el-scrollbar>
                 <HcStatus :desc="statusDesc" v-else/>
-                <div class="hc-fixed-page" v-if="formLogDataList.length > 1">
-                    <el-scrollbar>
+            </div>
+            <div class="hc-fixed-page" v-if="formLogDataList.length > 1">
+                <el-scrollbar>
+                    <div class="hc-fixed-page-list-box">
                         <template v-for="(item,index) in formLogDataList">
-                            <el-button :type="index === formLogIndex ? 'primary' : ''" hc-btn @click="getBussDataInfo(index)">
-                                <HcIcon name="sticky-note"/>
-                                <span>第{{index + 1}}页</span>
-                            </el-button>
+                            <div class="fixed-page-item" :class="index === formLogIndex ? 'primary' : ''" @click="getBussDataInfo(index)">
+                                <div class="name-box">
+                                    <HcIcon name="sticky-note"/>
+                                    <span class="page">第{{index + 1}}页</span>
+                                </div>
+                                <div class="close-box" @click.stop="closeBussDataInfo(index)">
+                                    <HcIcon name="close"/>
+                                </div>
+                            </div>
                         </template>
-                    </el-scrollbar>
-                </div>
+                    </div>
+                </el-scrollbar>
             </div>
             <div class="hc-right-pian-box hc-flex-column">
                 <DateCalendar :dateData="dateData" @choice-date="dateCalendarChoice"/>
@@ -91,8 +98,7 @@
 
         <!--复制任意时间-->
         <HcDialog :show="copyTimeModal" title="复制任意时间" widths="360px" bg-color="#f1f5f8" saveText="复制" @close="copyTimeModal = false" :loading="copyTimeLoading" @save="copyTimeSaveClick">
-            <DateCalendar :dateData="dateData" @choice-date="copyTimeChoice"/>
-            <el-alert title="请选择一个日期复制" type="warning" show-icon/>
+            <el-alert title="等接口中..." type="warning" show-icon/>
         </HcDialog>
 
         <!--批量上报审批-->
@@ -122,6 +128,10 @@ const props = defineProps({
     items: {
         type: Object,
         default: () => ({})
+    },
+    userName: {
+        type: [String,Number],
+        default: ''
     }
 })
 
@@ -129,6 +139,7 @@ const props = defineProps({
 const projectId = ref(props.projectId);
 const contractId = ref(props.contractId);
 const menuItem = ref(props.items);
+const userName = ref(props.userName);
 const excelIdVal = ref('');
 const statusDesc = ref('');
 
@@ -137,10 +148,12 @@ watch(() => [
     props.projectId,
     props.contractId,
     props.items,
-], ([pid, cid, item]) => {
+    props.userName,
+], ([pid, cid, item, name]) => {
     projectId.value = pid
     contractId.value = cid
     menuItem.value = item
+    userName.value = name
     getQueryData()
 })
 
@@ -153,13 +166,24 @@ nextTick(() => {
 const getQueryData = () => {
     const {excelId} = menuItem.value
     excelIdVal.value = excelId > 0 ? excelId + '' : ''
+    const date = recordDate.value, time = recordTime.value
+    if (date && time) {
+        getExcelBusinessData(date,time)
+    }
 }
 
 //日期日历回调
 const recordTime = ref('')
+const recordDate = ref('')
 const dateCalendarChoice = ({date, choices}) => {
-    const {primaryKeyId} = menuItem.value
     recordTime.value = choices
+    recordDate.value = date
+    getExcelBusinessData(date,choices)
+}
+
+//获取数据
+const getExcelBusinessData = (date,choices) => {
+    const {primaryKeyId} = menuItem.value
     getExcelHtml(excelIdVal.value)
     getTheLogBusinessData(excelIdVal.value, choices)
     getSubmitLogDateList(date,primaryKeyId)
@@ -515,7 +539,8 @@ const copyTimeChoice = ({choices}) => {
 //确认复制
 const copyTimeLoading = ref(false)
 const copyTimeSaveClick = async () => {
-    copyTimeLoading.value = true
+    copyTimeModal.value = false
+    /*copyTimeLoading.value = true
     const {primaryKeyId} = menuItem.value
     const { error, code } = await queryApi.copyTheLogBusinessData({
         contractId: contractId.value || '',
@@ -529,7 +554,7 @@ const copyTimeSaveClick = async () => {
         window?.location?.reload()  //刷新页面
     } else {
         window?.$message?.warning('复制失败')
-    }
+    }*/
 }
 
 //设置表单默认数据
@@ -547,13 +572,19 @@ const setFormDefaultData = (formInfo = {}) => {
     }
 }
 
+//删除记录
+const closeBussDataInfo = (index) => {
+    formLogDataList.value.splice(index, 1)
+    formLogIndex.value = index <= 0 ?  0 : index - 1
+}
+
 //批量上报
 const reportTaskName = ref('')
 const reportAddition = ref({})
 const showReportModal = ref(false)
 const reportModalClick = () => {
     const {primaryKeyId,title} = menuItem.value
-    reportTaskName.value = `${recordTime.value} ${title}`
+    reportTaskName.value = `${recordTime.value} ${title} ${userName.value}`
     reportAddition.value = {
         nodePrimaryKeyId: primaryKeyId,
         recordTime: recordTime.value,
@@ -605,6 +636,12 @@ const theLogOneAbolish = async () => {
     position: relative;
     margin-left: 24px;
     height: 100%;
+    .hc-table-forem-box, .hc-fixed-page, .hc-right-pian-box, .hc-footer-box {
+        padding: 24px;
+        background: #f1f5f8;
+        border-radius: 10px;
+        box-shadow: -2px 0px 10px 0px rgba(32,37,50,0.03), 0px 10px 21px 20px rgba(32,37,50,0.03);
+    }
     .hc-content-box {
         flex: 1;
         display: flex;
@@ -613,28 +650,64 @@ const theLogOneAbolish = async () => {
         height: calc(100% - 105px);
         .hc-table-forem-box {
             flex: 1;
-            padding: 24px;
             margin-right: 24px;
             position: relative;
-            background: #f1f5f8;
-            border-radius: 10px;
-            box-shadow: -2px 0px 10px 0px rgba(32,37,50,0.03), 0px 10px 21px 20px rgba(32,37,50,0.03);
-            .hc-fixed-page {
-                position: absolute;
-                top: 4px;
-                right: 4px;
-                bottom: 4px;
-                z-index: 99;
-                overflow: hidden;
+        }
+        .hc-fixed-page {
+            position: relative;
+            margin-right: 24px;
+            padding: 0;
+            .hc-fixed-page-list-box {
+                position: relative;
+                padding: 24px;
+                user-select: none;
+                .fixed-page-item {
+                    position: relative;
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-between;
+                    border-radius: 3px;
+                    padding: 6px 10px;
+                    font-size: 14px;
+                    background: #f1f5f8;
+                    border: 1px solid #f1f5f8;
+                    color: var(--el-color-primary-light-3);
+                    box-shadow: 4px 4px 8px 0 rgba(54,92,167,0.15), -4px -4px 8px 0 #ffffff;
+                    transition: .1s;
+                    .name-box {
+                        position: relative;
+                        display: flex;
+                        align-items: center;
+                        margin-right: 24px;
+                        cursor: pointer;
+                        .page {
+                            margin-left: 5px;
+                        }
+                    }
+                    .close-box {
+                        position: relative;
+                        display: flex;
+                        align-items: center;
+                        justify-content: center;
+                        cursor: pointer;
+                        font-size: 16px;
+                    }
+                    &.primary {
+                        background: var(--el-color-primary);
+                        color: var(--el-color-white);
+                        box-shadow: var(--hc-shadow);
+                        border: 1px solid #f1f5f8;
+                    }
+                    &+.fixed-page-item{
+                        margin-top: 20px;
+                    }
+                }
             }
         }
         .hc-right-pian-box {
             width: 360px;
             position: relative;
             padding: 24px 20px;
-            background: #f1f5f8;
-            border-radius: 10px;
-            box-shadow: -2px 0px 10px 0px rgba(32,37,50,0.03), 0px 10px 21px 20px rgba(32,37,50,0.03);
             .hc-process-box {
                 position: relative;
                 flex: 1;
@@ -672,12 +745,9 @@ const theLogOneAbolish = async () => {
     .hc-footer-box {
         position: relative;
         height: 80px;
-        background: #f1f5f8;
-        border-radius: 10px;
         display: flex;
         align-items: center;
         padding: 20px 24px;
-        box-shadow: -2px 0px 10px 0 rgba(32,37,50,0.03), 0 -10px 21px 3px rgba(32,37,50,0.03);
         overflow: hidden;
     }
 }

+ 2 - 1
src/views/ledger/query.vue

@@ -15,7 +15,7 @@
                     </el-menu>
                 </el-scrollbar>
             </div>
-            <HcTableForm :projectId="projectId" :contractId="contractId" :items="menuItem" v-if="menuType === 'form'"/>
+            <HcTableForm :projectId="projectId" :contractId="contractId" :items="menuItem" :userName="userInfo['real_name']" v-if="menuType === 'form'"/>
             <HcTableList :projectId="projectId" :contractId="contractId" :items="menuItem" v-if="menuType === 'table'"/>
         </template>
     </div>
@@ -35,6 +35,7 @@ const useAppState = useAppStore()
 //全局变量
 const projectId = ref(useAppState.getProjectId);
 const contractId = ref(useAppState.getContractId);
+const userInfo = ref(useAppState.getUserInfo);
 
 //渲染完成
 onMounted(()=> {

+ 33 - 2
src/views/tasks/flow.vue

@@ -15,7 +15,10 @@
             <HcTable :column="tableListColumn" :datas="tableListData" :loading="tableLoading">
                 <template #action="{row}">
                     <HcTooltip keys="tasks_flow_edit">
-                        <el-button type="primary" size="small" text @click="handleTableEdit(row)">编辑</el-button>
+                        <el-button type="danger" size="small" plain @click="handleTableDel(row)">删除</el-button>
+                    </HcTooltip>
+                    <HcTooltip keys="tasks_flow_edit">
+                        <el-button type="primary" size="small" plain @click="handleTableEdit(row)">编辑</el-button>
                     </HcTooltip>
                 </template>
             </HcTable>
@@ -76,7 +79,7 @@ const tableListData = ref([])
 const tableListColumn = ref([
     {key:'fixedFlowName', name: '流程名称'},
     {key:'linkUserJoinString', name: '流程详情'},
-    {key:'action', name: '操作', width: '100'},
+    {key:'action', name: '操作', width: '200', align: 'center'},
 ])
 
 const getTableData = async () => {
@@ -183,6 +186,34 @@ const saveFormClick = async () => {
         }
     }
 }
+
+//删除
+const handleTableDel = (row) => {
+    window?.$messageBox?.alert('是否删除当前流程?', '删除提醒', {
+        showCancelButton: true,
+        confirmButtonText: '确定删除',
+        cancelButtonText: '取消',
+        callback: (action) => {
+            if (action === 'confirm') {
+                removeFixedFlowData(row)
+            }
+        }
+    })
+}
+
+//确认删除
+const removeFixedFlowData = async (row) => {
+    const { error, code } = await tasksFlowApi.removeFixedFlowData({
+        ids: row?.id || '',
+        projectId: projectId.value,
+        contractId: contractId.value
+    })
+    //处理数据
+    if (!error && code === 200) {
+        window.$message?.success('删除成功')
+        getTableData()
+    }
+}
 </script>
 
 <style lang="scss" scoped>