Sfoglia il codice sorgente

组件修改,公告模块,消息模块

asd26269546 1 anno fa
parent
commit
48ed741a08

+ 4 - 7
src/components/byTable/index.vue

@@ -34,10 +34,6 @@
     <div class="more-btn">
       <span @click="isMore = !isMore" v-if="statWarpHeight > 200">
         {{ isMore ? "收起" : "展开" }}
-        <i
-          class="el-icon-arrow-down"
-          :class="isMore ? 'el-icon-arrow-up' : ''"
-        ></i>
       </span>
     </div>
     <ul id="statWarp">
@@ -595,13 +591,14 @@ export default defineComponent({
   .more-btn {
     position: absolute;
     right: 0;
-    top: 0;
-    width: 40px;
-    height: 30px;
+    bottom: 0;
+    left: 0;
+    height: 40px;
     cursor: pointer;
     font-size: 12px;
     line-height: 30px;
     text-align: center;
+    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 100%);
   }
   .title {
     height: 60px;

+ 11 - 5
src/components/notice/index.vue

@@ -61,9 +61,9 @@
 							业务<span v-if="pushInfoReq.whetherFlow === 0">({{pushInfoReq.total}})</span>
 						</li>
 					</ul>
-					<!-- <div class="more">查看更多&gt;</div> -->
+					<div class="more" @click="toDealWith({businessType:'hisMsg'})">查看更多&gt;</div>
 				</div>
-				<el-table :data="noticeData" style="width: 100%">
+				<el-table :data="noticeData" style="width: 100%" @row-click="rowClick">
 					<el-table-column prop="title" label="标题内容" width="250">
 						<template #default="scope">
 							<el-tooltip
@@ -72,7 +72,7 @@
 								:content="scope.row.title"
 								placement="top"
 							>
-								<div class="noticeData-title" @click="toDealWith(scope.row)">{{ scope.row.title }}</div>
+								<div class="noticeData-title">{{ scope.row.title }}</div>
 							</el-tooltip>
 							
 						</template>
@@ -84,7 +84,7 @@
 					</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.stop="readFn(scope)">确认已读</span>
 						</template>
 					</el-table-column>
 				</el-table>
@@ -128,12 +128,18 @@ const moreFn = () => {
 	noticeTableModal.value = true
 }
 
+const rowClick = (row) => {
+	commonRead([row.id])
+	toDealWith(row)
+}
+
 const toDealWith = (item) => {
 	
 	let urlConfig = {
 		"0":'DealWith',
 		"5":'Claim',
-		"6":"Abnormal"
+		"6":"Abnormal",
+		'hisMsg':'HisMsg'
 	}
 	proxy.$router.push({
 		name:urlConfig[item.businessType],

+ 1 - 0
src/views/process/processConfig/index.vue

@@ -211,6 +211,7 @@ let versionList = ref([])
 
 const getVersionList = (row) => {
 	formData.flowName = row.flowName
+	formData.version = row.id
 	versionVisible.value = true
 	proxy.post('/flowDefinition/getVersionList',{
 		flowKey:row.flowKey,

+ 335 - 0
src/views/system/msg/hisMsg.vue

@@ -0,0 +1,335 @@
+<template>
+	<div class="tenant">
+		<div class="content">
+			<byTable
+				:source="sourceList.data"
+				:pagination="sourceList.pagination"
+				:config="config"
+				:loading="loading"
+				:selectConfig="selectConfig"
+				highlight-current-row
+				
+				@get-list="getList"
+			>
+			</byTable>
+		</div>
+
+		<el-dialog
+			:title="modalType == 'add' ? '新增' : '编辑'"
+			v-if="dialogVisible"
+			v-model="dialogVisible"
+			width="500"
+			v-loading="loadingOperation"
+		>
+			<byForm
+				:formConfig="formConfig"
+				:formOption="formOption"
+				v-model="formData.data"
+				:rules="rules"
+				ref="submit"
+			>
+			</byForm>
+			<template #footer>
+				<el-button @click="dialogVisible = false" size="large"
+					>取 消</el-button
+				>
+				<el-button type="primary" @click="submitForm()" size="large"
+					>确 定</el-button
+				>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from 'element-plus'
+import byTable from '@/components/byTable/index'
+import byForm from '@/components/byForm/index'
+import { computed, ref } from 'vue'
+import Editor from '@/components/Editor/index.vue'
+
+const { proxy } = getCurrentInstance()
+const loading = ref(false)
+const companyList = ref({})
+const sourceList = ref({
+	data: [],
+	pagination: {
+		total: 0,
+		pageNum: 1,
+		pageSize: 10,
+		corporationId: '',
+		keyword: '',
+	},
+})
+const selectConfig = computed(() => {
+	return [
+        // {
+		// 	label: '消息类型',
+		// 	prop: 'status',
+		// 	data: [
+		// 		{
+		// 			label: '已发送',
+		// 			value: '1',
+		// 		},
+        //         {
+        //             label: '未发送',
+        //             value: '0',
+        //         },
+		// 	],
+		// },
+		// {
+		// 	label: '消息类型',
+		// 	prop: 'type',
+		// 	data: [
+		// 		{
+		// 			label: '系统公告',
+		// 			value: '1',
+		// 		},
+		// 	],
+		// },
+	]
+})
+const config = computed(() => {
+	return [
+		{
+			attrs: {
+				label: '消息类型',
+				prop: 'type',
+                width: '200',
+			},
+			render(type) {
+				return '消息提醒'
+			},
+		},
+		{
+			attrs: {
+				label: '消息内容',
+				prop: 'title',
+			},
+		},
+		{
+			attrs: {
+				label: '发送时间',
+				prop: 'createTime',
+                width: '200',
+			},
+		},
+		// {
+		// 	attrs: {
+		// 		label: '消息状态',
+		// 		prop: 'status',
+		// 	},
+        //     render(status) {
+		// 		return status == 1 ? '已发送' : '未发送'
+		// 	},
+		// },
+		// {
+		// 	attrs: {
+		// 		label: '操作',
+		// 		width: '120',
+		// 		align: 'center',
+		// 	},
+		// 	renderHTML(row) {
+		// 		return [
+		// 			row.status == 0 ? {
+		// 				attrs: {
+		// 					label: '发送',
+		// 					type: 'primary',
+		// 					text: true,
+		// 				},
+		// 				el: 'button',
+		// 				click() {
+		// 					ElMessageBox.confirm(
+		// 						'你确定发送此条信息?',
+		// 						'提示',
+		// 						{
+		// 							confirmButtonText: '确定',
+		// 							cancelButtonText: '取消',
+		// 							type: 'warning',
+		// 						}
+		// 					).then(() => {
+		// 						proxy
+		// 							.post('/sendMeg/edit', {
+		// 								...row,
+        //                                 status:1,
+		// 							})
+		// 							.then(() => {
+		// 								ElMessage({
+		// 									message: '发送成功',
+		// 									type: 'success',
+		// 								})
+		// 								getList()
+		// 							})
+		// 					})
+		// 				},
+		// 			} : {},
+		// 			{
+		// 				attrs: {
+		// 					label: '删除',
+		// 					type: 'primary',
+		// 					text: true,
+		// 				},
+		// 				el: 'button',
+		// 				click() {
+		// 					ElMessageBox.confirm(
+		// 						'此操作将永久删除该数据, 是否继续?',
+		// 						'提示',
+		// 						{
+		// 							confirmButtonText: '确定',
+		// 							cancelButtonText: '取消',
+		// 							type: 'warning',
+		// 						}
+		// 					).then(() => {
+		// 						proxy
+		// 							.post('/sendMeg/delete', {
+		// 								id: row.id,
+		// 							})
+		// 							.then(() => {
+		// 								ElMessage({
+		// 									message: '删除成功',
+		// 									type: 'success',
+		// 								})
+		// 								getList()
+		// 							})
+		// 					})
+		// 				},
+		// 			},
+		// 		]
+		// 	},
+		// },
+	]
+})
+const getDict = () => {
+	proxy
+		.post('/corporation/page', { pageNum: 1, pageSize: 999 })
+		.then((res) => {
+			companyList.value = res.rows.map((item) => {
+				return {
+					label: item.name,
+					value: item.id,
+				}
+			})
+		})
+}
+const getList = async (req) => {
+	sourceList.value.pagination = { ...sourceList.value.pagination, ...req }
+	loading.value = true
+	proxy.post('/pushInfo/page', sourceList.value.pagination).then((res) => {
+		sourceList.value.data = res.rows
+		sourceList.value.pagination.total = res.total
+		setTimeout(() => {
+			loading.value = false
+		}, 200)
+	})
+}
+getDict()
+getList()
+const modalType = ref('add')
+const dialogVisible = ref(false)
+const loadingOperation = ref(false)
+const submit = ref(null)
+const formData = reactive({
+	data: {
+		countryId: '44',
+	},
+})
+const formOption = reactive({
+	inline: true,
+	labelWidth: 100,
+	itemWidth: 100,
+	rules: [],
+})
+const formConfig = computed(() => {
+	return [
+		// {
+		// 	label: '基础信息',
+		// },
+		// {
+		// 	type: 'select',
+		// 	prop: 'type',
+		// 	label: '消息类型',
+        //     data: [
+		// 		{
+		// 			label: '系统公告',
+		// 			value: '1',
+		// 		},
+		// 	],
+		// },
+		{
+			type: 'input',
+			prop: 'title',
+			label: '标题',
+			itemType: 'text',
+			placeholder: '请输入标题',
+		},
+        {
+            type: 'input',
+            prop: 'content',
+            label: '正文',
+            itemType: 'textarea',
+            placeholder: '请输入正文',
+        },
+        
+        {
+            type: 'date',
+            prop: 'sendTime',
+            label: '发送时间',
+            placeholder: '请选择发送时间',
+            itemType: 'date',
+        },
+		{
+            type: 'date',
+            prop: 'endTime',
+            label: '结束时间',
+            placeholder: '请选择结束时间',
+            itemType: 'date',
+        },
+
+	]
+})
+let rules = ref({
+	sendTime: [
+		{ required: true, message: '请选择时间', trigger: 'blur' },
+	],
+	type: [
+		{ required: true, message: '请选择类型', trigger: 'change' },
+	],
+    title: [
+        { required: true, message: '请输入标题', trigger: 'blur' },
+    ],
+    content: [
+        { required: true, message: '请输入正文', trigger: 'blur' },
+    ],
+})
+const openModal = () => {
+	modalType.value = 'add'
+	formData.data = {}
+	loadingOperation.value = false
+	dialogVisible.value = true
+}
+const submitForm = () => {
+	submit.value.handleSubmit(() => {
+		loadingOperation.value = true
+		proxy.post('/pushAnnouncement/' + modalType.value, formData.data).then(
+			() => {
+				ElMessage({
+					message: modalType.value == 'add' ? '添加成功' : '编辑成功',
+					type: 'success',
+				})
+				dialogVisible.value = false
+				getList()
+			},
+			(err) => {
+				console.log(err)
+				loadingOperation.value = false
+			}
+		)
+	})
+}
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+	padding: 20px;
+}
+</style>

+ 264 - 0
src/views/system/userJoin/index.vue

@@ -0,0 +1,264 @@
+<template>
+	<div class="tenant">
+		<div class="content">
+			<byTable
+				:source="sourceList.data"
+				:pagination="sourceList.pagination"
+				:config="config"
+				:loading="loading"
+				:selectConfig="selectConfig"
+				highlight-current-row
+				:action-list="[
+					{
+						text: '添加交接',
+						action: () => openModal(),
+					},
+				]"
+				@get-list="getList"
+			>
+			</byTable>
+		</div>
+
+		<el-dialog
+			:title="modalType == 'add' ? '新增' : '编辑'"
+			v-if="dialogVisible"
+			v-model="dialogVisible"
+			width="500"
+			v-loading="loadingOperation"
+		>
+			<byForm
+				:formConfig="formConfig"
+				:formOption="formOption"
+				v-model="formData.data"
+				:rules="rules"
+				ref="submit"
+			>
+			</byForm>
+			<template #footer>
+				<el-button @click="dialogVisible = false" size="large"
+					>取 消</el-button
+				>
+				<el-button type="primary" @click="submitForm()" size="large"
+					>确 定</el-button
+				>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from 'element-plus'
+import byTable from '@/components/byTable/index'
+import byForm from '@/components/byForm/index'
+import { computed, ref } from 'vue'
+import Editor from '@/components/Editor/index.vue'
+import useUserStore from "@/store/modules/user";
+const { proxy } = getCurrentInstance()
+const loading = ref(false)
+const companyList = ref({})
+const sourceList = ref({
+	data: [],
+	pagination: {
+		total: 0,
+		pageNum: 1,
+		pageSize: 10,
+		corporationId: '',
+		keyword: '',
+	},
+})
+const selectConfig = computed(() => {
+	return [
+	]
+})
+const config = computed(() => {
+	return [
+		{
+			attrs: {
+				label: '交接人',
+				prop: 'handoverPersonName',
+			},
+		},
+		{
+			attrs: {
+				label: '接收人',
+				prop: 'recipientName',
+			},
+		},
+		{
+			attrs: {
+				label: '交接时间',
+				prop: 'createTime',
+			},
+		},
+		{
+			attrs: {
+				label: '交接原因',
+				prop: 'reason',
+			},
+		},
+		{
+			attrs: {
+				label: '交接内容',
+				prop: 'content',
+			},
+		},
+        {
+			attrs: {
+				label: '备注',
+				prop: 'remark',
+			},
+		},
+	]
+})
+const getDict = () => {
+	proxy
+		.post('/corporation/page', { pageNum: 1, pageSize: 999 })
+		.then((res) => {
+			companyList.value = res.rows.map((item) => {
+				return {
+					label: item.name,
+					value: item.id,
+				}
+			})
+		})
+}
+const getList = async (req) => {
+	sourceList.value.pagination = { ...sourceList.value.pagination, ...req }
+	loading.value = true
+	proxy.post('/employeeHandover/page', sourceList.value.pagination).then((res) => {
+		sourceList.value.data = res.rows
+		sourceList.value.pagination.total = res.total
+		setTimeout(() => {
+			loading.value = false
+		}, 200)
+	})
+}
+getDict()
+getList()
+const modalType = ref('add')
+const dialogVisible = ref(false)
+const loadingOperation = ref(false)
+const submit = ref(null)
+const formData = reactive({
+	data: {
+		countryId: '44',
+	},
+})
+const formOption = reactive({
+	inline: true,
+	labelWidth: 100,
+	itemWidth: 100,
+	rules: [],
+})
+const formConfig = computed(() => {
+	return [
+		{
+			label: '交接信息',
+		},
+		{
+			type: 'select',
+			prop: 'handoverPersonId',
+			label: '交接人',
+            data: [],
+            itemWidth: '50',
+		},
+        {
+			type: 'select',
+			prop: 'recipientId',
+			label: '接收人',
+            data: [],
+            itemWidth: '50',
+		},
+        {
+            type: 'input',
+            prop: 'reason',
+            label: '交接原因',
+            itemType: 'textarea',
+            placeholder: '请输入交接原因',
+        },
+        {
+			type: 'checkbox',
+			prop: 'content',
+			label: '交接内容',
+            data: [{
+                label: '客户信息',
+                value: '1',
+            }],
+		},
+        {
+            type: 'input',
+            prop: 'remark',
+            label: '备注',
+            itemType: 'textarea',
+            placeholder: '请输入备注',
+        },
+
+	]
+})
+let rules = ref({
+	handoverPersonId: [
+		{ required: true, message: '请选择交接人', trigger: 'blur' },
+	],
+	recipientId: [
+		{ required: true, message: '请选择接收人', trigger: 'change' },
+	],
+    reason: [
+        { required: true, message: '请输入交接原因', trigger: 'blur' },
+    ],
+    content: [
+        { required: true, message: '请输入交接内容', trigger: 'blur' },
+    ],
+})
+const openModal = () => {
+	modalType.value = 'add'
+	formData.data = {}
+	loadingOperation.value = false
+	dialogVisible.value = true
+}
+const submitForm = () => {
+	submit.value.handleSubmit(() => {
+		loadingOperation.value = true
+		proxy.post('/employeeHandover/add', {...formData.data,content:formData.data.content.join(',')}).then(
+			() => {
+				ElMessage({
+					message: modalType.value == 'add' ? '添加成功' : '添加成功',
+					type: 'success',
+				})
+				dialogVisible.value = false
+				getList()
+			},
+			(err) => {
+				console.log(err)
+				loadingOperation.value = false
+			}
+		)
+	})
+}
+let  userList = ref([])
+const getUser = () => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+        console.log(formConfig);
+        res.rows = res.rows.map((item) => {
+            return {
+                label: item.nickName,
+                value: item.userId,
+            };
+        });
+        formConfig.value[1].data = res.rows
+        formConfig.value[2].data = res.rows
+    });
+};
+getUser()
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+	padding: 20px;
+}
+</style>