Commit 1ef2a6d0 authored by 胡占生's avatar 胡占生 🇨🇳

fix: 创建任务,任务管理,接口联调对接修复

parent f1c1237c
<template>
<div>
<LHeader :text="text"></LHeader>
<van-tabs v-model="active" color="#2980f7"
animated
>
<van-tab title="固有风险信息">
<van-form
@submit="onSubmit"
:scroll-to-error="true"
......@@ -364,6 +368,69 @@
>取消</van-button
>
</div>
</van-tab>
<van-tab title="现状风险">
<div
class="con-list"
@touchmove="showIndex = null"
>
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
>
<div style="font-size: 0.45rem;padding: 5px 0;">{{item.title}}</div>
<van-row gutter="">
<van-col span="17">
<van-row gutter="">
<van-col span="9">风险系数:</van-col>
<van-col span="15">{{ item.time}}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">创建时间:</van-col>
<van-col span="15">{{ item.name }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">风险描述:</van-col>
<van-col span="15">{{ item.name }}</van-col>
</van-row>
</van-col>
<van-col span="7" :style="{'color':item.state == 1 ? '#0069e5':'#03b615'}">
{{ '●待审批'}}
</van-col>
</van-row>
</van-cell-group>
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="messageList['length']==0"
>
暂无数据
</div>
</div>
</van-tab>
</van-tabs>
<div style="display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
height: 1.5rem;
width: 100%;
text-align: center;
position: fixed;
bottom: 0;">
<div @click="performTasks" style="color: #4bced0;font-size: 14px;font-weight: 600;">
<div style="font-size: 22px;"><van-icon name="plus" /></div>
<div>新增现状风险</div>
</div>
</div>
</div>
</template>
......@@ -419,6 +486,7 @@ export default {
text: "添加固有风险",
id: "",
isTimely:1,
active:0,
form:{
},
......@@ -432,6 +500,14 @@ export default {
factor: "", //风险因素
showFactor: false,
columnsFactor: [],
messageList: [
{
title:'回显风险源名称',
time:'2022-12-12',
name:'Mr.周',
state:1
}
],
source: "", //风险源
showSource: false,
columnsSource: [],
......@@ -480,6 +556,9 @@ export default {
// this.getList();
},
methods: {
performTasks(){
console.log('1233213 :>> ', 1233213);
},
// 点击预览图
clickPre(e) {
console.log(e);
......@@ -703,6 +782,36 @@ export default {
},
};
</script>
<style scoped>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
margin-bottom: 1.5rem;
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</style>
......@@ -7,12 +7,15 @@
:show-error="false"
validate-trigger="onSubmit"
>
<van-divider style="background-color: #fff; margin: 0;padding: 0.2rem 0;" content-position="left">服务项目信息</van-divider>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" >
<img src="@/assets/accidentIcon/bookmark.svg" alt="" style="position: relative;top: 32%;transform: translateY(-50%);" >
服务项目信息
</div>
<van-field
readonly
required
name="creatBy"
:value="form.creatBy"
name="userName"
:value="form.userName"
label="创建人员"
placeholder="请输入"
:rules="[{ required: true, message: '创建人员不能为空' }]"
......@@ -20,27 +23,26 @@
<van-field
readonly
required
name="creatUnit"
:value="form.creatUnit"
name="deptName"
:value="form.deptName"
label="创建单位"
placeholder="请输入"
:rules="[{ required: true, message: '创建单位不能为空' }]"
/>
<van-field
required
name="taskName"
:value="form.taskName"
name="name"
v-model="form.name"
label="任务名称"
placeholder="请输入"
:rules="[{ required: true, message: '任务名称不能为空' }]"
/>
<van-field
readonly
required
clickable
name="source"
:value="form.source"
name="projectName"
:value="form.projectName"
label="关联项目"
placeholder="请选择"
@click="showSource = true"
......@@ -49,7 +51,7 @@
<van-popup v-model="showSource" position="bottom">
<van-picker
show-toolbar
value-key="sourceName"
value-key="name"
:columns="columnsSource"
@confirm="onConSource"
@cancel="showSource = false"
......@@ -57,86 +59,123 @@
</van-popup>
<van-field
readonly
required
name="taskName"
:value="form.taskName"
name="buildingNames"
:value="form.buildingNames"
label="评估楼栋"
placeholder="请输入"
@click="getRiskList()"
:rules="[{ required: true, message: '评估楼栋不能为空' }]"
/>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" >
<img src="@/assets/accidentIcon/bookmark.svg" alt="" style="position: relative;top: 32%;transform: translateY(-50%);" >
任务组织与分配
</div>
<van-field
readonly
required
clickable
name="trouble"
:value="form.trouble"
name="leaderUserName"
:value="form.leaderUserName"
label="项目负责人"
placeholder="请选择"
@click="showTrouble = true"
:rules="[{ required: true, message: '事故类型不能为空' }]"
@click="getLeaderUserList('leaderUser')"
:rules="[{ required: true, message: '项目负责人不能为空' }]"
/>
<van-popup v-model="showTrouble" position="bottom">
<van-picker
show-toolbar
value-key="accidentType"
:columns="columnsTrouble"
@confirm="onConTrouble"
@cancel="showTrouble = false"
/>
</van-popup>
<van-field
v-model="form.startTime"
:value="form.startTime"
required
name="location"
name="startTime"
label="任务开始时间"
type="textarea"
maxlength="255"
rows="1"
autosize
placeholder="请输入"
placeholder="请选择"
@click="selectBeginTime('startTime')"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
<van-field
v-model="form.endTime"
clickable
:value="form.endTime"
required
name="location"
name="endTime"
label="任务结束时间"
type="textarea"
maxlength="255"
rows="1"
autosize
placeholder="请输入"
@click="selectBeginTime('endTime')"
placeholder="请选择"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
<van-field
clickable
required
name="control"
:value="form.control"
name="workUserNames"
:value="form.workUserNames"
label="执行人员"
placeholder="请选择"
@click="showControl = true"
@click="getExecuteUser()"
:rules="[{ required: true, message: '执行人员不能为空' }]"
/>
<van-popup v-model="showControl" position="bottom">
<!-- <van-popup v-model="showControl" position="bottom">
<van-picker
show-toolbar
:columns="columnsControl"
@confirm="onConControl"
@cancel="showControl = false"
/>
</van-popup> -->
<van-field
required
clickable
name="approveUserName"
:value="form.approveUserName"
label="审批负责人"
placeholder="请选择"
@click="getLeaderUserList('approveUser')"
:rules="[{ required: true, message: '事审批负责人不能为空' }]"
/>
<van-popup v-model="showTrouble" position="bottom">
<van-picker
show-toolbar
value-key="nickName"
:columns="columnsTrouble"
@confirm="onConTrouble"
@cancel="showTrouble = false"
/>
</van-popup>
<van-popup v-model="show" position="bottom" :style="{ height: '100%' }">
<!-- <selectPeople @onClose="onClose" @onSave="onSave"></selectPeople> -->
</van-popup>
<van-popup v-model="riskModel" position="bottom" :style="{ height: '100%' }">
<div class="van-picker__toolbar" style="position: absolute;width: 100%;top: 0;">
<button type="button" class="van-picker__cancel" v-on:click="riskModel = false">取消</button
><button type="button" class="van-picker__confirm" @click="onRiskList(riskList)">确认</button>
</div>
<div style="display:flex;margin-top: 44px;">
<van-checkbox-group v-model="riskList" style="width: 100%;font-size: 18px;">
<van-checkbox
shape="square"
style="margin: 10px 0px;justify-content: center;"
v-for="item in riskModelList"
:key="item.id"
:name="item"
>{{ item[filedName] }}</van-checkbox
>
</van-checkbox-group>
</div>
</van-popup>
<!-- 选择时间弹出层 -->
<van-popup v-model="showTime" position="bottom">
<van-datetime-picker
type="datetime"
@confirm="onConTime"
@cancel="showTime = false"
:min-date="minDate"
v-model="currentDate"
/>
</van-popup>
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit"
>上报</van-button
......@@ -154,6 +193,8 @@
<script>
import LHeader from "@/components/header.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import { timestampToTime, generateId } from "@/utils/format";
import { getUserInfo, getLocalUserInfo, setLocalUserInfo} from '@/utils/userInfo'
import { getFun, postFun } from "@/service/table.js";
// import {
// getFormList,
......@@ -169,28 +210,6 @@ export default {
components: {
LHeader,
},
activated() {
this.showSetRank = false; // 再次关闭弹出层 以防万一
if (this.$route.params.taskId) {
this.isShowreturnCause = true;
this.text = "风险上报退回";
this.taskId = this.$route.params.taskId;
this.postReturnEcho();
}
this.getList();
this.$bus.$on("riskLevelBus", (res) => {
this.showSetRank = false; // 再次关闭弹出层 以防万一
console.log(Boolean(res));
if (res) {
this.riskRank = res;
} else {
this.setRank = "";
}
// 销毁一下监听事件 不然会越加越多
this.$bus.$off("riskLevelBus");
});
},
beforeRouteLeave(to, from, next) {
if (to.name != "matrix-grad") {
......@@ -203,14 +222,23 @@ export default {
text: "创建任务",
id: "",
form:{
name:''
},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
projectDirector: "", // 所属工程
timeName: "", //
userPrefix: "", //
showProjectName: false,
riskModel: false,
filedName:'',
currentDate: new Date(),
minDate: new Date(),
showTime: false,
show: false,
riskList: [],
riskModelList: [],
columnsProjectName: [],
factor: "", //风险因素
showFactor: false,
......@@ -223,19 +251,14 @@ export default {
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: ["矩阵式定级", "其他定级方式"],
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: ["重大风险", "较大风险", "一般风险", "较小风险" ],
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
location: "", //风险部位
control: "", //管控层级
showControl: false,
columnsControl: ["项目级", "企业级"],
mainDutyDept: "", // 主责部门
mainDutyDeptId: "",
showMainDutyDept: false,
columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员
......@@ -253,15 +276,134 @@ export default {
};
},
created() {
if (this.$route.params.taskId) {
this.isShowreturnCause = true;
this.text = "风险上报退回";
this.taskId = this.$route.params.taskId;
this.postReturnEcho();
}
var userInfo=getUserInfo()
this.form.userId=userInfo.userId
this.form.userName=userInfo.userName
this.form.deptName=userInfo.dept.deptName
this.form.deptId=userInfo.dept.deptId
getFun(`/risk/plan/project/list`).then((res) => {
this.columnsSource = res.data;
}
);
// this.getList();
},
methods: {
// 确定时间的方法
onConTime(date) {
console.log('%c [ date ]-293', 'font-size:13px; background:pink; color:#bf2c9f;', date)
let time = timestampToTime(date, "DT1", true);
this.form[this.timeName] = time;
this.showTime = false;
},
// 计划开始时间
selectBeginTime(val) {
this.showTime = true;
this.timeName=val
this.currentDate = new Date();
},
getLeaderUserList(e){
if(!this.form.projectId){
this.$toast({
title: "提示",
message: "请选择关联项目!",
});
return false
}
this.userPrefix=e
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFun(`/risk/plan/user/list/${this.form.projectId}`).then(res => {
if (res.code == 200) {
this.columnsTrouble = res.data;
// 对数据进行赋值
this.$toast.clear();
this.showTrouble = true;
} else {
this.$toast.clear();
}
});
},
onRiskList(value) {
console.log('%c [ value ]-331', 'font-size:13px; background:pink; color:#bf2c9f;', value)
if(this.filedName=='nickName'){
this.form.workUserIds= this.filterField("userId",value).join()
this.form.workUserNames= this.filterField("nickName",value).join()
console.log('%c [ this.form.workUserNames ]-334', 'font-size:13px; background:pink; color:#bf2c9f;', this.form.workUserNames)
}else{
this.form.buildingIds= this.filterField("id",value).join()
this.form.buildingNames= this.filterField("name",value).join()
}
this.riskList=[]
this.riskModel = false;
// this.form[this.fieldName] = value.join();
},
getExecuteUser() {
if(!this.form.projectId){
this.$toast({
title: "提示",
message: "请选择关联项目!",
});
return false
}
this.filedName='nickName'
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFun(`/risk/plan/user/list/${this.form.projectId}`).then(res => {
if (res.code == 200) {
this.riskModelList = res.data;
// 对数据进行赋值
this.$toast.clear();
this.riskModel = true;
} else {
this.$toast.clear();
}
});
},
getRiskList() {
if(!this.form.projectId){
this.$toast({
title: "提示",
message: "请选择关联项目!",
});
return false
}
this.filedName='name'
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFun(`/risk/plan/building/list/${this.form.projectId}`).then(res => {
if (res.code == 200) {
this.riskModelList = res.data;
// 对数据进行赋值
this.$toast.clear();
this.riskModel = true;
} else {
this.$toast.clear();
}
});
},
filterField(value,arr){
var arrs=[]
arr.forEach(item=>{
arrs.push(item[value])
})
return arrs
},
async deleteFile(val, detail, key) {
// console.log(val,detail)
if (val.fileId) {
......@@ -281,15 +423,21 @@ export default {
}
},
onSubmit(values) {
let url = "/riskMain/add";
postReAdd(url, formdata)
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let url = "/risk/plan";
postFun(url, this.form)
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
// history.go(-1);
})
.catch(() => {
this.$toast.clear();
......@@ -329,27 +477,6 @@ export default {
});
postriskConiCause(`/riskMain/edit/${this.taskId}`)
.then((res) => {
let data = res.data.riskMain;
let data1 = res.data.ResponsibilityMember;
this.id = data.id;
this.projectId = data.pId;
this.riskRank = data.riskLevel;
this.factor = data.riskFactor;
this.source = data.riskSource;
this.trouble = data.accidentType;
this.setRank = data.level;
this.setRankMode = data.grapingMethod;
this.location = data.riskPosition;
this.control = data.controlLevel;
this.mainDutyDeptId = data.responsibilityDept;
this.mainDutyPeopLeId = data.responsibilityMember;
this.administration = data.managementMeasures;
this.urgent = data.emergencyMeasure;
this.mainDutyPeopLe = data.mainDutyPeopLe;
this.mainDutyDept = data1.organizationName;
this.technology = data.technicalMeasures;
// urgentImg administrationImg technologyImg setRankModeImg
// 定级方式
this.urgentImg = (res.data.imgsysFiles2 || []).map(
(item) => {
......@@ -408,17 +535,11 @@ export default {
this.returnCause = res.data.reason;
//请求风险源
postHdSource(`/riskMain/showSourceName?factorType=${this.factor}`).then(
postHdSource(`/risk/plan/project/list`).then(
(res) => {
this.columnsSource = res.data;
}
);
// 请求事故类型
postHdType(
`/riskMain/showaccidentType?factorType=${this.factor}&sourceName=${this.source}`
).then((res) => {
this.columnsTrouble = res.data;
});
);
})
.catch(() => {
this.$toast.clear();
......@@ -452,38 +573,26 @@ export default {
}
);
},
// 风险源
// 关联项目
onConSource(value) {
if (!value) {
this.showSource = false;
return;
}
this.source = value.sourceName;
this.form.projectId = value.id;
this.form.projectName = value.name;
this.showSource = false;
this.trouble = "";
// 请求事故类型
postHdType(
`/riskMain/showaccidentType?factorType=${this.factor}&sourceName=${this.source}`
).then((res) => {
this.columnsTrouble = res.data;
});
},
// 事故类型
// 项目负责人
onConTrouble(value) {
if (!value) {
this.showTrouble = false;
return;
}
this.trouble = value.accidentType;
this.form[this.userPrefix + "Id"] = value.userId;
this.form[this.userPrefix + "Name"] = value.nickName;
console.log('this.form :>> ', this.form);
this.showTrouble = false;
// 请求三个措施
postRiskShowMeasures(
`/riskMain/showmeasures?factorType=${this.factor}&sourceName=${this.source}&accidentType=${this.trouble}`
).then((res) => {
this.technology = res.data[0].measuresProject;
this.administration = res.data[0].measuresAdministration;
this.urgent = res.data[0].measuresEmergency;
});
},
// 风险定级
onConSetRank(value) {
......
......@@ -6,9 +6,25 @@
</van-sticky>
<div style="margin-bottom: 1.5rem;">
<van-grid :column-num="3" style="background-color: #fff;">
<van-grid-item v-for="value in 5" :key="value">
<van-grid-item >
<div>发起人员:</div>
<div>李小明</div>
<div>{{messageList.createUserName}}</div>
</van-grid-item>
<van-grid-item >
<div>项目负责人:</div>
<div>{{messageList.leaderUserName}}</div>
</van-grid-item>
<van-grid-item >
<div>任务状态:</div>
<div>{{messageList.status}}</div>
</van-grid-item>
<van-grid-item >
<div>开始时间:</div>
<div>{{timestampToTimes(messageList.startTime)||messageList.startTime}}</div>
</van-grid-item>
<van-grid-item >
<div>结束时间:</div>
<div>{{timestampToTimes(messageList.endTime)||messageList.endTime}}</div>
</van-grid-item>
</van-grid>
<van-steps :active="active" active-icon="success" active-color="#38f" style="margin: 0.26rem 0;">
......@@ -29,47 +45,53 @@
>
<van-field
readonly
name="creatBy"
:value="form.creatBy"
name="createUserName"
:value="form.createUserName"
label="创建人员"
input-align="right"
:rules="[{ required: true, message: '创建人员不能为空' }]"
/>
<van-field
readonly
name="creatUnit"
:value="form.creatUnit"
name="createDeptName"
:value="form.createDeptName"
label="创建单位"
input-align="right"
:rules="[{ required: true, message: '创建单位不能为空' }]"
/>
<van-field
readonly
name="taskName"
:value="form.taskName"
name="projectName"
:value="form.projectName"
label="任务名称"
input-align="right"
:rules="[{ required: true, message: '任务名称不能为空' }]"
/>
<van-field
readonly
name="source"
:value="form.source"
name="projectName"
:value="form.projectName"
label="关联项目"
input-align="right"
:rules="[{ required: true, message: '关联项目不能为空' }]"
/>
<van-field
readonly
name="taskName"
:value="form.taskName"
name="buildingNames"
:value="form.buildingNames"
label="评估楼栋"
input-align="right"
:rules="[{ required: true, message: '评估楼栋不能为空' }]"
/>
<van-field
readonly
name="trouble"
:value="form.trouble"
name="leaderUserName"
:value="form.leaderUserName"
label="项目负责人"
input-align="right"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/>
......@@ -79,10 +101,7 @@
readonly
name="location"
label="任务开始时间"
type="textarea"
maxlength="255"
rows="1"
autosize
input-align="right"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
......@@ -91,19 +110,16 @@
readonly
name="location"
label="任务结束时间"
type="textarea"
maxlength="255"
rows="1"
autosize
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
<van-field
clickable
required
name="control"
:value="form.control"
name="workUserNames"
:value="form.workUserNames"
label="执行人员"
input-align="right"
:rules="[{ required: true, message: '执行人员不能为空' }]"
/>
</van-form>
......@@ -213,6 +229,7 @@
<script>
import LHeader from "@/components/header.vue";
import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js";
export default {
name:'risk-confirme',
......@@ -224,28 +241,8 @@
text: "任务单",
searchValue: "",
isHaveNews: false,
messageList: [
{
title:'XX项目评估任务单',
time:'2022-12-12',
name:'Mr.周',
state:1
}
],
riskLogList:[
{
completedTime:'审批通过',
startTime:'2022-12-12',
approvalUserName:'Mr.周',
taskName:'审批负责人'
},
{
completedTime:'审批通过',
startTime:'2022-12-12',
approvalUserName:'Mr.周',
taskName:'审批负责人'
},
],
messageList: [],
riskLogList:[],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
......@@ -257,9 +254,13 @@
};
},
created() {
// this.postList();s
var planId=this.$route.params.id
this.postList(planId);
},
methods: {
timestampToTimes(time){
return timestampToTime(new Date(time),"DT2", true)
},
performTasks(){
this.$router.push({
name: "riskInherent",
......@@ -276,23 +277,20 @@
},
})
},
postList(select = "") {
postList(id) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let formdata = new FormData();
formdata.append("select", select);
postFun(this.tabs[this.active]['api'], formdata)
getFun(`/risk/plan/details/${id}`)
.then((res) => {
console.log('%c [ res ]-309', 'font-size:13px; background:pink; color:#bf2c9f;', res)
this.$toast.clear();
this.messageList =res.data||res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
this.form= this.messageList.detailsDto
console.log('%c [ messageList ]-292', 'font-size:13px; background:pink; color:#bf2c9f;', this.messageList)
})
.catch(() => {
this.$toast.clear();
......
......@@ -40,17 +40,17 @@
:key="index"
@click="touchstart(index, item)"
>
<div style="font-size: 0.45rem;padding: 5px 0;">{{item.title}}</div>
<div style="font-size: 0.45rem;padding: 5px 0;">{{item.name}}</div>
<van-row gutter="">
<van-col span="17">
<van-row gutter="">
<van-col span="9">发起时间:</van-col>
<van-col span="15">{{ item.time}}</van-col>
<van-col span="15">{{timestampToTimes(item.startTime)||item.startTime }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">处理人员:</van-col>
<van-col span="15">{{ item.name }}</van-col>
<van-col span="15">{{ item.leaderUserName }}</van-col>
</van-row>
</van-col>
<van-col span="7" :style="{'color':item.state == 1 ? '#0069e5':'#03b615'}">
......@@ -102,6 +102,7 @@
<script>
import LHeader from "@/components/header.vue";
import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js";
// import { postriskConList } from "@/service/risk";
export default {
......@@ -115,13 +116,6 @@
searchValue: "",
isHaveNews: false,
messageList: [
{
title:'XX项目评估任务单',
time:'2022-12-12',
name:'Mr.周',
state:1,
id:12
}
],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
......@@ -129,19 +123,22 @@
tabs: [
{
title: "未执行",
api: "/riskConfirm/list",
api: "/risk/plan/create/list?status=finish",
},
{
title: "已执行",
api: "/riskConfirm/finishList",
api: "/risk/plan/create/list?status=running",
},
],
};
},
created() {
// this.postList();s
this.postList();
},
methods: {
timestampToTimes(time){
return timestampToTime(new Date(time),"DT1", true)
},
handadd(){
this.$router.push({
name: "riskAdd",
......@@ -157,9 +154,9 @@
loadingType: "spinner",
duration: 0,
});
let formdata = new FormData();
formdata.append("select", select);
postFun(this.tabs[this.active]['api'], formdata)
// let formdata = new FormData();
// formdata.append("select", select);
getFun(this.tabs[this.active]['api'])
.then((res) => {
this.$toast.clear();
this.messageList =res.data||res.rows;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment