浏览代码

reactor:消息通知新增权限按钮;工单坐席待办新增签收权限;

zhangchong 1 年之前
父节点
当前提交
c60e0f82e6
共有 2 个文件被更改,包括 164 次插入128 次删除
  1. 163 120
      src/views/auxiliary/notice/index.vue
  2. 1 8
      src/views/todo/seats/index.vue

+ 163 - 120
src/views/auxiliary/notice/index.vue

@@ -59,9 +59,9 @@
 				<el-button type="primary" @click="onNoticeAdd('0')" v-if="listType === '0'" v-auth="'auxiliary:notice:add'" title="新增通知">
 					<SvgIcon name="ele-Plus" class="mr5" />新增
 				</el-button>
-        <el-button type="primary" @click="onNoticeAdd('1')" v-else v-auth="'auxiliary:bulletin:add'" title="新增公告">
-          <SvgIcon name="ele-Plus" class="mr5" />新增
-        </el-button>
+				<el-button type="primary" @click="onNoticeAdd('1')" v-else v-auth="'auxiliary:bulletin:add'" title="新增公告">
+					<SvgIcon name="ele-Plus" class="mr5" />新增
+				</el-button>
 			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
@@ -76,26 +76,30 @@
 							{{ row.isMustRead ? '是' : '否' }}
 						</template>
 					</el-table-column>
-					<el-table-column label="已阅读数" show-overflow-tooltip >
+					<el-table-column label="已阅读数" show-overflow-tooltip>
 						<template #default="{ row }">
 							<el-popover placement="right" :width="450" trigger="click" popper-class="notice-container" v-if="[2].includes(row.circularState)">
 								<template #reference>
 									<el-button link type="primary">{{ row.readedNum + '/' + row.needReadNum }}</el-button>
 								</template>
-                <div class="notice-container-box">
-                  <div class="notice-container-box-inner">
-                    已读:{{ row.readedNum }}
-                    <el-scrollbar class="mt5" v-if="row.circularReadGroups?.length">
-                        <el-tag v-for="item in row.circularReadGroups.filter(i=>i.isRead)">{{row.circularType === 1 ? item.userName : item.orgName}}</el-tag>
-                    </el-scrollbar>
-                  </div>
-                  <div class="notice-container-box-inner">
-                   未读:{{ row.needReadNum - row.readedNum }}
-                    <el-scrollbar class="mt5 mb10" v-if="row.circularReadGroups?.length">
-                      <el-tag v-for="item in row.circularReadGroups.filter(i=>!i.isRead)">{{row.circularType === 1 ? item.userName : item.orgName}}</el-tag>
-                    </el-scrollbar>
-                  </div>
-                </div>
+								<div class="notice-container-box">
+									<div class="notice-container-box-inner">
+										已读:{{ row.readedNum }}
+										<el-scrollbar class="mt5" v-if="row.circularReadGroups?.length">
+											<el-tag v-for="item in row.circularReadGroups.filter((i) => i.isRead)">{{
+												row.circularType === 1 ? item.userName : item.orgName
+											}}</el-tag>
+										</el-scrollbar>
+									</div>
+									<div class="notice-container-box-inner">
+										未读:{{ row.needReadNum - row.readedNum }}
+										<el-scrollbar class="mt5 mb10" v-if="row.circularReadGroups?.length">
+											<el-tag v-for="item in row.circularReadGroups.filter((i) => !i.isRead)">{{
+												row.circularType === 1 ? item.userName : item.orgName
+											}}</el-tag>
+										</el-scrollbar>
+									</div>
+								</div>
 							</el-popover>
 						</template>
 					</el-table-column>
@@ -133,18 +137,48 @@
 				</template>
 				<el-table-column label="操作" width="200" fixed="right" align="center">
 					<template #default="{ row }">
