Merge branch 'dev_xd' of http://62.234.3.186:3000/jiangyq/YZProjectCloud into dev_xd
commit
f3735dbced
|
@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
import com.yanzhu.common.core.annotation.Excel;
|
||||
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 隐患流程信息对象 smz_ssp_auditinfo
|
||||
*
|
||||
|
@ -38,7 +40,26 @@ public class SmzSspAuditinfo extends BaseEntity
|
|||
@Excel(name = "创建人")
|
||||
private String createUser;
|
||||
|
||||
public void setId(Long id)
|
||||
private String images;
|
||||
private List<SmzSspFileinfo> files;
|
||||
|
||||
public List<SmzSspFileinfo> getFiles() {
|
||||
return files;
|
||||
}
|
||||
|
||||
public void setFiles(List<SmzSspFileinfo> files) {
|
||||
this.files = files;
|
||||
}
|
||||
|
||||
public String getImages() {
|
||||
return images;
|
||||
}
|
||||
|
||||
public void setImages(String images) {
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="isDel" column="isDel" />
|
||||
<result property="createUser" column="createUser" />
|
||||
<result property="createTime" column="createTime" />
|
||||
<collection property="files" ofType="com.yanzhu.manage.domain.SmzSspFileinfo">
|
||||
<id property="id" column="fileId"/>
|
||||
<result property="fileUrl" column="fileUrl"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSmzSspAuditinfoVo">
|
||||
|
@ -19,7 +23,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</sql>
|
||||
|
||||
<select id="selectSmzSspAuditinfoList" parameterType="SmzSspAuditinfo" resultMap="SmzSspAuditinfoResult">
|
||||
<include refid="selectSmzSspAuditinfoVo"/>
|
||||
select a.id, a.mainId, a.processState, a.opinion, a.isDel, a.createUser, a.createTime,b.id fileId,b.fileUrl
|
||||
from smz_ssp_auditinfo a
|
||||
left join smz_ssp_fileinfo b on a.id=b.auditId
|
||||
<where>
|
||||
<if test="mainId != null "> and mainId = #{mainId}</if>
|
||||
<if test="processState != null and processState != ''"> and processState = #{processState}</if>
|
||||
|
@ -28,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createUser != null and createUser != ''"> and createUser = #{createUser}</if>
|
||||
<if test="createTime != null "> and createTime = #{createTime}</if>
|
||||
</where>
|
||||
order by createTime desc
|
||||
</select>
|
||||
|
||||
<select id="selectSmzSspAuditinfoById" parameterType="Long" resultMap="SmzSspAuditinfoResult">
|
||||
|
|
|
@ -294,7 +294,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
a.problemArea,
|
||||
a.workParts,
|
||||
a.changeInfo,
|
||||
CONCAT(a.lordSentUser ,'【',b.sub_dept_name,'】',b.user_phone) as lordSent,
|
||||
a.lordSent,
|
||||
CONCAT(a.lordSentUser ,'【',b.sub_dept_name,'】',b.user_phone) as lordSentUser,
|
||||
a.lordSentUser,
|
||||
a.copySend,
|
||||
a.copySendUser,
|
||||
|
@ -310,11 +311,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
a.smark_url,
|
||||
a.isDel,
|
||||
CONCAT(c.nick_name,'【',c.phonenumber,'】') as createUser,
|
||||
a.createUser as updateUser,
|
||||
a.createTime,
|
||||
a.updateUser,
|
||||
a.updateTime,
|
||||
a.danger_type,
|
||||
CONCAT(a.recheckSendUser ,'【',d.sub_dept_name,'】',d.user_phone) as recheckSend,
|
||||
a.recheckSend,
|
||||
CONCAT(a.recheckSendUser ,'【',d.sub_dept_name,'】',d.user_phone) as recheckSendUser,
|
||||
a.recheckSendUser,
|
||||
a.roleType,
|
||||
a.problemType
|
||||
|
|
|
@ -1,8 +1,18 @@
|
|||
package com.yanzhu.manage.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import com.yanzhu.common.core.utils.StringUtils;
|
||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||
import com.yanzhu.manage.domain.SmzSspFileinfo;
|
||||
import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
||||
import com.yanzhu.manage.mapper.SmzSspFileinfoMapper;
|
||||
import com.yanzhu.manage.mapper.SmzSspProblemmodifyMapper;
|
||||
import com.yanzhu.system.api.domain.SysUser;
|
||||
import com.yanzhu.system.api.model.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.manage.mapper.SmzSspAuditinfoMapper;
|
||||
|
@ -21,6 +31,11 @@ public class SmzSspAuditinfoServiceImpl implements ISmzSspAuditinfoService
|
|||
@Autowired
|
||||
private SmzSspAuditinfoMapper smzSspAuditinfoMapper;
|
||||
|
||||
@Autowired
|
||||
private SmzSspFileinfoMapper fileinfoMapper;
|
||||
|
||||
@Autowired
|
||||
private SmzSspProblemmodifyMapper problemmodifyMapper;
|
||||
/**
|
||||
* 查询隐患流程信息
|
||||
*
|
||||
|
@ -54,8 +69,39 @@ public class SmzSspAuditinfoServiceImpl implements ISmzSspAuditinfoService
|
|||
@Override
|
||||
public int insertSmzSspAuditinfo(SmzSspAuditinfo smzSspAuditinfo)
|
||||
{
|
||||
LoginUser loginUser= SecurityUtils.getLoginUser();
|
||||
SysUser sysUser=loginUser.getSysUser();
|
||||
smzSspAuditinfo.setCreateTime(DateUtils.getNowDate());
|
||||
return smzSspAuditinfoMapper.insertSmzSspAuditinfo(smzSspAuditinfo);
|
||||
smzSspAuditinfo.setCreateUser(sysUser.getUserName());
|
||||
int result= smzSspAuditinfoMapper.insertSmzSspAuditinfo(smzSspAuditinfo);
|
||||
//上传图片
|
||||
String images=smzSspAuditinfo.getImages();
|
||||
if(StringUtils.isNotEmpty(images)){
|
||||
Arrays.stream(images.split(",")).forEach(img->{
|
||||
SmzSspFileinfo file=new SmzSspFileinfo();
|
||||
file.setFileType(0L);
|
||||
file.setAuditId(smzSspAuditinfo.getId());
|
||||
file.setFileUrl(img);
|
||||
file.setCreateUser(sysUser.getUserName());
|
||||
file.setCreateTime(DateUtils.getNowDate());
|
||||
fileinfoMapper.insertSmzSspFileinfo(file);
|
||||
});
|
||||
}
|
||||
//修改安全隐患的状态
|
||||
SmzSspProblemmodify problemmodify=new SmzSspProblemmodify();
|
||||
problemmodify.setId(smzSspAuditinfo.getMainId());
|
||||
//(0待审,1通过,2驳回)
|
||||
//(0待整改,1待复检,2复检驳回,3复检通过)
|
||||
if("0".equals(smzSspAuditinfo.getProcessState())){
|
||||
problemmodify.setCheckState(1L);
|
||||
}else if("1".equals(smzSspAuditinfo.getProcessState())){
|
||||
problemmodify.setCheckState(3L);
|
||||
}else{
|
||||
problemmodify.setCheckState(2L);
|
||||
}
|
||||
|
||||
problemmodifyMapper.updateSmzSspProblemmodify(problemmodify);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询隐患流程信息列表
|
||||
export function listAuditinfo(query) {
|
||||
return request({
|
||||
url: '/trouble/auditinfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
url: "/manage/auditinfo/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询隐患流程信息详细
|
||||
export function getAuditinfo(id) {
|
||||
return request({
|
||||
url: '/trouble/auditinfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
url: "/manage/auditinfo/" + id,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增隐患流程信息
|
||||
export function addAuditinfo(data) {
|
||||
return request({
|
||||
url: '/trouble/auditinfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
url: "/manage/auditinfo",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改隐患流程信息
|
||||
export function updateAuditinfo(data) {
|
||||
return request({
|
||||
url: '/trouble/auditinfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
url: "/manage/auditinfo",
|
||||
method: "put",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除隐患流程信息
|
||||
export function delAuditinfo(id) {
|
||||
return request({
|
||||
url: '/trouble/auditinfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
url: "/manage/auditinfo/" + id,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<template>
|
||||
<el-dialog :title="title" v-model="show" width="800px" append-to-body class="baidu-map-dialog"
|
||||
:close-on-click-modal="false" :close-on-press-escape="false" >
|
||||
<div class="div-info">
|
||||
<div>经度纬度:{{point?(point.lng.toFixed(5)+","+point.lat.toFixed(5)):'' }}</div>
|
||||
<div>详细地址:{{ getAddress() }}</div>
|
||||
<div style="margin-top: 10px;text-align: center;" v-if="getAddress()">
|
||||
<el-button size="small" type="primary" @click="doOk">确定</el-button>
|
||||
<el-dialog :title="title" v-model="show" width="800px" append-to-body class="baidu-map-dialog"
|
||||
:close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<div class="div-info">
|
||||
<div>经度纬度:{{ point ? (point.lng.toFixed(5) + "," + point.lat.toFixed(5)) : '' }}</div>
|
||||
<div>详细地址:{{ getAddress() }}</div>
|
||||
<div style="margin-top: 10px;text-align: center;" v-if="getAddress()">
|
||||
<el-button size="small" type="primary" @click="doOk">确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="index-map" style="width: 100%;height:600px;"></div>
|
||||
</el-dialog>
|
||||
<div id="index-map" style="width: 100%;height:600px;"></div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
@ -21,44 +21,44 @@ const cityInfo = ref("");
|
|||
|
||||
const emit = defineEmits(["docom"]);
|
||||
|
||||
function getCity(data,cb){
|
||||
let myPoint = new BMapGL.Point(+data.longitude,+data.latitude);
|
||||
let myGeo = new BMapGL.Geocoder({extensions_town: true});
|
||||
myGeo.getLocation(myPoint,r=>{
|
||||
let cityInfo={
|
||||
address:r.content?.address||'',
|
||||
poi_desc:r.content?.poi_desc||'',
|
||||
district:r.content?.address_detail?.district||'',
|
||||
city:r.content?.address_detail?.city||'',
|
||||
province:r.content?.address_detail?.province||''
|
||||
}
|
||||
cb && cb(myPoint,cityInfo);
|
||||
function getCity(data, cb) {
|
||||
let myPoint = new BMapGL.Point(+data.longitude, +data.latitude);
|
||||
let myGeo = new BMapGL.Geocoder({ extensions_town: true });
|
||||
myGeo.getLocation(myPoint, r => {
|
||||
let cityInfo = {
|
||||
address: r.content?.address || '',
|
||||
poi_desc: r.content?.poi_desc || '',
|
||||
district: r.content?.address_detail?.district || '',
|
||||
city: r.content?.address_detail?.city || '',
|
||||
province: r.content?.address_detail?.province || ''
|
||||
}
|
||||
cb && cb(myPoint, cityInfo);
|
||||
});
|
||||
}
|
||||
|
||||
function doOk(){
|
||||
emit("docom",point.value,cityInfo.value);
|
||||
show.value=false;
|
||||
function doOk() {
|
||||
emit("docom", point.value, cityInfo.value);
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
function getAddress(){
|
||||
let addr=cityInfo.value?.address||'';
|
||||
function getAddress() {
|
||||
let addr = cityInfo.value?.address || '';
|
||||
return addr;
|
||||
}
|
||||
|
||||
function showDlg(opt){
|
||||
title.value=opt?.title||'选择地址';
|
||||
show.value=true;
|
||||
setTimeout(()=>{
|
||||
initMap(opt);
|
||||
},400);
|
||||
function showDlg(opt) {
|
||||
title.value = opt?.title || '选择地址';
|
||||
show.value = true;
|
||||
setTimeout(() => {
|
||||
initMap(opt);
|
||||
}, 400);
|
||||
}
|
||||
|
||||
function currentPoint(){
|
||||
let geolocation = new BMapGL.Geolocation();
|
||||
function currentPoint() {
|
||||
let geolocation = new BMapGL.Geolocation();
|
||||
geolocation.enableSDKLocation();
|
||||
geolocation.getCurrentPosition(e=>{
|
||||
if(e.point){
|
||||
geolocation.getCurrentPosition(e => {
|
||||
if (e.point) {
|
||||
let point = e.point
|
||||
let initMarker = new BMapGL.Marker(point);
|
||||
map.value.centerAndZoom(point, 18);
|
||||
|
@ -67,36 +67,36 @@ function currentPoint(){
|
|||
})
|
||||
}
|
||||
|
||||
function mapClick(e){
|
||||
point.value=e.latlng;
|
||||
let myGeo = new BMapGL.Geocoder({extensions_town: true});
|
||||
myGeo.getLocation(e.latlng,r=>{
|
||||
if(r){
|
||||
cityInfo.value={
|
||||
address:r.content?.address||'',
|
||||
poi_desc:r.content?.poi_desc||'',
|
||||
district:r.content?.address_detail?.district||'',
|
||||
city:r.content?.address_detail?.city||'',
|
||||
province:r.content?.address_detail?.province||''
|
||||
function mapClick(e) {
|
||||
point.value = e.latlng;
|
||||
let myGeo = new BMapGL.Geocoder({ extensions_town: true });
|
||||
myGeo.getLocation(e.latlng, r => {
|
||||
if (r) {
|
||||
cityInfo.value = {
|
||||
address: r.content?.address || '',
|
||||
poi_desc: r.content?.poi_desc || '',
|
||||
district: r.content?.address_detail?.district || '',
|
||||
city: r.content?.address_detail?.city || '',
|
||||
province: r.content?.address_detail?.province || ''
|
||||
}
|
||||
}else{
|
||||
cityInfo.value={}
|
||||
} else {
|
||||
cityInfo.value = {}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function initMap(opt) {
|
||||
function initMap(opt) {
|
||||
let imap = new BMapGL.Map("index-map");
|
||||
|
||||
|
||||
map.value = imap;
|
||||
let point = new BMapGL.Point(116.404, 39.915);
|
||||
//初始化地图,设置中心点坐标和地图级别
|
||||
map.value.centerAndZoom(point, 15);
|
||||
map.value.setDefaultCursor("crosshair");//设置地图默认的鼠标指针样式
|
||||
map.value.enableScrollWheelZoom();//启用滚轮放大缩小,默认禁用。
|
||||
|
||||
|
||||
//创建点坐标
|
||||
|
||||
|
||||
//创建标注
|
||||
let initMarker = new BMapGL.Marker(point);
|
||||
//向地图中添加单个覆盖物时会触发此事件
|
||||
|
@ -104,17 +104,16 @@ function initMap(opt) {
|
|||
//开启标注拖拽功能
|
||||
//initMarker.enableDragging();
|
||||
//将标注点移动到中心位置
|
||||
|
||||
|
||||
|
||||
//添加地图默认控件
|
||||
map.value.addControl(new BMapGL.NavigationControl());
|
||||
//开启鼠标滚轮缩放
|
||||
map.value.addEventListener("click",mapClick);
|
||||
map.value.addEventListener("click", mapClick);
|
||||
var myGeo = new BMapGL.Geocoder();
|
||||
// 将地址解析结果显示在地图上,并调整地图视野
|
||||
myGeo.getPoint('经河新城', function (point) {
|
||||
if (point) {
|
||||
console.log("--->",point)
|
||||
map.value.centerAndZoom(point, 16);
|
||||
map.value.addOverlay(new BMapGL.Marker(point, { title: '经河新城' }))
|
||||
map.value.enableScrollWheelZoom(true);
|
||||
|
@ -127,41 +126,42 @@ function initMap(opt) {
|
|||
}, '陕西省')
|
||||
currentPoint();
|
||||
}
|
||||
function initMapData(data){
|
||||
if(data.latitude && data.longitude){
|
||||
point.value={}
|
||||
point.value.lng=data.longitude*1.0;
|
||||
point.value.lat=data.latitude*1.0;
|
||||
function initMapData(data) {
|
||||
if (data.latitude && data.longitude) {
|
||||
point.value = {}
|
||||
point.value.lng = data.longitude * 1.0;
|
||||
point.value.lat = data.latitude * 1.0;
|
||||
}
|
||||
cityInfo.value={}
|
||||
cityInfo.value.address=data.projectAddress||''
|
||||
cityInfo.value.district=data.district||''
|
||||
cityInfo.value.city=data.city||''
|
||||
cityInfo.value.province=data.province||''
|
||||
cityInfo.value = {}
|
||||
cityInfo.value.address = data.projectAddress || ''
|
||||
cityInfo.value.district = data.district || ''
|
||||
cityInfo.value.city = data.city || ''
|
||||
cityInfo.value.province = data.province || ''
|
||||
}
|
||||
|
||||
/** 暴露组件 */
|
||||
defineExpose({
|
||||
showDlg,
|
||||
initMapData
|
||||
showDlg,
|
||||
initMapData
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
.baidu-map-dialog{
|
||||
.el-dialog__body{
|
||||
<style lang="scss">
|
||||
.baidu-map-dialog {
|
||||
.el-dialog__body {
|
||||
position: relative;
|
||||
padding: 0px;
|
||||
.div-info{
|
||||
|
||||
.div-info {
|
||||
position: absolute;
|
||||
top:0px;
|
||||
top: 0px;
|
||||
right: 10px;
|
||||
width:300px;
|
||||
width: 300px;
|
||||
font-size: 12px;
|
||||
background: rgba(255,255,255,0.5);
|
||||
box-shadow: 6px 6px 6px rgba(0,0,0,0.2);
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.2);
|
||||
z-index: 99999;
|
||||
padding: 8px;
|
||||
border:solid 1px #ccc;
|
||||
border: solid 1px #ccc;
|
||||
color: #51b5ff;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container"
|
||||
@toggleClick="toggleSideBar" />
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" />
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="appStore.device !== 'mobile'">
|
||||
<el-tag class="cur-comp" v-if="data.comName">当前租户:{{ data.comName }}</el-tag>
|
||||
<current-project id="current-project" class="right-menu-item"/>
|
||||
<current-project id="current-project" class="right-menu-item" />
|
||||
|
||||
<header-search id="header-search" class="right-menu-item" />
|
||||
|
||||
|
@ -58,8 +59,8 @@ import useSettingsStore from '@/store/modules/settings'
|
|||
const appStore = useAppStore()
|
||||
const userStore = useUserStore()
|
||||
const settingsStore = useSettingsStore()
|
||||
const data=reactive({
|
||||
comName:'',
|
||||
const data = reactive({
|
||||
comName: '',
|
||||
})
|
||||
function toggleSideBar() {
|
||||
appStore.toggleSideBar();
|
||||
|
@ -95,8 +96,7 @@ const emits = defineEmits(['setLayout'])
|
|||
function setLayout() {
|
||||
emits('setLayout');
|
||||
}
|
||||
data.comName=userStore.currentComName
|
||||
console.log("---->",userStore)
|
||||
data.comName = userStore.currentComName
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
|
@ -107,12 +107,13 @@ console.log("---->",userStore)
|
|||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
|
||||
.cur-comp{
|
||||
.cur-comp {
|
||||
position: relative;
|
||||
top: 11px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
|
|
|
@ -1,79 +1,90 @@
|
|||
import { login, logout, getInfo } from '@/api/login'
|
||||
import { findMyTasks } from '@/api/flowable/businessKey'
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||
import defAva from '@/assets/images/profile.jpg'
|
||||
import { login, logout, getInfo } from "@/api/login";
|
||||
import { findMyTasks } from "@/api/flowable/businessKey";
|
||||
import { getToken, setToken, removeToken } from "@/utils/auth";
|
||||
import defAva from "@/assets/images/profile.jpg";
|
||||
|
||||
const useUserStore = defineStore(
|
||||
'user',
|
||||
{
|
||||
state: () => ({
|
||||
token: getToken(),
|
||||
uid: '',
|
||||
name: '',
|
||||
nickName: '',
|
||||
avatar: '',
|
||||
compInfo:{},
|
||||
roles: [],
|
||||
permissions: [],
|
||||
currentComId: null,
|
||||
currentComName: null,
|
||||
currentPrjId: null,
|
||||
currentProName: null,
|
||||
}),
|
||||
actions: {
|
||||
// 登录
|
||||
login(userInfo) {
|
||||
const username = userInfo.username.trim()
|
||||
const password = userInfo.password
|
||||
const code = userInfo.code
|
||||
const uuid = userInfo.uuid
|
||||
return new Promise((resolve, reject) => {
|
||||
login(username, password, code, uuid).then(res => {
|
||||
let data = res.data
|
||||
setToken(data.access_token)
|
||||
this.token = data.access_token
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
const useUserStore = defineStore("user", {
|
||||
state: () => ({
|
||||
token: getToken(),
|
||||
uid: "",
|
||||
name: "",
|
||||
nickName: "",
|
||||
avatar: "",
|
||||
compInfo: {},
|
||||
roles: [],
|
||||
permissions: [],
|
||||
currentComId: null,
|
||||
currentComName: null,
|
||||
currentPrjId: null,
|
||||
currentProName: null,
|
||||
isAdmin: false,
|
||||
}),
|
||||
actions: {
|
||||
// 登录
|
||||
login(userInfo) {
|
||||
const username = userInfo.username.trim();
|
||||
const password = userInfo.password;
|
||||
const code = userInfo.code;
|
||||
const uuid = userInfo.uuid;
|
||||
return new Promise((resolve, reject) => {
|
||||
login(username, password, code, uuid)
|
||||
.then((res) => {
|
||||
let data = res.data;
|
||||
setToken(data.access_token);
|
||||
this.token = data.access_token;
|
||||
resolve();
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取用户信息
|
||||
getInfo() {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo().then(res => {
|
||||
const user = res.user
|
||||
const avatar = (user.avatar == "" || user.avatar == null) ? defAva : user.avatar;
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取用户信息
|
||||
getInfo() {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo()
|
||||
.then((res) => {
|
||||
const user = res.user;
|
||||
const avatar =
|
||||
user.avatar == "" || user.avatar == null ? defAva : user.avatar;
|
||||
|
||||
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||
this.roles = res.roles
|
||||
this.permissions = res.permissions
|
||||
if (res.roles && res.roles.length > 0) {
|
||||
// 验证返回的roles是否是一个非空数组
|
||||
this.roles = res.roles;
|
||||
this.permissions = res.permissions;
|
||||
} else {
|
||||
this.roles = ['ROLE_DEFAULT']
|
||||
this.roles = ["ROLE_DEFAULT"];
|
||||
}
|
||||
this.uid = user.userId;
|
||||
this.name = user.userName;
|
||||
this.nickName = user.nickName;
|
||||
this.compInfo=user.comp;
|
||||
this.compInfo = user.comp;
|
||||
this.avatar = avatar;
|
||||
this.currentComId = user.activeComId;
|
||||
this.currentComName = user.activeComName;
|
||||
this.currentPrjId = user.activeProjectId;
|
||||
this.currentProName = user.activeProjectName;
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
this.isAdmin = user.roles.some(
|
||||
(item) =>
|
||||
item.roleKey.includes("admin") ||
|
||||
item.roleKey.includes("gsAdmin")
|
||||
);
|
||||
resolve(res);
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取用户代办
|
||||
getTasks(){
|
||||
return new Promise((resolve, reject) => {
|
||||
findMyTasks().then(response => {
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取用户代办
|
||||
getTasks() {
|
||||
return new Promise((resolve, reject) => {
|
||||
findMyTasks()
|
||||
.then((response) => {
|
||||
let todos = document.querySelectorAll(".tips_Todo");
|
||||
let tasks = document.querySelectorAll(".tips_Task");
|
||||
if (todos.length > 0) {
|
||||
todos.forEach(el => {
|
||||
todos.forEach((el) => {
|
||||
el.innerHTML = response.data.todo;
|
||||
if (response.data.todo > 0) {
|
||||
el.style.display = "inline";
|
||||
|
@ -83,7 +94,7 @@ const useUserStore = defineStore(
|
|||
});
|
||||
}
|
||||
if (tasks.length > 0) {
|
||||
tasks.forEach(el => {
|
||||
tasks.forEach((el) => {
|
||||
el.innerHTML = response.data.todo;
|
||||
if (response.data.todo > 0) {
|
||||
el.style.display = "inline";
|
||||
|
@ -92,27 +103,30 @@ const useUserStore = defineStore(
|
|||
}
|
||||
});
|
||||
}
|
||||
resolve(response)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
resolve(response);
|
||||
})
|
||||
})
|
||||
},
|
||||
// 退出系统
|
||||
logOut() {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(this.token).then(() => {
|
||||
this.token = ''
|
||||
this.roles = []
|
||||
this.permissions = []
|
||||
removeToken()
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 退出系统
|
||||
logOut() {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(this.token)
|
||||
.then(() => {
|
||||
this.token = "";
|
||||
this.roles = [];
|
||||
this.permissions = [];
|
||||
removeToken();
|
||||
resolve();
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default useUserStore
|
||||
export default useUserStore;
|
||||
|
|
|
@ -3,47 +3,87 @@
|
|||
:append-to-body="true" title="安全隐患详情" class="problemmodify-detail-drawer">
|
||||
<el-row v-if="data && data.row" style="padding:20px;">
|
||||
<el-col :span="10" class="detail-left">
|
||||
<el-steps style="max-width: 600px" :active="1" finish-status="success" simple>
|
||||
<el-steps style="max-width: 600px" :active="data.stepActive" finish-status="success" simple>
|
||||
<el-step title="待整改" />
|
||||
<el-step title="待复检" />
|
||||
<el-step title="复检驳回" />
|
||||
<el-step title="复检驳回" v-if="!data.simple" />
|
||||
<el-step title="复检通过" />
|
||||
</el-steps>
|
||||
<div class="step-list">
|
||||
<div v-for="(it, idx) in data.auditinfoList" :key="idx">
|
||||
<div class="step-header" :class="data.row.checkState >= 0 ? 'is-active' : ''">
|
||||
<el-icon>
|
||||
<SuccessFilled />
|
||||
</el-icon>
|
||||
{{ it.index }}.
|
||||
<span v-if="it.processState == 0">整改处理</span>
|
||||
<span v-if="it.processState == 1">复检通过</span>
|
||||
<span v-if="it.processState == 2">复检驳回</span>
|
||||
</div>
|
||||
<el-card>
|
||||
<table border class="step-table">
|
||||
<tr>
|
||||
<td width="40%"><el-icon>
|
||||
<User />
|
||||
</el-icon>
|
||||
<span v-if="it.processState == 0">整改说明</span>
|
||||
<span v-if="it.processState == 1">复检意见</span>
|
||||
<span v-if="it.processState == 2">驳回意见</span>
|
||||
|
||||
<div class="step-header" :class="data.row.checkState >= 0 ? 'is-active' : ''">
|
||||
<el-icon>
|
||||
<SuccessFilled />
|
||||
</el-icon>
|
||||
01.待整改
|
||||
</td>
|
||||
<td>{{ it.opinion }}</td>
|
||||
</tr>
|
||||
<tr v-if="it.processState == 0">
|
||||
<td><el-icon>
|
||||
<Picture />
|
||||
</el-icon>整改图片</td>
|
||||
<td>
|
||||
<div class="step-img"><el-image :src="file.fileUrl"
|
||||
v-for="(file, index) in it.files" :key="index"
|
||||
:preview-teleported="true"
|
||||
:preview-src-list="[file.fileUrl]"></el-image></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<div class="step-header" :class="data.row.checkState >= 0 ? 'is-active' : ''">
|
||||
<el-icon>
|
||||
<SuccessFilled />
|
||||
</el-icon>
|
||||
01.待整改
|
||||
</div>
|
||||
<el-card>
|
||||
<table border class="step-table">
|
||||
<tr>
|
||||
<td width="40%"><el-icon>
|
||||
<User />
|
||||
</el-icon>办理用户</td>
|
||||
<td>{{ data.row.createUser }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><el-icon>
|
||||
<Calendar />
|
||||
</el-icon>办理时间</td>
|
||||
<td>{{ data.row.createTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><el-icon>
|
||||
<Picture />
|
||||
</el-icon>隐患图片</td>
|
||||
<td>
|
||||
<el-image :src="data.row.smarkUrlPic" style="height:80px;"
|
||||
:preview-teleported="true" :preview-src-list="data.row.smarkUrlPics"></el-image>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-card>
|
||||
</div>
|
||||
<el-card>
|
||||
<table border class="step-table">
|
||||
<tr>
|
||||
<td width="40%"><el-icon>
|
||||
<User />
|
||||
</el-icon>办理用户</td>
|
||||
<td>{{ data.row.createUser }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><el-icon>
|
||||
<Calendar />
|
||||
</el-icon>办理时间</td>
|
||||
<td>{{ data.row.createTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><el-icon>
|
||||
<Picture />
|
||||
</el-icon>隐患图片</td>
|
||||
<td>
|
||||
<el-image :src="data.row.smarkUrlPic" style="height:80px;" :preview-teleported="true"
|
||||
:preview-src-list="data.row.smarkUrlPics"></el-image>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-card>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="14" class="detail-right">
|
||||
<el-form style="margin: 0px 20px;">
|
||||
<el-col :span="14" class="detail-right" :class="'is-' + data.mode">
|
||||
<el-form style="margin: 0px 20px;" :model="data.baseForm" ref="baseInfo">
|
||||
<el-form-item label="项目名称">
|
||||
{{ data.row.projectName }}
|
||||
</el-form-item>
|
||||
|
@ -63,80 +103,137 @@
|
|||
<el-form-item label="整改要求">
|
||||
{{ data.row.changeInfo }}
|
||||
</el-form-item>
|
||||
<template v-if="data.mode == 'edit'">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="提交人">
|
||||
{{ data.row.createUser }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="提交时间">
|
||||
{{ data.row.createTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="提交人">
|
||||
{{ data.row.createUser }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="提交时间">
|
||||
{{ data.row.createTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改人">
|
||||
{{ data.row.lordSent }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="抄送人">
|
||||
{{ data.row.copySendUser }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="复检人">
|
||||
{{ data.row.recheckSend }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="截至时间">
|
||||
{{ data.row.nickedTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改人">
|
||||
{{ data.row.lordSentUser }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="抄送人">
|
||||
{{ data.row.copySendUser }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="复检人">
|
||||
{{ data.row.recheckSendUser }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="截至时间">
|
||||
{{ data.row.nickedTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="提交人">
|
||||
{{ data.row.createUser }}
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间">
|
||||
{{ data.row.createTime }}
|
||||
</el-form-item>
|
||||
<el-form-item label="整改人">
|
||||
{{ data.row.lordSentUser }}
|
||||
</el-form-item>
|
||||
<el-form-item label="抄送人">
|
||||
{{ data.row.copySendUser }}
|
||||
</el-form-item>
|
||||
<el-form-item label="复检人">
|
||||
{{ data.row.recheckSendUser }}
|
||||
</el-form-item>
|
||||
<el-form-item label="截至时间">
|
||||
{{ data.row.nickedTime }}
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态">
|
||||
<dict-tag :options="data.checkStates" :value="data.row.checkState" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
<div class="step-2">
|
||||
<div class="step-header">
|
||||
<svg-icon icon-class="twrap" /> 整改情况
|
||||
<template v-if="data.mode == 'edit'">
|
||||
<div class="step-2"
|
||||
v-if="data.hasStep2Role && (data.row.checkState == 0 || data.row.checkState == 2)">
|
||||
<div class="step-header">
|
||||
<svg-icon icon-class="twrap" /> 整改情况
|
||||
</div>
|
||||
<el-form ref="formStep2Ref" :model="step2Form" :rules="step2Rules">
|
||||
<el-form-item label="整改说明" prop="opinion">
|
||||
<el-input v-model="step2Form.opinion" style="width: 100%" maxlength="200" :rows="3"
|
||||
type="textarea" placeholder="请输入整改说明(最多255字)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改图片" prop="images" style="margin-top:15px">
|
||||
<image-upload v-model="step2Form.images" previewAll :limit="5"
|
||||
@change="doStep2ImageUpload" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center;">
|
||||
<el-button @click="data.visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="step2Submit" :disabled="data.loading">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-form ref="formStep2Ref" :mode="step2Form" :rules="step2Rules">
|
||||
<el-form-item label="整改说明" prop="opinion">
|
||||
<el-input v-model="step2Form.opinion" style="width: 100%" maxlength="200" :rows="3"
|
||||
type="textarea" placeholder="请输入整改说明(最多200字)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改图片" prop="images" style="margin-top:15px">
|
||||
<image-upload v-model="step2Form.images" previewAll :limit="5"
|
||||
@change="doStep2ImageUpload" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center;">
|
||||
<el-button type="primary" @click="step2Submit" :disabled="data.loading">提交</el-button>
|
||||
<div class="step-3" v-if="data.hasStep3Role && data.row.checkState == 1">
|
||||
<div class="step-header">
|
||||
<svg-icon icon-class="twrap" /> 复检
|
||||
</div>
|
||||
<el-form ref="formStep3Ref" :model="step3Form" :rules="step3Rules">
|
||||
<el-form-item label="复检意见" prop="opinion">
|
||||
<el-input v-model="step3Form.opinion" style="width: 100%" maxlength="200" :rows="3"
|
||||
type="textarea" placeholder="请输入复检意见(最多255字)" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center;margin-top:20px;">
|
||||
<el-button @click="data.visible = false">取消</el-button>
|
||||
<el-button type="danger" @click="step3Reject" :disabled="data.loading">复检驳回</el-button>
|
||||
<el-button type="primary" @click="step3Submit" :disabled="data.loading">复检通过</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup name="Problemmodify">
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { listAuditinfo, addAuditinfo } from '@/api/trouble/auditinfo'
|
||||
import { fa } from 'element-plus/es/locales.mjs';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { ssp_proble_type, ssp_proble_sub_type } = proxy.useDict('ssp_proble_type', 'ssp_proble_sub_type');
|
||||
const formStep2Ref = ref();
|
||||
const formStep3Ref = ref();
|
||||
const userStore = useUserStore()
|
||||
const emit = defineEmits(["success"]);
|
||||
let data = reactive({
|
||||
simple: false,
|
||||
mode: '',
|
||||
loading: false,
|
||||
visible: false,
|
||||
row: null,
|
||||
step2: {
|
||||
auditinfoList: [],
|
||||
stepActive: 0,
|
||||
hasStep2Role: false,
|
||||
hasStep3Role: false,
|
||||
baseForm: {},
|
||||
step2Form: {
|
||||
opinion: '',
|
||||
images: [],
|
||||
},
|
||||
step2Form: {},
|
||||
step2Rules: {
|
||||
opinion: [
|
||||
{ required: true, message: "请输入审核意见", trigger: "blur" },
|
||||
|
@ -145,27 +242,140 @@ let data = reactive({
|
|||
images: [
|
||||
{ validator: validateStep2Images }
|
||||
]
|
||||
}
|
||||
},
|
||||
step3Form: {
|
||||
opinion: ''
|
||||
},
|
||||
step3Rules: {
|
||||
opinion: [
|
||||
{ required: true, message: "请输入审核意见", trigger: "blur" },
|
||||
{ min: 1, max: 200, message: "长度在 1 到 255 个字符", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
checkStates: [{ value: "0", label: '待整改' }, { value: "1", label: '待复检' },
|
||||
{ value: "2", label: '复检驳回' },
|
||||
{ value: "3", label: '复检通过' }]
|
||||
});
|
||||
const { step2Form, step2Rules } = toRefs(data);
|
||||
const { step2Form, step2Rules, step3Form, step3Rules } = toRefs(data);
|
||||
function validateStep2Images(rule, value, callback) {
|
||||
if (value.length == 0) {
|
||||
if (step2Form.value.images.length == 0) {
|
||||
callback(new Error("请上传图片!"))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
function showDrawer(row) {
|
||||
function showDrawer(row, mode) {
|
||||
data.mode = mode;
|
||||
data.row = row;
|
||||
data.visible = true;
|
||||
}
|
||||
|
||||
step2Form.value.images = [];
|
||||
step2Form.value.opinion = "";
|
||||
step3Form.value.opinion = "";
|
||||
data.hasStep2Role = row.lordSent == userStore.uid;
|
||||
data.hasStep3Role = row.recheckSend == userStore.uid;
|
||||
data.stepActive = row.checkState + 1;
|
||||
data.visible = true;
|
||||
getListAuditinfo();
|
||||
}
|
||||
function getListAuditinfo() {
|
||||
listAuditinfo({
|
||||
page: 1,
|
||||
limit: 100,
|
||||
mainId: data.row.id
|
||||
}).then(res => {
|
||||
let tmps = (res.rows || []).map(it => {
|
||||
it.index = "";
|
||||
return it;
|
||||
});
|
||||
for (let i = 0; i < tmps.length; i++) {
|
||||
let idx = tmps.length - i + 1;
|
||||
tmps[i].index = idx < 10 ? '0' + idx : idx;
|
||||
}
|
||||
data.auditinfoList = tmps;
|
||||
if (data.row.checkState == 3) {
|
||||
if (tmps.length == 2) {
|
||||
data.simple = true;
|
||||
data.stepActive = 3;
|
||||
} else {
|
||||
data.simple = false;
|
||||
data.stepActive = 4;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
function step3Reject() {
|
||||
data.loading = true;
|
||||
formStep3Ref.value.validate(v => {
|
||||
debugger
|
||||
data.loading = false;
|
||||
if (!v) {
|
||||
return;
|
||||
}
|
||||
proxy.$confirm("确认驳回此整改?", "提示", {
|
||||
confirmButtonText: "确 认",
|
||||
cancelButtonText: "取 消"
|
||||
}).then(() => {
|
||||
let postData = {
|
||||
mainId: data.row.id,
|
||||
opinion: step3Form.value.opinion,
|
||||
processState: 2,
|
||||
};
|
||||
addAuditinfo(postData).then(d => {
|
||||
if (d.code == 200) {
|
||||
proxy.$modal.msgSuccess("提交成功!");
|
||||
data.visible = false;
|
||||
emit("success");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
function step3Submit() {
|
||||
data.loading = true;
|
||||
formStep3Ref.value.validate(v => {
|
||||
data.loading = false;
|
||||
if (!v) {
|
||||
return;
|
||||
}
|
||||
proxy.$confirm("确认复检通过此整改?", "提示", {
|
||||
confirmButtonText: "确 认",
|
||||
cancelButtonText: "取 消"
|
||||
}).then(() => {
|
||||
let postData = {
|
||||
mainId: data.row.id,
|
||||
opinion: step3Form.value.opinion,
|
||||
processState: 1,
|
||||
};
|
||||
addAuditinfo(postData).then(d => {
|
||||
if (d.code == 200) {
|
||||
proxy.$modal.msgSuccess("提交成功!");
|
||||
data.visible = false;
|
||||
emit("success");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
function step2Submit() {
|
||||
data.loading = true;
|
||||
formStep2Ref.value.validate(v => {
|
||||
data.loading = false;
|
||||
if (v) {
|
||||
|
||||
let postData = {
|
||||
mainId: data.row.id,
|
||||
opinion: step2Form.value.opinion,
|
||||
processState: 0,
|
||||
images: step2Form.value.images,
|
||||
};
|
||||
addAuditinfo(postData).then(d => {
|
||||
if (d.code == 200) {
|
||||
proxy.$modal.msgSuccess("提交成功!");
|
||||
data.visible = false;
|
||||
emit("success");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -197,6 +407,11 @@ defineExpose({
|
|||
}
|
||||
}
|
||||
|
||||
.step-list {
|
||||
overflow-y: auto;
|
||||
height: calc(100vh - 128px);
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 8px !important;
|
||||
}
|
||||
|
@ -227,10 +442,25 @@ defineExpose({
|
|||
top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.step-img {
|
||||
.el-image {
|
||||
width: 90px;
|
||||
height: 80px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-right {
|
||||
padding-left: 12px;
|
||||
|
||||
&.is-edit {
|
||||
.el-form-item--default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-upload-list__item,
|
||||
.el-upload--picture-card {
|
||||
|
@ -238,9 +468,6 @@ defineExpose({
|
|||
height: 80px !important;
|
||||
}
|
||||
|
||||
.el-form-item--default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.step-header {
|
||||
color: var(--el-color-primary);
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
<el-table-column label="施工部位" align="center" prop="workParts" />
|
||||
<el-table-column label="整改要求" align="center" prop="changeInfo" />
|
||||
<el-table-column label="整改截至时间" align="center" prop="nickedTime" width="120" />
|
||||
<el-table-column label="整改人" align="center" prop="lordSent" width="200" />
|
||||
<el-table-column label="复检人" align="center" prop="recheckSend" width="200" />
|
||||
<el-table-column label="整改人" align="center" prop="lordSentUser" width="200" />
|
||||
<el-table-column label="复检人" align="center" prop="recheckSendUser" width="200" />
|
||||
<el-table-column label="抄送人" align="center" prop="copySendUser" width="200" />
|
||||
<el-table-column label="流程状态" align="center" prop="checkState">
|
||||
<template #default="scope">
|
||||
|
@ -88,25 +88,25 @@
|
|||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<detailDrawer ref="detailDrawerRef"></detailDrawer>
|
||||
<detailDrawer ref="detailDrawerRef" @success="handleQuery"></detailDrawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Problemmodify">
|
||||
import detailDrawer from "./detailDrawer.vue";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { Check, Document, Delete } from '@element-plus/icons-vue'
|
||||
import { listProblemmodify, getProblemmodify, delProblemmodify, addProblemmodify, updateProblemmodify, getListCount } from "@/api/trouble/problemmodify";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { ssp_proble_type, ssp_proble_sub_type } = proxy.useDict('ssp_proble_type', 'ssp_proble_sub_type');
|
||||
const problemmodifyList = ref([]);
|
||||
const open = ref(false);
|
||||
const userStore = useUserStore()
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const detailDrawerRef = ref();
|
||||
const data = reactive({
|
||||
form: {},
|
||||
|
@ -174,16 +174,28 @@ function tabClick() {
|
|||
}
|
||||
|
||||
function handleModify(row) {
|
||||
|
||||
detailDrawerRef.value.showDrawer(row, 'edit');
|
||||
}
|
||||
function handleDetail(row) {
|
||||
detailDrawerRef.value.showDrawer(row);
|
||||
detailDrawerRef.value.showDrawer(row, 'show');
|
||||
}
|
||||
function getIsVdel(row) {
|
||||
return true;
|
||||
let isAdmin = userStore.isAdmin;
|
||||
if (isAdmin) {
|
||||
return true;
|
||||
} else if (row.updateUser == userStore.uid && row.checkState != 3) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function getIsModify(row) {
|
||||
return true;
|
||||
if (row.checkState == 0 || row.checkState == 2) {
|
||||
return row.lordSent == userStore.uid;
|
||||
}
|
||||
if (row.checkState == 1) {
|
||||
return row.recheckSend == userStore.uid;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
|
|
Loading…
Reference in New Issue