瀏覽代碼

bug修改

asd26269546 1 年之前
父節點
當前提交
eec6674541

+ 2 - 1
.env.production

@@ -9,7 +9,8 @@ VITE_APP_BASE_API = '/prod-api'
 
 VITE_APP_WS_API = '/prod-api'
 
+VITE_APP_IP = '139.159.251.109'
+
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 
-VITE_APP_IP = '139.159.251.109'

+ 6 - 6
src/components/byTable/ElementsMapping.vue

@@ -81,13 +81,13 @@ export default defineComponent({
         props: attrs
       }
     }
-    if(getCellList.value.length > 3) {
+    // if(getCellList.value.length > 3) {
       
-      console.log(getCellList)
-      return {
-        getCellList
-      }
-    }
+    //   console.log(getCellList)
+    //   return {
+    //     getCellList
+    //   }
+    // }
     return () => {
       return h(
         'div',

+ 46 - 32
src/components/notice/index.vue

@@ -68,22 +68,28 @@
 								:content="scope.row.title"
 								placement="top"
 							>
-								<span>{{ scope.row.title.slice(0,12) }}</span><span v-if="scope.row.title.length > 12">..</span>
+								<div class="noticeData-title">{{ scope.row.title }}</div>
 							</el-tooltip>
 							
 						</template>
 					</el-table-column>
 					<el-table-column prop="businessType" label="类型" width="120">
+						<template #default="scope">
+							<span>{{ scope.row.businessType === 0 ? '流程' : '业务' }}</span>
+						</template>
 					</el-table-column>
 					<el-table-column prop="address" label="操作">
 						<template #default="scope">
-							<span style="cursor: pointer" @click="readFn(scope)">读</span>
+							<span style="cursor: pointer" @click="readFn(scope)">确认已读</span>
 						</template>
 					</el-table-column>
 				</el-table>
+				<div >
+					<el-pagination style="text-align: center;" :page-size="5" layout="prev, pager, next" :total="pushInfoReq.total" @current-change="handlePageChange" />
+				</div>
 				<div class="notice-btn-box" style="margin-top: 20px">
 					<!-- <el-button plain disabled>点击清空</el-button> -->
-					<el-button type="primary" disabled>全部已读</el-button>
+					<el-button type="primary" @click="allReadFn"  v-if="noticeData.length != 0">全部已读</el-button>
 				</div>
 			</div>
 		</div>
@@ -105,28 +111,7 @@ const emit = defineEmits(["update:modelValue"],'changeNum');
 const closeNoticeTableModal = () => {
 	emit("update:modelValue", false);
 };
-let noticeData = ref([
-	// {
-	// 	date: '2016-05-02',
-	// 	name: '王小虎',
-	// 	address: '上海市普陀区金沙江路 1518 弄',
-	// },
-	// {
-	// 	date: '2016-05-04',
-	// 	name: '王小虎',
-	// 	address: '上海市普陀区金沙江路 1517 弄',
-	// },
-	// {
-	// 	date: '2016-05-01',
-	// 	name: '王小虎',
-	// 	address: '上海市普陀区金沙江路 1519 弄',
-	// },
-	// {
-	// 	date: '2016-05-03',
-	// 	name: '王小虎',
-	// 	address: '上海市普陀区金沙江路 1516 弄',
-	// },
-])
+let noticeData = ref([])
 let index = ref(0)
 let data = ref([])
 let value = ref(false)
@@ -134,6 +119,25 @@ const moreFn = () => {
 	noticeTableModal.value = true
 }
 
+const allReadFn = () => {
+	ElMessageBox.confirm('此操作将会把所有未读消息标记为已读,是否继续?', '提示', {
+		confirmButtonText: '确定',
+		cancelButtonText: '取消',
+		type: 'warning',
+	}).then(() => {
+		let arr = []
+		noticeData.value.filter(item=>{
+			arr.push(item.id)
+		})
+		commonRead(arr)
+	}).catch(() => {
+		ElMessage({
+			type: 'info',
+			message: '已取消操作'
+		});          
+	});
+}
+
 const readFn = (item) => {
 	commonRead([item.row.id])
 }
@@ -160,7 +164,7 @@ const confirm = () => {
 // 	pageNum:1,
 // 	pageSize:30,
 // }).then(res=>{
-// 	data.value = res.rows
+// 	data.value = res.rows 
 // })
 
 const socketInit = () => {
@@ -216,17 +220,19 @@ let pushInfoReq = ref({
 	type: '',
 	total:0,
 })
+
+const handlePageChange = (val) => {
+	pushInfoReq.value.pageNum = val
+	getPushInfo()
+}
+
 const loading = ref(false)
 const getPushInfo = () => {
 	loading.value = true
-	proxy.post('/pushInfo/page',{
-		pageNum:1,
-		pageSize:5,
-		pushRead:0,
-		type:2,
-	}).then(res=>{
+	proxy.post('/pushInfo/page',pushInfoReq.value).then(res=>{
 		noticeData.value = res.rows
 		pushInfoReq.value.total = res.total
+		console.log(pushInfoReq)
 		setTimeout(() => {
 			loading.value = false
 		}, 500);
@@ -312,6 +318,14 @@ const openBottomBar = (type) => {
 }
 </style>
 <style>
+
+.noticeData-title{
+	width: 100%;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	cursor: pointer;
+}
 .commons-notice .el-table__row {
 	height: 50px;
 }

+ 1 - 1
src/views/process/dealWith/index.vue

@@ -51,7 +51,7 @@
 	</div>
 </template>
     
-  <script setup name="DealWith">
+  <script setup >
 /* eslint-disable vue/no-unused-components */
 import { ElMessage, ElMessageBox } from 'element-plus'
 import byTable from '@/components/byTable/index'

+ 8 - 4
src/views/system/dept2/index.vue

@@ -209,19 +209,19 @@ const formConfig = computed(() => {
       data: [
         {
           label: proxy.t('dept.company'),
-          value: 0,
+          value: 1,
         },
         {
           label: proxy.t('dept.businessCenter'),
-          value: 1,
+          value: 2,
         },
         {
           label: proxy.t('dept.department'),
-          value: 2,
+          value: 3,
         },
         {
           label: proxy.t('dept.group'),
-          value: 3,
+          value: 4,
         },
       ],
     },
@@ -334,6 +334,8 @@ const submitForm = () => {
     const method = modalType.value == "add" ? "POST" : "PUT";
     console.log(method);
     if (!formData.data.parentId) formData.data.parentId = 0;
+    formData.data.leaderId = formData.data.leaderId ? formData.data.leaderId : '-1';
+    formData.data.directorId = formData.data.directorId ? formData.data.directorId : '-1';
     proxy
       .post(
         "/tenantDept",
@@ -392,6 +394,8 @@ const showType = (type) => {
 };
 const getDtl = (row) => {
   formData.data = { ...row };
+  formData.data.leaderId = formData.data.leaderId == '-1' ? '' : formData.data.leaderId;
+  formData.data.directorId = formData.data.directorId == '-1' ? '' : formData.data.directorId;
   sourceList.value.pagination.tenantId = row.tenantId;
   getUserList()
   modalType.value = "edit";

+ 6 - 0
src/views/systemTenant/tenant/deptTenant/index.vue

@@ -188,6 +188,7 @@ const formConfig = computed(() => {
       prop: "leaderId",
       label: "负责人",
       data: userList.value,
+      clearable: true,
       itemWidth: 50,
     },
     {
@@ -195,6 +196,7 @@ const formConfig = computed(() => {
       prop: "directorId",
       label: "总监",
       data: userList.value,
+      clearable: true,
       itemWidth: 50,
     },
     {
@@ -223,6 +225,8 @@ const openModal = (val) => {
 const submitForm = () => {
   submit.value.handleSubmit(() => {
     loadingDialog.value = true;
+    formData.data.leaderId = formData.data.leaderId ? formData.data.leaderId : '-1';
+    formData.data.directorId = formData.data.directorId ? formData.data.directorId : '-1';
     const method = modalType.value == "add" ? "POST" : "PUT";
     if (!formData.data.parentId) formData.data.parentId = 0;
     proxy.post("/tenantDept", formData.data, method).then(() => {
@@ -253,6 +257,8 @@ const listDelete = (row) => {
 const getDtl = (row) => {
   formData.data = { ...row };
   modalType.value = "edit";
+  formData.data.leaderId = formData.data.leaderId == '-1' ? '' : formData.data.leaderId;
+  formData.data.directorId = formData.data.directorId == '-1' ? '' : formData.data.directorId;
   dialogVisible.value = true;
 };
 </script>