-            <template v-if="listType==='0'">
-              <el-button link type="primary" @click="onEdit(row,'0')" v-if="[0,3].includes(row.circularState)"> 编辑 </el-button>
-              <el-button link type="danger" @click="onDelete(row,'0')" v-if="[0].includes(row.circularState)"> 删除 </el-button>
-              <el-button link type="primary" @click="onCommit(row,'0')" v-if="[0,3].includes(row.circularState)" title="提交审批"> 提交 </el-button>
-              <el-button link type="primary" @click="onDetail(row,'0')" v-auth="'auxiliary:notice:detail'" v-if="[1,2].includes(row.circularState)"> 查看详情 </el-button>
-            </template>
-            <template v-if="listType==='1'">
-              <el-button link type="primary" @click="onEdit(row,'1')" v-if="[0,3].includes(row.bulletinState)"> 编辑 </el-button>
-              <el-button link type="danger" @click="onDelete(row,'1')" v-if="[0].includes(row.bulletinState)"> 删除 </el-button>
-              <el-button link type="primary" @click="onCommit(row,'1')" v-if="[0,3].includes(row.bulletinState)" title="提交审批"> 提交 </el-button>
-              <el-button link type="primary" @click="onDetail(row,'1')" v-auth="'auxiliary:notice:detail'" v-if="[1,2].includes(row.bulletinState)"> 查看详情 </el-button>
-            </template>
+						<template v-if="listType === '0'">
+							<el-button link type="primary" @click="onEdit(row, '0')" v-if="[0, 3].includes(row.circularState)" v-auth="'auxiliary:notice:edit'">
+								编辑
+							</el-button>
+							<el-button link type="danger" @click="onDelete(row, '0')" v-if="[0].includes(row.circularState)" v-auth="'auxiliary:notice:delete'">
+								删除
+							</el-button>
+							<el-button
+								link
+								type="primary"
+								@click="onCommit(row, '0')"
+								v-if="[0, 3].includes(row.circularState)"
+								title="提交审批"
+								v-auth="'auxiliary:notice:commit'"
+							>
+								提交
+							</el-button>
+							<el-button link type="primary" @click="onDetail(row, '0')" v-auth="'auxiliary:notice:detail'" v-if="[1, 2].includes(row.circularState)">
+								查看详情
+							</el-button>
+						</template>
+						<template v-if="listType === '1'">
+							<el-button link type="primary" @click="onEdit(row, '1')" v-if="[0, 3].includes(row.bulletinState)" v-auth="'auxiliary:notice:edit'">
+								编辑
+							</el-button>
+							<el-button link type="danger" @click="onDelete(row, '1')" v-if="[0].includes(row.bulletinState)" v-auth="'auxiliary:notice:delete'">
+								删除
+							</el-button>
+							<el-button
+								link
+								type="primary"
+								@click="onCommit(row, '1')"
+								v-if="[0, 3].includes(row.bulletinState)"
+								title="提交审批"
+								v-auth="'auxiliary:notice:commit'"
+							>
+								提交
+							</el-button>
+							<el-button link type="primary" @click="onDetail(row, '1')" v-auth="'auxiliary:notice:detail'" v-if="[1, 2].includes(row.bulletinState)">
+								查看详情
+							</el-button>
+						</template>
 					</template>
 				</el-table-column>
 				<template #empty>
@@ -161,22 +195,31 @@
 		</el-card>
 		<!-- 流程审批 -->
 		<process-audit ref="processAuditRef" @orderProcessSuccess="queryList" />
-    <!--  新增通知公告  -->
-    <notice-add ref="noticeAddRef" @updateList="queryList"/>
+		<!--  新增通知公告  -->
+		<notice-add ref="noticeAddRef" @updateList="queryList" />
 		<!--  编辑通知公告  -->
-		<notice-edit ref="noticeEditRef"  @updateList="queryList"/>
+		<notice-edit ref="noticeEditRef" @updateList="queryList" />
 	</div>
 </template>
 
 <script lang="ts" setup name="auxiliaryNotice">
