20240617
This commit is contained in:
parent
6923374619
commit
aa17d609b7
|
|
@ -82,6 +82,36 @@ export function wkTypes(params) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*接收工作分页
|
||||||
|
*/
|
||||||
|
export function receiveWork(params) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/work/receiveWork`,
|
||||||
|
method: "GET",
|
||||||
|
params:params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*完成接收工作
|
||||||
|
*/
|
||||||
|
export function receiveWorkComplete(params) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/work/receiveWorkComplete`,
|
||||||
|
method: "POST",
|
||||||
|
data:params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*接收工作分页
|
||||||
|
*/
|
||||||
|
export function receiveWorkDetail(params) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/work/receiveWorkDetail/${params.wkUserId}`,
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
39
src/router/modules/acceptWork.js
Normal file
39
src/router/modules/acceptWork.js
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
const Layout = () => import('@/layout/index.vue')
|
||||||
|
|
||||||
|
export default {
|
||||||
|
path: '/acceptWork',
|
||||||
|
component: Layout,
|
||||||
|
name: 'acceptWork',
|
||||||
|
redirect: '/acceptWork/acceptWork-index',
|
||||||
|
meta: {
|
||||||
|
auth: "acceptWork",
|
||||||
|
title: '接收工作',
|
||||||
|
icon: 'icon-work',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'acceptWork-index',
|
||||||
|
name: 'acceptWork-index',
|
||||||
|
component: () => import('@/views/acceptWork/index.vue'),
|
||||||
|
meta: {
|
||||||
|
auth: "acceptWork.index",
|
||||||
|
icon: 'point',
|
||||||
|
title: '接收工作',
|
||||||
|
sidebar: false
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
// {
|
||||||
|
// path: 'work-detail',
|
||||||
|
// name: 'work-detail',
|
||||||
|
// component: () => import('@/views/acceptWork/components/detail.vue'),
|
||||||
|
// meta: {
|
||||||
|
// auth: "daily.index.detail",
|
||||||
|
// title: '事件详情',
|
||||||
|
// sidebar: false, //是否在菜单栏显示
|
||||||
|
// breadcrumb: true, //是否显示面包屑
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -110,6 +110,7 @@ import manage from './modules/work-manage';
|
||||||
import statistic from './modules/statistic';
|
import statistic from './modules/statistic';
|
||||||
import bigData from './modules/big-data';
|
import bigData from './modules/big-data';
|
||||||
import demands from './modules/demands';
|
import demands from './modules/demands';
|
||||||
|
import acceptWork from './modules/acceptWork';
|
||||||
|
|
||||||
let token = localStorage.token_df;
|
let token = localStorage.token_df;
|
||||||
// 动态路由(异步路由、导航栏路由)
|
// 动态路由(异步路由、导航栏路由)
|
||||||
|
|
@ -127,6 +128,7 @@ let asyncRoutes = [
|
||||||
trends,
|
trends,
|
||||||
demands,
|
demands,
|
||||||
manage,
|
manage,
|
||||||
|
acceptWork,
|
||||||
statistic,
|
statistic,
|
||||||
system,
|
system,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ let globalSettings = {
|
||||||
// 是否将 iconify 图标集中的 Element Plus 图标下载到本地,以便在离线环境下使用
|
// 是否将 iconify 图标集中的 Element Plus 图标下载到本地,以便在离线环境下使用
|
||||||
iconifyOfflineUse: false,
|
iconifyOfflineUse: false,
|
||||||
// 是否开启权限功能
|
// 是否开启权限功能
|
||||||
enablePermission: false,
|
enablePermission: true,
|
||||||
// 是否开启载入进度条
|
// 是否开启载入进度条
|
||||||
enableProgress: true,
|
enableProgress: true,
|
||||||
// 是否开启动态标题
|
// 是否开启动态标题
|
||||||
|
|
|
||||||
647
src/views/acceptWork/components/add.vue
Normal file
647
src/views/acceptWork/components/add.vue
Normal file
|
|
@ -0,0 +1,647 @@
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BaseDialog
|
||||||
|
:dialogVisible="props.visible"
|
||||||
|
@close="onclone"
|
||||||
|
titleName="完成情况"
|
||||||
|
width="50%"
|
||||||
|
@onSubmit="handleSubmit"
|
||||||
|
:footerclosed="true"
|
||||||
|
:diafooter="true"
|
||||||
|
:footerkeepnaem="props.readonly ? false : true"
|
||||||
|
>
|
||||||
|
<div class="detailForm-content">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
label-position="right"
|
||||||
|
label-width="150px"
|
||||||
|
:rules="ruleForm"
|
||||||
|
:model="form"
|
||||||
|
>
|
||||||
|
<el-form-item label="工作内容:" prop="title" style="width: 100%;">
|
||||||
|
<el-input
|
||||||
|
disabled="false"
|
||||||
|
placeholder="请输入工作内容"
|
||||||
|
v-model="form.title"
|
||||||
|
:rows="3"
|
||||||
|
type="textarea"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="时间:" prop="time">
|
||||||
|
<el-date-picker
|
||||||
|
disabled="false"
|
||||||
|
v-model="form.time"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
size="default"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属组织:" prop="listperformid">
|
||||||
|
<el-tree-select
|
||||||
|
disabled="false"
|
||||||
|
v-model="form.listperformid"
|
||||||
|
:data="postTree"
|
||||||
|
:render-after-expand="false"
|
||||||
|
check-strictly
|
||||||
|
:filter-node-method="filterPostMethod"
|
||||||
|
filterable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工作附件:" style="width: 100%;">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
ref="uploadAfter"
|
||||||
|
action="#"
|
||||||
|
list-type="upload-demo"
|
||||||
|
:file-list="afterList"
|
||||||
|
:http-request="handleUploadAfter"
|
||||||
|
>
|
||||||
|
<!-- <el-icon class="avatar-uploader-icon" :size="40">
|
||||||
|
<Plus />
|
||||||
|
</el-icon> -->
|
||||||
|
<template #file="{ file }">
|
||||||
|
<div>
|
||||||
|
<span class="el-upload-list__item-actions">
|
||||||
|
<span class="el-upload-list__item-preview">
|
||||||
|
<el-icon>
|
||||||
|
<Document />
|
||||||
|
</el-icon>
|
||||||
|
<span>{{ file.realfilename }}</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleInfo(file)"
|
||||||
|
>
|
||||||
|
<el-icon><zoom-in /></el-icon>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleDownload(file)"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Download />
|
||||||
|
</el-icon>
|
||||||
|
</span>
|
||||||
|
<!-- <span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleRemove(file)"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Delete />
|
||||||
|
</el-icon>
|
||||||
|
</span> -->
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-dialog v-model="upVisible">
|
||||||
|
<img w-full :src="upImageUrl" alt="Preview Image" />
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
<TitleC titleName="完成情况"></TitleC>
|
||||||
|
<div>
|
||||||
|
<el-form
|
||||||
|
ref="completeFormRef"
|
||||||
|
label-position="right"
|
||||||
|
label-width="150px"
|
||||||
|
:rules="completeruleForm"
|
||||||
|
:model="completeform"
|
||||||
|
>
|
||||||
|
<el-form-item label="完成情况:" prop="workContent" style="width: 100%;">
|
||||||
|
|
||||||
|
<el-input
|
||||||
|
|
||||||
|
:disabled="props.type == 2?true:false"
|
||||||
|
placeholder="请输入完成情况内容"
|
||||||
|
v-model="completeform.workContent"
|
||||||
|
:rows="3"
|
||||||
|
type="textarea"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="完成时间:" prop="completionTime">
|
||||||
|
<el-date-picker
|
||||||
|
:disabled="props.type == 2?true:false"
|
||||||
|
v-model="completeform.completionTime"
|
||||||
|
type="date"
|
||||||
|
placeholder="完成时间"
|
||||||
|
size="default"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="完成情况工作附件:" style="width: 100%;">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
ref="uploadAfter"
|
||||||
|
action="#"
|
||||||
|
list-type="upload-demo"
|
||||||
|
:file-list="completeafterList"
|
||||||
|
:http-request="completehandleUploadAfter"
|
||||||
|
>
|
||||||
|
<el-icon class="avatar-uploader-icon" :size="40">
|
||||||
|
<Plus />
|
||||||
|
</el-icon>
|
||||||
|
<template #file="{ file }">
|
||||||
|
<div>
|
||||||
|
<span class="el-upload-list__item-actions">
|
||||||
|
<span class="el-upload-list__item-preview">
|
||||||
|
<el-icon>
|
||||||
|
<Document />
|
||||||
|
</el-icon>
|
||||||
|
<span>{{ file.realfilename }}</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleInfo(file)"
|
||||||
|
>
|
||||||
|
<el-icon><zoom-in /></el-icon>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleDownload(file)"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Download />
|
||||||
|
</el-icon>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleRemove(file)"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Delete />
|
||||||
|
</el-icon>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!-- <div v-if="props.readonly">
|
||||||
|
<el-table
|
||||||
|
ref="loading"
|
||||||
|
class="table"
|
||||||
|
v-loading="tableDataloading"
|
||||||
|
:data="tableData"
|
||||||
|
header-row-class-name="el-one-header"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column type="index" align="center" label="序号" width="80"/>
|
||||||
|
<el-table-column prop="chinaName" align="center" label="接收人姓名" />
|
||||||
|
<el-table-column prop="postName" align="center" label="接收人岗位" />
|
||||||
|
<el-table-column prop="workState" align="center" label="工作状态" >
|
||||||
|
<template #default="scope">
|
||||||
|
<span class="notViewed" v-if="scope.row.workState==1">未查看</span>
|
||||||
|
<span class="viewed" v-if="scope.row.workState==2">已查看</span>
|
||||||
|
<span class="completed" v-if="scope.row.workState==3">已完成</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div> -->
|
||||||
|
</BaseDialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts" >
|
||||||
|
import { reactive, ref, onMounted, watch, getCurrentInstance } from "vue";
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
|
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||||
|
import type { UploadUserFile } from "element-plus";
|
||||||
|
import { getYears, getUUID, FileType } from "@/utils/common";
|
||||||
|
import { uploadFile, getFile, delFile } from "@/api/file";
|
||||||
|
import { getListperformTree } from "@/api/Sys";
|
||||||
|
import { workAdd, workDetail, receiveWorkComplete, receiveWorkDetail } from "@/api/Work";
|
||||||
|
|
||||||
|
const formRef = ref<FormInstance>();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
const uuid = ref(getUUID());
|
||||||
|
const ruleForm = reactive<FormRules>({
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入工作内容",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
processedBy: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入处理人",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
time: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择时间",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
listperformid: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择所属组织",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
//完成情况
|
||||||
|
const completeFormRef = ref<FormInstance>();
|
||||||
|
const completeruleForm = reactive<FormRules>({
|
||||||
|
workContent: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入完成情况",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
completionTime: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择时间",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
// "completionTime": "",
|
||||||
|
// "userId": "",
|
||||||
|
// "wkUserId": "",
|
||||||
|
// "workContent": ""
|
||||||
|
const completeform = ref(<any>{});
|
||||||
|
const completeafterList = ref<UploadUserFile[]>([]);
|
||||||
|
// complete
|
||||||
|
const completehandleUploadAfter = (file: any) => {
|
||||||
|
// if (afterList.value.length != 0) {
|
||||||
|
// ElMessage.error("只能上传一份文件!");
|
||||||
|
// completegetCheckDangers(form.value.workId || uuid.value);
|
||||||
|
// } else {
|
||||||
|
// }
|
||||||
|
const newFile = new FormData();
|
||||||
|
newFile.append("file", file.file);
|
||||||
|
uploadFile(
|
||||||
|
userId.value,
|
||||||
|
completeform.value.workId || uuid.value,
|
||||||
|
FileType.workManagement,
|
||||||
|
newFile
|
||||||
|
).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
ElMessage.success("上传成功!");
|
||||||
|
completegetCheckDangers(completeform.value.workId || uuid.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//文件显示getCheckDangers
|
||||||
|
const completegetCheckDangers = (id) => {
|
||||||
|
getFile(id, FileType.workManagement).then((res: any) => {
|
||||||
|
completeafterList.value = res.data.map((item) => {
|
||||||
|
let arr = item;
|
||||||
|
let index = item.filepath.indexOf("."); //获取第一个"_"的位置
|
||||||
|
let after1 = item.filepath.substring(index + 1);
|
||||||
|
switch (after1) {
|
||||||
|
case "xlsx":
|
||||||
|
arr.url = "src/assets/images/exl.png";
|
||||||
|
break;
|
||||||
|
case "exl":
|
||||||
|
arr.url = "src/assets/images/exl.png";
|
||||||
|
break;
|
||||||
|
case "pdf":
|
||||||
|
arr.url = "src/assets/images/pdf.png";
|
||||||
|
break;
|
||||||
|
case "word":
|
||||||
|
arr.url = "src/assets/images/word.png";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
arr.url = baseImgUrl.value + item.filepath;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//删除附件
|
||||||
|
const completehandleRemove = (file) => {
|
||||||
|
delFile(file.sysdocumentid).then((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
ElMessage.success("删除成功!");
|
||||||
|
}
|
||||||
|
completegetCheckDangers(completeform.value.workId || uuid.value);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//下载附件
|
||||||
|
const completehandleDownload = (file) => {
|
||||||
|
function text() {
|
||||||
|
const x = new XMLHttpRequest();
|
||||||
|
x.open("GET", baseImgUrl.value + file.filepath, true);
|
||||||
|
x.responseType = "blob";
|
||||||
|
x.onload = function () {
|
||||||
|
const url = window.URL.createObjectURL(x.response);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = file.name;
|
||||||
|
a.click();
|
||||||
|
};
|
||||||
|
x.send();
|
||||||
|
}
|
||||||
|
let index = file.filepath.indexOf("."); //获取第一个"_"的位置
|
||||||
|
let after1 = file.filepath.substring(index + 1);
|
||||||
|
switch (after1) {
|
||||||
|
case "xlsx":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "exl":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "pdf":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "word":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
window.open(baseImgUrl.value + file.filepath, "_blank");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const completeupVisible = ref(false);
|
||||||
|
const completeupImageUrl = ref("");
|
||||||
|
//查看附件
|
||||||
|
const completehandleInfo = (file) => {
|
||||||
|
completeupImageUrl.value = file.url!;
|
||||||
|
completeupVisible.value = true;
|
||||||
|
};
|
||||||
|
//保存并退出
|
||||||
|
// workContent completionTime
|
||||||
|
const handleSubmit = () => {
|
||||||
|
completeFormRef.value?.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let params = {
|
||||||
|
userId: userId.value,
|
||||||
|
completionTime: completeform.value.completionTime,
|
||||||
|
workContent: completeform.value.workContent,
|
||||||
|
wkUserId: form.value.wkUserId,
|
||||||
|
};
|
||||||
|
|
||||||
|
receiveWorkComplete(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
onclone();
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//只做显示数据
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: Object,
|
||||||
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
typeId: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
tabsTitle: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
type:String
|
||||||
|
});
|
||||||
|
const form = ref(<any>{});
|
||||||
|
const emits = defineEmits(["close", "onSubmit"]);
|
||||||
|
//组织list
|
||||||
|
const postTree = ref([]);
|
||||||
|
/**筛选组织*/
|
||||||
|
const filterPostMethod = (value, data) => data.label.includes(value);
|
||||||
|
/**
|
||||||
|
* 获取组织
|
||||||
|
*/
|
||||||
|
const getPostTree = () => {
|
||||||
|
getListperformTree({}).then((res: any) => {
|
||||||
|
if (res.code == 1) postTree.value = handlePostData(res.data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**处理组织数据 */
|
||||||
|
let handlePostData = (list) => {
|
||||||
|
let data = list.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.performclassname,
|
||||||
|
value: item.listperformid,
|
||||||
|
children: item.children ? handlePostData(item.children) : [],
|
||||||
|
};
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 文件上传
|
||||||
|
const afterList = ref<UploadUserFile[]>([]);
|
||||||
|
const handleUploadAfter = (file: any) => {
|
||||||
|
// if (afterList.value.length != 0) {
|
||||||
|
// ElMessage.error("只能上传一份文件!");
|
||||||
|
// getCheckDangers(form.value.workId || uuid.value);
|
||||||
|
// } else {
|
||||||
|
// }
|
||||||
|
const newFile = new FormData();
|
||||||
|
newFile.append("file", file.file);
|
||||||
|
uploadFile(
|
||||||
|
userId.value,
|
||||||
|
form.value.workId || uuid.value,
|
||||||
|
FileType.workManagement,
|
||||||
|
newFile
|
||||||
|
).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
ElMessage.success("上传成功!");
|
||||||
|
getCheckDangers(form.value.workId || uuid.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//文件显示
|
||||||
|
const baseImgUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
|
const getCheckDangers = (id) => {
|
||||||
|
getFile(id, FileType.workManagement).then((res: any) => {
|
||||||
|
afterList.value = res.data.map((item) => {
|
||||||
|
let arr = item;
|
||||||
|
let index = item.filepath.indexOf("."); //获取第一个"_"的位置
|
||||||
|
let after1 = item.filepath.substring(index + 1);
|
||||||
|
switch (after1) {
|
||||||
|
case "xlsx":
|
||||||
|
arr.url = "src/assets/images/exl.png";
|
||||||
|
break;
|
||||||
|
case "exl":
|
||||||
|
arr.url = "src/assets/images/exl.png";
|
||||||
|
break;
|
||||||
|
case "pdf":
|
||||||
|
arr.url = "src/assets/images/pdf.png";
|
||||||
|
break;
|
||||||
|
case "word":
|
||||||
|
arr.url = "src/assets/images/word.png";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
arr.url = baseImgUrl.value + item.filepath;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//删除附件
|
||||||
|
const handleRemove = (file) => {
|
||||||
|
delFile(file.sysdocumentid).then((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
ElMessage.success("删除成功!");
|
||||||
|
}
|
||||||
|
getCheckDangers(form.value.workId || uuid.value);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//下载附件
|
||||||
|
const handleDownload = (file) => {
|
||||||
|
function text() {
|
||||||
|
const x = new XMLHttpRequest();
|
||||||
|
x.open("GET", baseImgUrl.value + file.filepath, true);
|
||||||
|
x.responseType = "blob";
|
||||||
|
x.onload = function () {
|
||||||
|
const url = window.URL.createObjectURL(x.response);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = file.name;
|
||||||
|
a.click();
|
||||||
|
};
|
||||||
|
x.send();
|
||||||
|
}
|
||||||
|
let index = file.filepath.indexOf("."); //获取第一个"_"的位置
|
||||||
|
let after1 = file.filepath.substring(index + 1);
|
||||||
|
switch (after1) {
|
||||||
|
case "xlsx":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "exl":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "pdf":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "word":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
window.open(baseImgUrl.value + file.filepath, "_blank");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const upVisible = ref(false);
|
||||||
|
const upImageUrl = ref("");
|
||||||
|
//查看附件
|
||||||
|
const handleInfo = (file) => {
|
||||||
|
upImageUrl.value = file.url!;
|
||||||
|
upVisible.value = true;
|
||||||
|
};
|
||||||
|
//关闭弹窗
|
||||||
|
const onclone = () => {
|
||||||
|
afterList.value = [];
|
||||||
|
form.value = {};
|
||||||
|
emits("close");
|
||||||
|
};
|
||||||
|
const getReceiveWorkDetail = (id) =>{
|
||||||
|
let params = {
|
||||||
|
wkUserId :id
|
||||||
|
}
|
||||||
|
receiveWorkDetail(params).then((res: any) => {
|
||||||
|
console.log(res,'res====>');
|
||||||
|
completeform.value = res.data;
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onMounted(() => {});
|
||||||
|
watch(
|
||||||
|
() => props.form.workId,
|
||||||
|
(val) => {
|
||||||
|
uuid.value = getUUID();
|
||||||
|
if (val) {
|
||||||
|
console.log(props.form);
|
||||||
|
|
||||||
|
form.value = props.form;
|
||||||
|
form.value.listperformid = props.form.listPerformId;
|
||||||
|
form.value.time = [form.value.startTime, form.value.endTime];
|
||||||
|
getCheckDangers(form.value.workId || uuid.value);
|
||||||
|
completegetCheckDangers(completeform.value.workId || uuid.value);
|
||||||
|
console.log(props.type,'props.type===>');
|
||||||
|
|
||||||
|
if (props.type == 2) {
|
||||||
|
console.log(11111);
|
||||||
|
getReceiveWorkDetail(props.form.wkUserId);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => props.readonly,
|
||||||
|
(val) => {
|
||||||
|
if (val) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => props.visible,
|
||||||
|
(val) => {
|
||||||
|
if (val) getPostTree();
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.detailForm-content {
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
:deep(.el-form) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
// justify-content: space-around;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
width: 47%;
|
||||||
|
}
|
||||||
|
::v-deep(.el-upload-list__item-actions) {
|
||||||
|
display: flex;
|
||||||
|
> span:nth-child(2) {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep(.el-upload-list__item-preview) {
|
||||||
|
margin-right: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> span {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep(.avatar-uploader-icon) {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
281
src/views/acceptWork/index.vue
Normal file
281
src/views/acceptWork/index.vue
Normal file
|
|
@ -0,0 +1,281 @@
|
||||||
|
<template>
|
||||||
|
<div class="percentage-content">
|
||||||
|
<div class="content">
|
||||||
|
<div class="h-layout space-between h-center">
|
||||||
|
<div>
|
||||||
|
<div class="h-layout h-center">
|
||||||
|
<div class="tool-item" @click="getList">
|
||||||
|
<svg-icon name="refurbish" class="icon" />
|
||||||
|
<span>刷新</span>
|
||||||
|
</div>
|
||||||
|
<div class="label-select filter-tab">
|
||||||
|
<label>事项类型</label>
|
||||||
|
<el-select
|
||||||
|
v-model="search.workType"
|
||||||
|
@change="getList"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in workOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="label-select filter-tab">
|
||||||
|
<label>事项类型</label>
|
||||||
|
<el-select
|
||||||
|
v-model="search.typeId"
|
||||||
|
@change="getList"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in tabsOptions"
|
||||||
|
:key="item.typeId"
|
||||||
|
:label="item.typeName"
|
||||||
|
:value="item.typeId"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="loading"
|
||||||
|
class="table"
|
||||||
|
v-loading="tableDataloading"
|
||||||
|
:data="tableData"
|
||||||
|
header-row-class-name="el-one-header"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column type="index" align="center" label="序号" width="80"/>
|
||||||
|
<el-table-column prop="title" align="center" label="工作内容" />
|
||||||
|
<el-table-column prop="startTime" align="center" label="开始时间" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.startTime}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="endTime" align="center" label="结束时间" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.endTime?scope.row.endTime:'--'}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="chinaName" align="center" label="发布人" width="120"/>
|
||||||
|
<el-table-column prop="postName" align="center" label="发布人岗位" width="150"/>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
width="260"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<span
|
||||||
|
v-if="search.workType==1"
|
||||||
|
class="operate"
|
||||||
|
@click="
|
||||||
|
(dialogVisible = true), (form = scope.row)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<!-- (readonly = true) -->
|
||||||
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
|
<span class="detail">完成</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
v-else
|
||||||
|
class="operate"
|
||||||
|
@click="
|
||||||
|
(dialogVisible = true), (form = scope.row),(type = search.workType)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<!-- (readonly = true) -->
|
||||||
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
|
<span class="detail">详情</span>
|
||||||
|
</span>
|
||||||
|
<!-- <span class="operate" @click="deletelist(scope.row)">
|
||||||
|
<svg-icon name="delete" class="icon"></svg-icon>
|
||||||
|
<span class="func">删除</span>
|
||||||
|
</span> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<el-pagination
|
||||||
|
class="pagination"
|
||||||
|
@size-change="getReceiveWor"
|
||||||
|
@current-change="getReceiveWor"
|
||||||
|
v-model:current-page.sync="currentPage"
|
||||||
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
|
v-model:page-size.sync="pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<Add
|
||||||
|
:visible="dialogVisible"
|
||||||
|
:form="form"
|
||||||
|
:readonly="readonly"
|
||||||
|
@close="onclone"
|
||||||
|
:typeId="typeId"
|
||||||
|
:tabsTitle="tabsTitle"
|
||||||
|
:type="type"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang='ts' setup>
|
||||||
|
import { onMounted, ref } from "vue";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
import { wkTypes, sendWorkPage, deleteWork, receiveWork } from "@/api/Work";
|
||||||
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
const router = useRouter();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
|
||||||
|
const tabIndex = ref(0);
|
||||||
|
const typeId = ref('');
|
||||||
|
//弹窗标题
|
||||||
|
const tabsTitle = ref('');
|
||||||
|
|
||||||
|
const workOptions = ref([
|
||||||
|
{name:'待办事项',value:1},
|
||||||
|
{name:'已办事项',value:2},
|
||||||
|
])
|
||||||
|
const tabsOptions = ref({})
|
||||||
|
|
||||||
|
const search = ref({
|
||||||
|
workType:1,
|
||||||
|
typeId:'',
|
||||||
|
});
|
||||||
|
const currentPage = ref(1);
|
||||||
|
const pageSize = ref(10);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const type = ref(1);
|
||||||
|
//获取列表
|
||||||
|
const tableDataloading = ref(false);
|
||||||
|
const tableData = ref([]);
|
||||||
|
const getReceiveWor = () => {
|
||||||
|
tableDataloading.value = true;
|
||||||
|
let params = {
|
||||||
|
userId:userId.value,
|
||||||
|
limit: pageSize.value,
|
||||||
|
page: currentPage.value,
|
||||||
|
state:search.value.workType,
|
||||||
|
typeId:search.value.typeId,
|
||||||
|
};
|
||||||
|
receiveWork(params).then((res: any) => {
|
||||||
|
tableData.value = res.data.list;
|
||||||
|
total.value = res.data.total;
|
||||||
|
tableDataloading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//新增弹窗
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
const form = ref({});
|
||||||
|
const readonly = ref(false);
|
||||||
|
//关闭新增弹窗
|
||||||
|
const onclone = () => {
|
||||||
|
dialogVisible.value = false;
|
||||||
|
form.value = {};
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
//删除
|
||||||
|
// const deletelist = (data)=>{
|
||||||
|
// ElMessageBox.confirm("是否确认删除?", "提示", {
|
||||||
|
// confirmButtonText: "是",
|
||||||
|
// cancelButtonText: "否",
|
||||||
|
// = : "warning",
|
||||||
|
// }).then(() => {
|
||||||
|
// let params = {
|
||||||
|
// workId: data.workId,
|
||||||
|
// classify: 1,
|
||||||
|
// };
|
||||||
|
// deleteWork(params).then((res: any) => {
|
||||||
|
// if (res.code == 1) {
|
||||||
|
// ElMessage.success({
|
||||||
|
// message: "删除成功",
|
||||||
|
// = : "success",
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// ElMessage.error({
|
||||||
|
// message: res.message,
|
||||||
|
// = : "error",
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// getList();
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
|
// };
|
||||||
|
|
||||||
|
//应急事件详情
|
||||||
|
const toDetail = (id) => {
|
||||||
|
router.push({
|
||||||
|
name: "work-detail",
|
||||||
|
query: { id: id },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const getWkTypes = ()=>{
|
||||||
|
let params = {
|
||||||
|
classify:1
|
||||||
|
}
|
||||||
|
wkTypes(params).then((res: any) => {
|
||||||
|
tabsOptions.value = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const getList = ()=>{
|
||||||
|
currentPage.value = 1;
|
||||||
|
getReceiveWor();
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getReceiveWor();
|
||||||
|
getWkTypes();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.percentage-content {
|
||||||
|
height: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.rg {
|
||||||
|
padding: 16px;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 0 6px rgb(0 120 255 / 10%);
|
||||||
|
border-radius: 6px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
:deep(.el-radio-button__inner) {
|
||||||
|
min-width: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0.26042vw;
|
||||||
|
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
|
||||||
|
padding: 0.83333vw;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.table {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -83,6 +83,7 @@ const ruleForm = reactive<FormRules>({
|
||||||
orgname: [{ required: true, message: "请输入村庄名称", trigger: "blur" }],
|
orgname: [{ required: true, message: "请输入村庄名称", trigger: "blur" }],
|
||||||
sortId: [{ required: true, message: "请输入排序", trigger: "blur" }],
|
sortId: [{ required: true, message: "请输入排序", trigger: "blur" }],
|
||||||
orgcode: [{ required: true, message: "请选择所属地区", trigger: "blur" }],
|
orgcode: [{ required: true, message: "请选择所属地区", trigger: "blur" }],
|
||||||
|
superiororgcode: [{ required: true, message: "请选择所属地区", trigger: "blur" }],
|
||||||
});
|
});
|
||||||
const formData = ref<any>({});
|
const formData = ref<any>({});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@
|
||||||
v-model="detailForm.content"
|
v-model="detailForm.content"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="诉求图片" prop="coverImg" style="width: 100%;">
|
<el-form-item label="诉求文件" prop="coverImg" style="width: 100%;">
|
||||||
<CustomUpload
|
<!-- <CustomUpload
|
||||||
:listPic="fileListEscalation"
|
:listPic="fileListEscalation"
|
||||||
:OTCType="FileType.demandsEscalation"
|
:OTCType="FileType.demandsEscalation"
|
||||||
:uuid="detailForm.difficultyId"
|
:uuid="detailForm.difficultyId"
|
||||||
|
|
@ -56,7 +56,51 @@
|
||||||
:max="9"
|
:max="9"
|
||||||
@onUpdate="updateFileEscalation"
|
@onUpdate="updateFileEscalation"
|
||||||
:readonly="true"
|
:readonly="true"
|
||||||
></CustomUpload>
|
></CustomUpload> -->
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
ref="uploadAfter"
|
||||||
|
action="#"
|
||||||
|
list-type="upload-demo"
|
||||||
|
:file-list="afterList"
|
||||||
|
:http-request="handleUploadAfter"
|
||||||
|
>
|
||||||
|
<!-- <el-icon class="avatar-uploader-icon" :size="40">
|
||||||
|
<Plus />
|
||||||
|
</el-icon> -->
|
||||||
|
<template #file="{ file }">
|
||||||
|
<div>
|
||||||
|
<span class="el-upload-list__item-actions">
|
||||||
|
<span class="el-upload-list__item-preview">
|
||||||
|
<el-icon>
|
||||||
|
<Document />
|
||||||
|
</el-icon>
|
||||||
|
<span>{{ file.realfilename }}</span>
|
||||||
|
</span>
|
||||||
|
<!-- <span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleInfo(file)"
|
||||||
|
>
|
||||||
|
<el-icon><zoom-in /></el-icon>
|
||||||
|
</span> -->
|
||||||
|
<span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleDownload(file)"
|
||||||
|
>
|
||||||
|
<el-icon><zoom-in /></el-icon>
|
||||||
|
</span>
|
||||||
|
<!-- <span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleRemove(file)"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Delete />
|
||||||
|
</el-icon>
|
||||||
|
</span> -->
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -213,7 +257,7 @@ const updateFileEscalation = (files: any) => {
|
||||||
};
|
};
|
||||||
//图片查询
|
//图片查询
|
||||||
const getFilesEscalation = (id, FileType) => {
|
const getFilesEscalation = (id, FileType) => {
|
||||||
getFile(id, FileType).then((res: any) => {
|
getFile(id, FileType.demandsEscalation).then((res: any) => {
|
||||||
fileListEscalation.value = res.data;
|
fileListEscalation.value = res.data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -230,7 +274,7 @@ const updateFile = (files: any) => {
|
||||||
};
|
};
|
||||||
//图片查询
|
//图片查询
|
||||||
const getFiles = (id, FileType) => {
|
const getFiles = (id, FileType) => {
|
||||||
getFile(id, FileType).then((res: any) => {
|
getFile(id, FileType.demandsEscalation).then((res: any) => {
|
||||||
fileList.value = res.data;
|
fileList.value = res.data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -290,11 +334,114 @@ const refurbish = () => {
|
||||||
getDetail();
|
getDetail();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
// 文件上传
|
||||||
|
const afterList = ref<UploadUserFile[]>([]);
|
||||||
|
const handleUploadAfter = (file: any) => {
|
||||||
|
// if (afterList.value.length != 0) {
|
||||||
|
// ElMessage.error("只能上传一份文件!");
|
||||||
|
// getCheckDangers(form.value.dynamicsId || uuid.value);
|
||||||
|
// } else {
|
||||||
|
// }
|
||||||
|
// const newFile = new FormData();
|
||||||
|
// newFile.append("file", file.file);
|
||||||
|
// uploadFile(userId.value, form.value.dynamicsId || uuid.value, FileType.demandsEscalation, newFile).then((res) => {
|
||||||
|
// if (res) {
|
||||||
|
// ElMessage.success("上传成功!");
|
||||||
|
// getCheckDangers(form.value.dynamicsId || uuid.value)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
};
|
||||||
|
//文件显示
|
||||||
|
const baseImgUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
|
const getCheckDangers = (id) => {
|
||||||
|
getFile(
|
||||||
|
id,
|
||||||
|
FileType.demandsEscalation
|
||||||
|
).then((res: any) => {
|
||||||
|
afterList.value = res.data.map(item => {
|
||||||
|
let arr = item;
|
||||||
|
let index = item.filepath.indexOf(".");//获取第一个"_"的位置
|
||||||
|
let after1 = item.filepath.substring(index + 1);
|
||||||
|
switch (after1) {
|
||||||
|
case 'xlsx':
|
||||||
|
arr.url = 'src/assets/images/exl.png';
|
||||||
|
break;
|
||||||
|
case 'exl':
|
||||||
|
arr.url = 'src/assets/images/exl.png';
|
||||||
|
break;
|
||||||
|
case 'pdf':
|
||||||
|
arr.url = 'src/assets/images/pdf.png';
|
||||||
|
break;
|
||||||
|
case 'word':
|
||||||
|
arr.url = 'src/assets/images/word.png';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
arr.url = baseImgUrl.value + item.filepath;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
};
|
||||||
|
//删除附件
|
||||||
|
// const handleRemove = (file) => {
|
||||||
|
// delFile(file.sysdocumentid).then((res: any) => {
|
||||||
|
// if (res) {
|
||||||
|
// ElMessage.success("删除成功!");
|
||||||
|
// }
|
||||||
|
// getCheckDangers(form.value.dynamicsId || uuid.value);
|
||||||
|
// })
|
||||||
|
// };
|
||||||
|
//下载附件
|
||||||
|
const handleDownload = (file) => {
|
||||||
|
function text() {
|
||||||
|
const x = new XMLHttpRequest();
|
||||||
|
x.open("GET", baseImgUrl.value + file.filepath, true);
|
||||||
|
x.responseType = "blob";
|
||||||
|
x.onload = function () {
|
||||||
|
const url = window.URL.createObjectURL(x.response);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = file.name;
|
||||||
|
a.click();
|
||||||
|
};
|
||||||
|
x.send();
|
||||||
|
}
|
||||||
|
let index = file.filepath.indexOf("."); //获取第一个"_"的位置
|
||||||
|
let after1 = file.filepath.substring(index + 1);
|
||||||
|
switch (after1) {
|
||||||
|
case "xlsx":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "exl":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "pdf":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "word":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
window.open(baseImgUrl.value + file.filepath, "_blank");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const upVisible = ref(false);
|
||||||
|
const upImageUrl = ref("");
|
||||||
|
//查看附件
|
||||||
|
const handleInfo = (file) => {
|
||||||
|
upImageUrl.value = file.url!;
|
||||||
|
upVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
routeId.value = route.query.id || "";
|
routeId.value = route.query.id || "";
|
||||||
uuid.value = getUUID();
|
uuid.value = getUUID();
|
||||||
refurbish();
|
refurbish();
|
||||||
getList();
|
getList();
|
||||||
|
getCheckDangers(route.query.id)
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -328,4 +475,26 @@ onMounted(() => {
|
||||||
:deep(.el-form-item) {
|
:deep(.el-form-item) {
|
||||||
width: 45%;
|
width: 45%;
|
||||||
}
|
}
|
||||||
|
::v-deep(.el-upload-list__item-actions) {
|
||||||
|
display: flex;
|
||||||
|
> span:nth-child(2) {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep(.el-upload-list__item-preview) {
|
||||||
|
margin-right: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> span {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep(.avatar-uploader-icon) {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
::v-deep(.el-upload--upload-demo) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.typeId"
|
v-model="form.typeId"
|
||||||
placeholder="请选择类型"
|
placeholder="请选择类型"
|
||||||
style="width: 240px"
|
style="width: 240px;"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in option"
|
v-for="item in option"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else><span>
|
<template v-else><span>
|
||||||
<!-- 暂时使用让婷姐出个图 -->
|
|
||||||
<img src="../../assets/images/home/none.png" alt="" srcset="">
|
<img src="../../assets/images/home/none.png" alt="" srcset="">
|
||||||
</span></template>
|
</span></template>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
|
||||||
334
src/views/system/base/appeal-allocation/detail.vue
Normal file
334
src/views/system/base/appeal-allocation/detail.vue
Normal file
|
|
@ -0,0 +1,334 @@
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BaseDialog
|
||||||
|
:dialogVisible="props.visible"
|
||||||
|
@close="onclone"
|
||||||
|
titleName="诉求详情"
|
||||||
|
width="50%"
|
||||||
|
@onSubmit="handleSubmit"
|
||||||
|
:footerclosed="true"
|
||||||
|
:diafooter="true"
|
||||||
|
:footerkeepnaem="props.readonly ? false : true"
|
||||||
|
>
|
||||||
|
<div class="detailForm-content">
|
||||||
|
<el-form ref="detailFormRef" label-width="150px" :model="detailForm">
|
||||||
|
<el-form-item label="姓名" prop="userName">
|
||||||
|
<el-input
|
||||||
|
:disabled="detailFormEnable"
|
||||||
|
placeholder="请输入"
|
||||||
|
type="input"
|
||||||
|
v-model="detailForm.userName"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-date-picker
|
||||||
|
:disabled="detailFormEnable"
|
||||||
|
v-model="detailForm.createTime"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择出生日期"
|
||||||
|
size="default"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="诉求内容" prop="content" style="width: 100%;">
|
||||||
|
<el-input
|
||||||
|
:disabled="detailFormEnable"
|
||||||
|
placeholder="请输入"
|
||||||
|
:rows="4"
|
||||||
|
type="textarea"
|
||||||
|
v-model="detailForm.content"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="诉求文件" prop="coverImg" style="width: 100%;">
|
||||||
|
<!-- <CustomUpload
|
||||||
|
:listPic="fileListEscalation"
|
||||||
|
:OTCType="FileType.demandsEscalation"
|
||||||
|
:uuid="detailForm.difficultyId"
|
||||||
|
:userId="userId"
|
||||||
|
:baseUrl="baseUrl"
|
||||||
|
:max="9"
|
||||||
|
@onUpdate="updateFileEscalation"
|
||||||
|
:readonly="true"
|
||||||
|
></CustomUpload> -->
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
ref="uploadAfter"
|
||||||
|
action="#"
|
||||||
|
list-type="upload-demo"
|
||||||
|
:file-list="afterList"
|
||||||
|
:http-request="handleUploadAfter"
|
||||||
|
>
|
||||||
|
<!-- <el-icon class="avatar-uploader-icon" :size="40">
|
||||||
|
<Plus />
|
||||||
|
</el-icon> -->
|
||||||
|
<template #file="{ file }">
|
||||||
|
<div>
|
||||||
|
<span class="el-upload-list__item-actions">
|
||||||
|
<span class="el-upload-list__item-preview">
|
||||||
|
<el-icon>
|
||||||
|
<Document />
|
||||||
|
</el-icon>
|
||||||
|
<span>{{ file.realfilename }}</span>
|
||||||
|
</span>
|
||||||
|
<!-- <span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleInfo(file)"
|
||||||
|
>
|
||||||
|
<el-icon><zoom-in /></el-icon>
|
||||||
|
</span> -->
|
||||||
|
<span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleDownload(file)"
|
||||||
|
>
|
||||||
|
<el-icon><zoom-in /></el-icon>
|
||||||
|
</span>
|
||||||
|
<!-- <span
|
||||||
|
class="el-upload-list__item-preview"
|
||||||
|
@click="handleRemove(file)"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Delete />
|
||||||
|
</el-icon>
|
||||||
|
</span> -->
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</BaseDialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" >
|
||||||
|
import { reactive, ref, onMounted, watch } from "vue";
|
||||||
|
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||||
|
import {
|
||||||
|
difficultyDetail,
|
||||||
|
} from "@/api/demands";
|
||||||
|
import { getFile } from "@/api/file";
|
||||||
|
import { getUUID, FileType } from "@/utils/common";
|
||||||
|
import type { UploadUserFile } from "element-plus";
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
|
||||||
|
//诉求详情form框操作
|
||||||
|
const detailFormEnable = ref(true);
|
||||||
|
const detailForm = ref<any>({});
|
||||||
|
const detailFormRef = ref<FormInstance>();
|
||||||
|
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: Object,
|
||||||
|
id: String,
|
||||||
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["close", "onSubmit"]);
|
||||||
|
// 诉求图片
|
||||||
|
//
|
||||||
|
//上传
|
||||||
|
const fileListEscalation = ref([]);
|
||||||
|
/**
|
||||||
|
* 文件列表更新
|
||||||
|
*/
|
||||||
|
const updateFileEscalation = (files: any) => {
|
||||||
|
fileListEscalation.value = files;
|
||||||
|
};
|
||||||
|
//图片查询
|
||||||
|
const getFilesEscalation = (id, FileType) => {
|
||||||
|
getFile(id, FileType.demandsEscalation).then((res: any) => {
|
||||||
|
fileListEscalation.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//处理困难图片
|
||||||
|
const fileList = ref([]);
|
||||||
|
const baseUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
|
/**
|
||||||
|
* 文件列表更新
|
||||||
|
*/
|
||||||
|
const updateFile = (files: any) => {
|
||||||
|
fileList.value = files;
|
||||||
|
};
|
||||||
|
//图片查询
|
||||||
|
const getFiles = (id, FileType) => {
|
||||||
|
getFile(id, FileType.demandsEscalation).then((res: any) => {
|
||||||
|
fileList.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取详情
|
||||||
|
const getDetail = () => {
|
||||||
|
difficultyDetail({ difficultyId: props.id }).then((res: any) => {
|
||||||
|
detailForm.value = res.data;
|
||||||
|
getFilesEscalation(res.data.difficultyId,FileType.demandsEscalation);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//关闭弹窗
|
||||||
|
const onclone = () => {
|
||||||
|
detailForm.value = {};
|
||||||
|
emits("close");
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 文件上传
|
||||||
|
const afterList = ref<UploadUserFile[]>([]);
|
||||||
|
const handleUploadAfter = (file: any) => {
|
||||||
|
// if (afterList.value.length != 0) {
|
||||||
|
// ElMessage.error("只能上传一份文件!");
|
||||||
|
// getCheckDangers(form.value.dynamicsId || uuid.value);
|
||||||
|
// } else {
|
||||||
|
// }
|
||||||
|
// const newFile = new FormData();
|
||||||
|
// newFile.append("file", file.file);
|
||||||
|
// uploadFile(userId.value, form.value.dynamicsId || uuid.value, FileType.demandsEscalation, newFile).then((res) => {
|
||||||
|
// if (res) {
|
||||||
|
// ElMessage.success("上传成功!");
|
||||||
|
// getCheckDangers(form.value.dynamicsId || uuid.value)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
};
|
||||||
|
//文件显示
|
||||||
|
const baseImgUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
|
const getCheckDangers = (id) => {
|
||||||
|
getFile(
|
||||||
|
id,
|
||||||
|
FileType.demandsEscalation
|
||||||
|
).then((res: any) => {
|
||||||
|
afterList.value = res.data.map(item => {
|
||||||
|
let arr = item;
|
||||||
|
let index = item.filepath.indexOf(".");//获取第一个"_"的位置
|
||||||
|
let after1 = item.filepath.substring(index + 1);
|
||||||
|
switch (after1) {
|
||||||
|
case 'xlsx':
|
||||||
|
arr.url = 'src/assets/images/exl.png';
|
||||||
|
break;
|
||||||
|
case 'exl':
|
||||||
|
arr.url = 'src/assets/images/exl.png';
|
||||||
|
break;
|
||||||
|
case 'pdf':
|
||||||
|
arr.url = 'src/assets/images/pdf.png';
|
||||||
|
break;
|
||||||
|
case 'word':
|
||||||
|
arr.url = 'src/assets/images/word.png';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
arr.url = baseImgUrl.value + item.filepath;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
};
|
||||||
|
//删除附件
|
||||||
|
// const handleRemove = (file) => {
|
||||||
|
// delFile(file.sysdocumentid).then((res: any) => {
|
||||||
|
// if (res) {
|
||||||
|
// ElMessage.success("删除成功!");
|
||||||
|
// }
|
||||||
|
// getCheckDangers(form.value.dynamicsId || uuid.value);
|
||||||
|
// })
|
||||||
|
// };
|
||||||
|
//下载附件
|
||||||
|
const handleDownload = (file) => {
|
||||||
|
function text() {
|
||||||
|
const x = new XMLHttpRequest();
|
||||||
|
x.open("GET", baseImgUrl.value + file.filepath, true);
|
||||||
|
x.responseType = "blob";
|
||||||
|
x.onload = function () {
|
||||||
|
const url = window.URL.createObjectURL(x.response);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = file.name;
|
||||||
|
a.click();
|
||||||
|
};
|
||||||
|
x.send();
|
||||||
|
}
|
||||||
|
let index = file.filepath.indexOf("."); //获取第一个"_"的位置
|
||||||
|
let after1 = file.filepath.substring(index + 1);
|
||||||
|
switch (after1) {
|
||||||
|
case "xlsx":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "exl":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "pdf":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
case "word":
|
||||||
|
text();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
window.open(baseImgUrl.value + file.filepath, "_blank");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const upVisible = ref(false);
|
||||||
|
const upImageUrl = ref("");
|
||||||
|
//查看附件
|
||||||
|
const handleInfo = (file) => {
|
||||||
|
upImageUrl.value = file.url!;
|
||||||
|
upVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.visible,
|
||||||
|
(val) => {
|
||||||
|
if (props.id) {
|
||||||
|
getDetail();
|
||||||
|
getCheckDangers(props.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.detailForm-content {
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
:deep(.el-form) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
width: 47%;
|
||||||
|
}
|
||||||
|
::v-deep(.el-upload-list__item-actions) {
|
||||||
|
display: flex;
|
||||||
|
> span:nth-child(2) {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep(.el-upload-list__item-preview) {
|
||||||
|
margin-right: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> span {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep(.avatar-uploader-icon) {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
::v-deep(.el-upload--upload-demo) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -23,12 +23,15 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="addform.userId"
|
v-model="addform.userId"
|
||||||
placeholder="请选择处置人员"
|
placeholder="请选择处置人员"
|
||||||
|
filterable
|
||||||
size="large"
|
size="large"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.sysuserid"
|
:key="item.sysuserid"
|
||||||
:label="'姓名:' +item.chinaname + ' ' + '岗位:'+item.postName"
|
:label="
|
||||||
|
'姓名:' + item.chinaname + ' ' + '岗位:' + item.postName
|
||||||
|
"
|
||||||
:value="item.sysuserid"
|
:value="item.sysuserid"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -50,9 +53,7 @@ const userId = ref(user.value.userId);
|
||||||
const titleName = ref("新增类型");
|
const titleName = ref("新增类型");
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const ruleForm = reactive<FormRules>({
|
const ruleForm = reactive<FormRules>({
|
||||||
userId: [
|
userId: [{ required: true, message: "请选择处置人员", trigger: "blur" }],
|
||||||
{ required: true, message: "请选择处置人员", trigger: "blur" },
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -77,7 +78,7 @@ const handleSubmit = () => {
|
||||||
console.log(addform.value);
|
console.log(addform.value);
|
||||||
let params = {
|
let params = {
|
||||||
...addform.value,
|
...addform.value,
|
||||||
difficultyId:props.id
|
difficultyId: props.id,
|
||||||
};
|
};
|
||||||
console.log(params, "params===>");
|
console.log(params, "params===>");
|
||||||
difficultyAssign(params).then((res: any) => {
|
difficultyAssign(params).then((res: any) => {
|
||||||
|
|
@ -105,7 +106,7 @@ const getPostListByUserId = () => {
|
||||||
};
|
};
|
||||||
postListByUserId(params).then((res: any) => {
|
postListByUserId(params).then((res: any) => {
|
||||||
console.log(res.data, "res==>");
|
console.log(res.data, "res==>");
|
||||||
options.value = res.data
|
options.value = res.data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//关闭弹窗
|
//关闭弹窗
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,10 @@
|
||||||
width="180"
|
width="180"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<span class="operate" @click="toDetail(scope.row)">
|
||||||
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
|
<span class="detail">详情</span>
|
||||||
|
</span>
|
||||||
<span class="operate" @click="toDisposeOf(scope.row)">
|
<span class="operate" @click="toDisposeOf(scope.row)">
|
||||||
<svg-icon name="detail" class="icon"></svg-icon>
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
<span class="detail">处置</span>
|
<span class="detail">处置</span>
|
||||||
|
|
@ -102,12 +106,19 @@
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
@close="onclone"
|
@close="onclone"
|
||||||
/>
|
/>
|
||||||
|
<Detail
|
||||||
|
:visible="detaildialogVisible"
|
||||||
|
:id="detailformId"
|
||||||
|
:readonly="detailreadonly"
|
||||||
|
@close="detailonclone"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { difficultyPage } from "@/api/demands";
|
import { difficultyPage } from "@/api/demands";
|
||||||
import DisposeofUp from "./disposeofUp.vue";
|
import DisposeofUp from "./disposeofUp.vue";
|
||||||
|
import Detail from "./detail.vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
|
|
@ -125,6 +136,16 @@ const tableData = ref([]);
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
const formId = ref('');
|
const formId = ref('');
|
||||||
const readonly = ref(false);
|
const readonly = ref(false);
|
||||||
|
//详情弹窗
|
||||||
|
const detailreadonly = ref(false);
|
||||||
|
const detailformId = ref('');
|
||||||
|
const detaildialogVisible = ref(false);
|
||||||
|
const detailonclone = () => {
|
||||||
|
detaildialogVisible.value = false;
|
||||||
|
detailformId.value = '';
|
||||||
|
// getList();
|
||||||
|
}
|
||||||
|
|
||||||
//获取列表
|
//获取列表
|
||||||
const tableDataloading = ref(false);
|
const tableDataloading = ref(false);
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
|
|
@ -156,6 +177,11 @@ const onclone = () => {
|
||||||
formId.value = '';
|
formId.value = '';
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
const toDetail = (data)=>{
|
||||||
|
detaildialogVisible.value = true;
|
||||||
|
detailformId.value = data.difficultyId;
|
||||||
|
detailreadonly.value = true;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
class="pagination"
|
class="pagination"
|
||||||
@size-change="getList"
|
@size-change="getSendWorkPage"
|
||||||
@current-change="getList"
|
@current-change="getSendWorkPage"
|
||||||
v-model:current-page.sync="currentPage"
|
v-model:current-page.sync="currentPage"
|
||||||
:page-sizes="[10, 15, 20, 30]"
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
v-model:page-size.sync="pageSize"
|
v-model:page-size.sync="pageSize"
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user