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

fix: 任务单 固有风险列表 添加固有风险表单 vant 增加新组件

parent 7a526d85
......@@ -935,11 +935,6 @@
"integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=",
"dev": true
},
"@popperjs/core": {
"version": "2.10.2",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.10.2.tgz",
"integrity": "sha512-IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHEQ=="
},
"@sindresorhus/is": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
......@@ -1090,17 +1085,14 @@
}
},
"@vant/icons": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.7.1.tgz",
"integrity": "sha512-66LPEq89w4kl258nALZcRNd14eUJC8VajvTJwvZKOaZawz6CUeVZ6ybhedTUhQhRjeA8SyWD7dFt4ALf33Sabw=="
"version": "1.8.0",
"resolved": "https://registry.npmmirror.com/@vant/icons/-/icons-1.8.0.tgz",
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
},
"@vant/popperjs": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.1.0.tgz",
"integrity": "sha512-8MD1gz146awV/uPxYjz4pet22f7a9YVKqk7T+gFkWFwT9mEcrIUEg/xPrdOnWKLP9puXyYtm7oVfSDSefZ/p/w==",
"requires": {
"@popperjs/core": "^2.9.2"
}
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.0.0",
......@@ -13722,9 +13714,9 @@
}
},
"vant": {
"version": "2.12.30",
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.30.tgz",
"integrity": "sha512-kvbG+X5ZdHxjWELalsoIP0T+LMAZZ/5ITVdETsvrQAycvcPISNK+0eO0wT+kVRLfwBMEvuljWSJGOWisDObJRA==",
"version": "2.12.54",
"resolved": "https://registry.npmmirror.com/vant/-/vant-2.12.54.tgz",
"integrity": "sha512-t7DCiLxNosDrg0Jm5EY9p0A5cAMo5OadmizbYtPEc0ru+OJKEa3kcfxtKIK5on7ZPqoOkyYJt8e6BQ1VDMPsrg==",
"requires": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
......@@ -15504,7 +15496,7 @@
},
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
},
"vue-loader": {
......
......@@ -40,7 +40,7 @@ export default {
'riskAdd'
],
// 不需要展示底部tabbar的页面
noTab:["login", "login2", "choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList'],
noTab:["login", "login2", 'addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList'],
// cachePage预先定义的缓存页面
otherCache: [],
// 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1687868599653" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1477" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M758.560512 68.191078 265.439488 68.191078c-54.490032 0-98.130971 44.134173-98.130971 98.624205l-0.493234 788.993638L512 807.872614l345.184717 147.936307L857.184717 166.815283C857.184717 112.325251 813.04952 68.191078 758.560512 68.191078z" p-id="1478" fill="#707070"></path></svg>
\ No newline at end of file
......@@ -7,7 +7,7 @@ import qs from 'qs';
import './permission'
import Cookies from 'js-cookie'
import util from './api/util.js'
import { Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem, PullRefresh, List, Tab, Tabs, GoodsAction, GoodsActionIcon, GoodsActionButton, SubmitBar, Toast ,Search,Picker,Uploader,Notify ,ContactList,Calendar,Radio,RadioGroup,Tag,Tabbar,TabbarItem,Sticky, Grid, GridItem,Skeleton,Col,Row, Image as VanImage, Badge,NoticeBar,DatetimePicker,
import {DropdownMenu, DropdownItem, Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem, PullRefresh, List, Tab, Tabs, GoodsAction, GoodsActionIcon, GoodsActionButton, SubmitBar, Toast ,Search,Picker,Uploader,Notify ,ContactList,Calendar,Radio,RadioGroup,Tag,Tabbar,TabbarItem,Sticky, Grid, GridItem,Skeleton,Col,Row, Image as VanImage, Badge,NoticeBar,DatetimePicker,
Step, Steps } from 'vant'
import 'lib-flexible/flexible'
import vueEsign from 'vue-esign'
......@@ -16,7 +16,8 @@ Vue.prototype.util = util
Vue.use(Divider).use(Popup).use(Overlay).use(Loading).use(Dialog).use(Toast).use(ContactCard).use(Form).use(AddressEdit).use(AddressList).use(Field).use(CellGroup).use(Cell).use(SwipeCell).use(Icon).use(Stepper).use(Card).use(Button).use(Swipe).use(SwipeItem).use(PullRefresh).use(List).use(Tab).use(Tabs).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(Search).use(Picker).use(Uploader).use(Notify)
.use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky)
.use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker).use(Step).use(Steps)
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
// 引用高德地图组件 main.js
import VueAMap from 'vue-amap'
Vue.use(VueAMap)
......
......@@ -138,12 +138,24 @@ const routes = [{
name: 'riskLedger',
component: () => import('../views/riskProject/ledger'),
},
//风险台账
//任务单
{
path: '/riskTaskList',
name: 'riskTaskList',
component: () => import('../views/riskProject/add/taskList.vue'),
},
//固有风险列表
{
path: '/riskInherent',
name: 'riskInherent',
component: () => import('../views/riskProject/add/inherentRisks.vue'),
},
//新增固有风险
{
path: '/addInherent',
name: 'addInherent',
component: () => import('../views/riskProject/add/addInherent.vue'),
},
]
const router = new VueRouter({
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-form
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<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"
label="创建人员"
placeholder="请输入"
:rules="[{ required: true, message: '创建人员不能为空' }]"
/>
<van-field
readonly
required
name="creatUnit"
:value="form.creatUnit"
label="创建单位"
placeholder="请输入"
:rules="[{ required: true, message: '创建单位不能为空' }]"
/>
<van-field
required
name="taskName"
:value="form.taskName"
label="任务名称"
placeholder="请输入"
:rules="[{ required: true, message: '任务名称不能为空' }]"
/>
<van-field
readonly
required
clickable
name="source"
:value="form.source"
label="关联项目"
placeholder="请选择"
@click="showSource = true"
:rules="[{ required: true, message: '关联项目不能为空' }]"
/>
<van-popup v-model="showSource" position="bottom">
<van-picker
show-toolbar
value-key="sourceName"
:columns="columnsSource"
@confirm="onConSource"
@cancel="showSource = false"
/>
</van-popup>
<van-field
readonly
required
name="taskName"
:value="form.taskName"
label="评估楼栋"
placeholder="请输入"
:rules="[{ required: true, message: '评估楼栋不能为空' }]"
/>
<van-field
readonly
required
clickable
name="trouble"
:value="form.trouble"
label="项目负责人"
placeholder="请选择"
@click="showTrouble = true"
: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"
required
name="location"
label="任务开始时间"
type="textarea"
maxlength="255"
rows="1"
autosize
placeholder="请输入"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
<van-field
v-model="form.endTime"
required
name="location"
label="任务结束时间"
type="textarea"
maxlength="255"
rows="1"
autosize
placeholder="请输入"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
<van-field
clickable
required
name="control"
:value="form.control"
label="执行人员"
placeholder="请选择"
@click="showControl = true"
:rules="[{ required: true, message: '执行人员不能为空' }]"
/>
<van-popup v-model="showControl" position="bottom">
<van-picker
show-toolbar
:columns="columnsControl"
@confirm="onConControl"
@cancel="showControl = false"
/>
</van-popup>
<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 name="hdPicture2" label="风险源图片" v-if="isTimely == 1">
<template #input>
<van-uploader
@delete="deleteFile(...arguments, 'changePicture')"
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="changePicture"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
</template>
</van-field>
<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
v-model="form.administration"
name="administration"
label="技术措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="administrationFile" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="administrationImg"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'administrationImg')"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
</template>
</van-field>
<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
v-model="form.administration"
name="administration"
label="管理措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="administrationFile" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="administrationImg"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'administrationImg')"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
</template>
</van-field>
<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
v-model="form.administration"
name="administration"
label="应急措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="administrationFile" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="administrationImg"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'administrationImg')"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
</template>
</van-field>
<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"
label="参考依据"
placeholder="请选择"
@click="showTrouble = true"
: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-popup v-model="show" position="bottom" :style="{ height: '100%' }">
<!-- <selectPeople @onClose="onClose" @onSave="onSave"></selectPeople> -->
</van-popup>
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit"
>上报</van-button
>
</div>
</van-form>
<div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import { getFun, postFun } from "@/service/table.js";
// import {
// getFormList,
// postHdSource,
// postHdType,
// postHdPeople,
// postReAdd,
// postriskConiCause,
// postRiskShowMeasures,
// } from "@/service/risk";
export default {
name: "risk-add",
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") {
}
next();
},
data() {
return {
taskId: "",
text: "添加固有风险",
id: "",
isTimely:1,
form:{
},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
projectDirector: "", // 所属工程
showProjectName: false,
show: false,
columnsProjectName: [],
factor: "", //风险因素
showFactor: false,
columnsFactor: [],
source: "", //风险源
showSource: false,
columnsSource: [],
trouble: "", //事故类型
showTrouble: false,
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: ["矩阵式定级", "其他定级方式"],
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: ["重大风险", "较大风险", "一般风险", "较小风险" ],
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
changePicture: [], // 定级方式图片
location: "", //风险部位
control: "", //管控层级
showControl: false,
columnsControl: ["项目级", "企业级"],
mainDutyDept: "", // 主责部门
mainDutyDeptId: "",
showMainDutyDept: false,
columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员
mainDutyPeopLeId: "",
showMainDutyPeopLe: false,
columnsMainDutyPeopLe: [],
technology: "", //技术措施文字
technologyImg: [], //技术措施图片
administration: "", //管理措施文字
administrationImg: [], //管理措施图片
urgent: "", //应急措施文字
urgentImg: [], //应急措施图片
returnCause: "", // 退回原因
isShowreturnCause: false,
};
},
created() {
if (this.$route.params.taskId) {
this.isShowreturnCause = true;
this.text = "风险上报退回";
this.taskId = this.$route.params.taskId;
this.postReturnEcho();
}
// this.getList();
},
methods: {
// 点击预览图
clickPre(e) {
console.log(e);
if (e.filePath) {
this.videoUrl = e.filePath;
} else {
this.videoUrl = e.content;
}
},
async deleteFile(val, detail, key) {
// console.log(val,detail)
if (val.fileId) {
let formdata = new FormData();
formdata.append("key", val["fileId"]);
let res = await postFun("/mobile/remove", formdata);
if (res) {
console.log(res);
this.$toast({
title: "提示",
message: "删除成功!",
});
} else {
console.log("删除失败");
this[key].splice(detail.index, 0, val);
}
}
},
onSubmit(values) {
let url = "/riskMain/add";
postReAdd(url, formdata)
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
this.$toast.clear();
},
// 请求表单数据
getList() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFormList("/riskMain/add")
.then((res) => {
this.$toast.clear();
this.columnsProjectName = res.data.projectInformations;
this.columnsFactor = res.data.riskInventories;
this.columnsMainDutyDept = res.data.organizationList;
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
// 请求已退回详情数据
postReturnEcho() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
postriskConiCause(`/riskMain/edit/${this.taskId}`)
.then((res) => {
console.log('%c [ res ]-332', 'font-size:13px; background:pink; color:#bf2c9f;', res)
})
.catch(() => {
this.$toast.clear();
});
},
// 所属项目
onConProjectName(value) {
if (!value) {
this.showProjectName = false;
return;
}
this.projectId = value.id;
this.projectName = value.projectName;
this.showProjectName = false;
},
// 风险因素
onConFactor(value) {
if (!value) {
this.showFactor = false;
return;
}
this.factor = value.factorType;
this.showFactor = false;
this.source = "";
this.trouble = "";
// 请求风险源
postHdSource(`/riskMain/showSourceName?factorType=${this.factor}`).then(
(res) => {
this.columnsSource = res.data;
}
);
},
// 风险源
onConSource(value) {
if (!value) {
this.showSource = false;
return;
}
this.source = value.sourceName;
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.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) {
this.showSetRank = false;
this.setRank = value;
this.riskRank = "";
if (this.setRank == "矩阵式定级") {
this.showSetRank = false;
this.$router.push({
name: "matrix-grad",
});
}
},
// 自己定义风险等级点击方法
myRiskRank() {
if (this.setRank == "") {
this.$toast("请先选择风险定级");
} else if (this.setRank == "其他定级方式") {
this.showRiskRank = true;
}
},
// 风险等级
onConRiskRank(value) {
this.riskRank = value;
this.showRiskRank = false;
},
// 管控层级
onConControl(value) {
this.control = value;
this.showControl = false;
},
// 主责部门
onConMainDutyDept(value) {
this.mainDutyDeptId = value.deptId;
this.mainDutyDept = value.deptName;
this.showMainDutyDept = false;
this.mainDutyPeopLe = "";
// 请求主责人员
let formdata = new FormData();
formdata.append("organizationId", this.mainDutyDeptId);
postHdPeople(`/riskMain/getUserList`, formdata).then((res) => {
this.columnsMainDutyPeopLe = res.data;
});
},
// 主责人员
onConMainDutyPeopLe(value) {
this.mainDutyPeopLeId = value.userId;
this.mainDutyPeopLe = value.userName;
this.showMainDutyPeopLe = false;
},
cancel() {
this.$router.go(-1);
},
// 选择作业人
goSelPeoTwo(val) {
this.peopleName=val
this.show = true;
},
onClose() {
this.show = false;
},
onSave(e) {
this.projectDirector=e[0].loginName
this.projectDirectorName=e[0].userName
this.show = false;
},
},
watch: {
// setRank(newVal, oldVal) {
// if (newVal == "其他定级方式") {
// this.showSetRankMode = true;
// } else {
// this.showSetRankMode = false;
// }
// },
},
};
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>
<template>
<!-- 提交 -->
<div>
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<div style="margin-bottom: 1.5rem;">
<van-tabs
v-model="active"
@change="postList(searchValue);showIndex = null;"
color="#2980f7"
animated
>
<van-tab v-for="index in 8" :title="index + '号楼'" :key="index">
<van-dropdown-menu z-index="1000">
<van-dropdown-item v-model="value1" :options="option1" get-container="body"/>
<van-dropdown-item v-model="value2" :options="option2" get-container="body"/>
</van-dropdown-menu>
<div
class="con-list"
@touchmove="showIndex = null"
>
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@click="touchstart(index, item)"
>
<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>
<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>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
name:'risk-confirme',
components: {
LHeader,
},
data() {
return {
text: "固有风险列表",
searchValue: "",
value1: 0,
value2: 'a',
option1: [
{ text: '楼层', value: 0 },
{ text: '新款商品', value: 1 },
{ text: '活动商品', value: 2 },
],
option2: [
{ text: '房间', value: 'a' },
{ text: '好评排序', value: 'b' },
{ text: '销量排序', value: 'c' },
],
isHaveNews: false,
messageList: [
{
title:'回显风险源名称',
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:'审批负责人'
},
],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
form:{
},
tabs: [
],
};
},
created() {
// this.postList();s
},
methods: {
performTasks(){
this.$router.push({
name: "addInherent",
params: {
title:'新增'
},
})
},
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
},
postList(select = "") {
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)
.then((res) => {
this.$toast.clear();
this.messageList =res.data||res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
onSearch(val) {
this.postList(this.searchValue);
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.showIndex = index;
},
// 详情
goDetail(data) {
this.$router.push({
name: "risk-big-detail",
params: {
id: data.businessId||data.id,
},
});
this.showIndex = null;
},
// 确认
goConfirm(data) {
this.$router.push({
name: "risk-affirm",
params: {
data: data,
},
});
this.showIndex = null;
},
},
};
</script>
<style lang="less" scoped>
#app {
font-family: "";
color: #2c3e50
}
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
.con-list {
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>
\ No newline at end of file
......@@ -4,13 +4,14 @@
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<van-grid :column-num="3">
<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">
<div>发起人员:</div>
<div>李小明</div>
</van-grid-item>
</van-grid>
<van-steps :active="active" active-icon="success" active-color="#38f">
<van-steps :active="active" active-icon="success" active-color="#38f" style="margin: 0.26rem 0;">
<van-step>任务发起</van-step>
<van-step>风险评估</van-step>
<van-step>评估审核</van-step>
......@@ -20,7 +21,7 @@
animated
:sticky="true"
offset-top="2.93rem">
<van-tab title="标签 1">
<van-tab title="任务详情">
<van-form
:scroll-to-error="true"
:show-error="false"
......@@ -107,11 +108,107 @@
/>
</van-form>
</van-tab>
<van-tab title="标签 2">内容 2</van-tab>
<van-tab title="标签 3">内容 3</van-tab>
<van-tab title="标签 4">内容 4</van-tab>
<van-tab title="风险清单">
</van-tab>
<van-tab title="审核记录">
<div class="journal-wrap">
<van-cell-group inset >
<van-steps direction="vertical" :active="99999" v-if="riskLogList.length>0">
<van-step v-for="(item, index) in riskLogList" :key="index">
<div class="step-wrap">
<van-row>
<van-col span="24"
><div class="info-title">{{item.startTime}}</div></van-col
>
</van-row>
<van-row>
<van-col span="7"
><span class="field-title">操作人:</span></van-col
>
<van-col span="17">{{item.approvalUserName}}</van-col>
</van-row>
<van-row>
<van-col span="7"
><span class="field-title">审批结果:</span></van-col
>
<van-col span="17">{{item.completedTime}}</van-col>
</van-row>
<van-row>
<van-col span="7"
><span class="field-title">岗位:</span></van-col
>
<van-col span="17">{{item.taskName}}</van-col>
</van-row>
<!-- <van-row>
<van-col span="7"
><span class="field-title">结果:</span></van-col
>
<van-col span="17">{{LogType(item.taskResult)}}</van-col>
</van-row> -->
</div>
</van-step>
</van-steps>
<div style="text-align: center;" v-if="riskLogList.length == 0">暂无数据</div>
</van-cell-group>
</div>
</van-tab>
<van-tab title="风险评估报告">
<div style="height: 1.5rem;
background-color: #fff;
border-bottom: 1px solid #97999a;
display: flex;
justify-content: space-between;
line-height: 1.5rem;
">
<div><van-icon name="column" size="26px"/></div>
<div style="flex-grow:1;line-height: 0.6rem">
<div>风险评估报告.PDF</div>
<div>2019-3-21 10:23 100KB</div>
</div>
<div>
<van-icon name="arrow" size="26px"/>
</div>
</div>
<div style="height: 1.5rem;
background-color: #fff;
border-bottom: 1px solid #97999a;
display: flex;
justify-content: space-between;
line-height: 1.5rem;
">
<div><van-icon name="column" size="26px"/></div>
<div style="flex-grow:1;line-height: 0.6rem">
<div>风险评估报告.PDF</div>
<div>2019-3-21 10:23 100KB</div>
</div>
<div>
<van-icon name="arrow" size="26px"/>
</div>
</div>
</van-tab>
</van-tabs>
</div>
<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 style="color: #ec808d;font-size: 14px;font-weight: 600;">
<div style="font-size: 22px;"><van-icon name="success" /></div>
<div>任务完成</div>
</div>
</div>
</div>
</template>
<script>
......@@ -135,6 +232,20 @@
state:1
}
],
riskLogList:[
{
completedTime:'审批通过',
startTime:'2022-12-12',
approvalUserName:'Mr.周',
taskName:'审批负责人'
},
{
completedTime:'审批通过',
startTime:'2022-12-12',
approvalUserName:'Mr.周',
taskName:'审批负责人'
},
],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
......@@ -149,6 +260,14 @@
// this.postList();s
},
methods: {
performTasks(){
this.$router.push({
name: "riskInherent",
params: {
title:'新增'
},
})
},
handadd(){
this.$router.push({
name: "riskAdd",
......@@ -191,7 +310,6 @@
}
this.showIndex = index;
},
// 详情
goDetail(data) {
this.$router.push({
......@@ -221,6 +339,48 @@
font-family: "";
color: #2c3e50
}
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
</style>
\ No newline at end of file
......@@ -8,7 +8,7 @@ module.exports = {
//以上的ip和端口是我们本机的;下面为需要跨域的
proxy: { //配置跨域
'/dev-api': {
target: 'http://192.168.10.137:8080/', //这里是后台的地址
target: 'http://192.168.4.232:8080/', //这里是后台的地址
ws: true,
changOrigin: true, //允许跨域
// logLevel: 'debug', // 显示代理调试信息
......
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