-import {defineAsyncComponent, onActivated, onMounted, reactive, ref} from 'vue';
-import {useRouter} from 'vue-router';
-import {ElMessage, ElMessageBox, FormInstance} from 'element-plus';
-import {shortcuts} from '/@/utils/constants';
-import {formatDate} from '/@/utils/formatTime';
-import {auth} from '/@/utils/authFunction';
-import {bulletinBaseData, bulletinCommit, bulletinDelete, bulletinList, circularBaseData, circularCommit, circularDelete, circularList} from '/@/api/auxiliary/notice';
-import {businessTagDelete} from "/@/api/auxiliary/businessTag";
+import { defineAsyncComponent, onActivated, onMounted, reactive, ref } from 'vue';
+import { useRouter } from 'vue-router';
+import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
+import { shortcuts } from '/@/utils/constants';
+import { formatDate } from '/@/utils/formatTime';
+import { auth } from '/@/utils/authFunction';
+import {
+	bulletinBaseData,
+	bulletinCommit,
+	bulletinDelete,
+	bulletinList,
+	circularBaseData,
+	circularCommit,
+	circularDelete,
+	circularList,
+} from '/@/api/auxiliary/notice';
+import { businessTagDelete } from '/@/api/auxiliary/businessTag';
 
 // 引入组件
 const ProcessAudit = defineAsyncComponent(() => import('/@/components/ProcessAudit/index.vue')); // 流程审批
@@ -246,8 +289,8 @@ const queryList = () => {
 					CircularTypeId: state.queryParams.CircularTypeId,
 					CircularTimeStart: state.queryParams.CircularTimeStart,
 					CircularTimeEnd: state.queryParams.CircularTimeEnd,
-          PageIndex: state.queryParams.PageIndex,
-          PageSize: state.queryParams.PageSize,
+					PageIndex: state.queryParams.PageIndex,
+					PageSize: state.queryParams.PageSize,
 				};
 				circularList(requestCircular)
 					.then((res) => {
@@ -268,8 +311,8 @@ const queryList = () => {
 					BulletinTypeId: state.queryParams.BulletinTypeId,
 					BulletinTimeStart: state.queryParams.BulletinTimeStart,
 					BulletinTimeEnd: state.queryParams.BulletinTimeEnd,
-          PageIndex: state.queryParams.PageIndex,
-          PageSize: state.queryParams.PageSize,
+					PageIndex: state.queryParams.PageIndex,
+					PageSize: state.queryParams.PageSize,
 				};
 				bulletinList(requestBulletin)
 					.then((res) => {
@@ -296,14 +339,14 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 };
 // 通知公告新增
 const processAuditRef = ref<RefType>(); // 处理流程
-const noticeAddRef  = ref<RefType>(); // 通知公告新增
-const onNoticeAdd = (type:string) => {
-  const processType = type === '0' ? '新增通知' : '新增公告';
-  noticeAddRef.value.openDialog(processType);
+const noticeAddRef = ref<RefType>(); // 通知公告新增
+const onNoticeAdd = (type: string) => {
+	const processType = type === '0' ? '新增通知' : '新增公告';
+	noticeAddRef.value.openDialog(processType);
 };
 // 查看详情
 const router = useRouter();
-const onDetail = (row: any,type:string) => {
+const onDetail = (row: any, type: string) => {
 	const tagsViewName = type === '0' ? '通知详情' : '公告详情';
 	router.push({
 		name: 'auxiliaryNoticeDetail',
@@ -316,58 +359,58 @@ const onDetail = (row: any,type:string) => {
 };
 // 编辑
 const noticeEditRef = ref<RefType>(); // 通知公告编辑
-const onEdit = (row: any,type:string) => {
+const onEdit = (row: any, type: string) => {
 	noticeEditRef.value.openDialog(row, type === '0' ? '编辑通知' : '编辑公告');
 };
 // 删除
-const onDelete = (row:any,type:string)=>{
-  ElMessageBox.confirm(`您确定要删除:【${row.title}】,是否继续?`, '提示', {
-    confirmButtonText: '确认',
-    cancelButtonText: '取消',
-    type: 'warning',
-    draggable: true,
-    cancelButtonClass: 'default-button',
-    autofocus: false,
-  })
-      .then(() => {
-          if(type === '0'){
-            circularDelete(row.id).then(()=>{
-              ElMessage.success('操作成功!');
-              queryList();
-            })
-          }else{
-            bulletinDelete(row.id).then(()=>{
-              ElMessage.success('操作成功!');
-              queryList();
-            })
-          }
-      })
-      .catch(() => {});
-}
+const onDelete = (row: any, type: string) => {
+	ElMessageBox.confirm(`您确定要删除:【${row.title}】,是否继续?`, '提示', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
+		draggable: true,
+		cancelButtonClass: 'default-button',
+		autofocus: false,
+	})
+		.then(() => {
+			if (type === '0') {
+				circularDelete(row.id).then(() => {
+					ElMessage.success('操作成功!');
+					queryList();
+				});
+			} else {
+				bulletinDelete(row.id).then(() => {
+					ElMessage.success('操作成功!');
+					queryList();
+				});
+			}
+		})
+		.catch(() => {});
+};
 // 提交
-const onCommit = (row: any,type:string) => {
-  ElMessageBox.confirm(`您确定要提交:【${row.title}】,是否继续?`, '提示', {
-    confirmButtonText: '确认',
-    cancelButtonText: '取消',
-    type: 'warning',
-    draggable: true,
-    cancelButtonClass: 'default-button',
-    autofocus: false,
-  })
-      .then(() => {
-        if(type === '0'){
-          circularCommit(row.id).then(()=>{
-            ElMessage.success('操作成功!');
-            queryList();
-          })
-        }else{
-          bulletinCommit(row.id).then(()=>{
-            ElMessage.success('操作成功!');
-            queryList();
-          })
-        }
-      })
-      .catch(() => {});
+const onCommit = (row: any, type: string) => {
+	ElMessageBox.confirm(`您确定要提交:【${row.title}】,是否继续?`, '提示', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
+		draggable: true,
+		cancelButtonClass: 'default-button',
+		autofocus: false,
+	})
+		.then(() => {
+			if (type === '0') {
+				circularCommit(row.id).then(() => {
+					ElMessage.success('操作成功!');
+					queryList();
+				});
+			} else {
+				bulletinCommit(row.id).then(() => {
+					ElMessage.success('操作成功!');
+					queryList();
+				});
+			}
+		})
+		.catch(() => {});
 };
 // 表格多选
 const multipleTableRef = ref<RefType>();
@@ -379,33 +422,33 @@ const params = history.state;
 // 页面加载时
 onMounted(() => {
 	getBaseData();
-  if (params.index) {
-    listType.value = params.index as string;
-  }
-  queryList()
+	if (params.index) {
+		listType.value = params.index as string;
+	}
+	queryList();
 });
 onActivated(() => {
-  if (params.index) {
-    listType.value = params.index as string;
-  }
+	if (params.index) {
+		listType.value = params.index as string;
+	}
 });
 </script>
 <style lang="scss">
 .notice-container {
-  &-box{
-    display: flex;
-    padding: 10px;
-    max-height: 300px;
-    &-inner{
-      flex:1;
-      padding: 10px 0 10px  10px;
-      &:last-child{
-        border-left: var(--el-border);
-      }
-      .el-tag{
-        margin:0 5px 5px 0;
-      }
-    }
-  }
+	&-box {
+		display: flex;
+		padding: 10px;
+		max-height: 300px;
+		&-inner {
+			flex: 1;
+			padding: 10px 0 10px 10px;
+			&:last-child {
+				border-left: var(--el-border);
+			}
+			.el-tag {
+				margin: 0 5px 5px 0;
+			}
+		}
+	}
 }
 </style>

+ 1 - 8
src/views/todo/seats/index.vue

@@ -156,10 +156,10 @@
                 @click="onSign(row)"
                 title="签收工单"
                 v-if="row.canSign"
+                v-auth="'todo:seats:sign'"
             >
               签收
             </el-button>
-            <el-button link type="primary" @click="onReturn(row)" title="退回工单" v-auth="'todo:order:return'" v-if="row.source > 1 && row.status <= 1"> 退回</el-button>
 					</template>
 				</el-table-column>
 				<template #empty>
@@ -176,8 +176,6 @@
 		</el-card>
 		<!-- 工单详情 -->
 		<order-detail ref="orderDetailRef" @updateList="queryList" />
-    <!-- 工单省退回 -->
-    <order-return ref="orderReturnRef" @updateList="queryList" />
 	</div>
 </template>
 <script setup lang="ts" name="todoOrder">
@@ -290,11 +288,6 @@ const onSign = (row:any)=>{
       })
       .catch(() => {});
 }
-// 工单退回
-const orderReturnRef = ref<RefType>(); // 工单退回ref
-const onReturn = (row:any)=>{
-  orderReturnRef.value.openDialog(row);
-}
 onMounted(() => {
 	queryList();
 });