lion 2 years ago
parent b81b470cb9
commit 6a7efc2f64

@ -2,6 +2,6 @@
ENV = 'development'
# base api
#VUE_APP_BASE_API = 'http://safety.115.langye.net/'
VUE_APP_BASE_API = 'http://safety.115.langye.net/'
VUE_APP_BASE_API = http://192.168.60.99:9001/
#VUE_APP_BASE_API = http://192.168.60.99:9001/

@ -8,7 +8,7 @@ export default {
},
width:{
type:Number,
default:98
default:80
},
// isFullScreen:{
// type:Boolean,
@ -149,7 +149,7 @@ export default {
})
return (
<el-form
style={title.length === 0 ? {'margin-top':'32px'} : {}}
style={title.length === 0 ? {'margin-top':'32px'} : {'padding':'0 2%'}}
ref="elForm"
props={{
model:form,
@ -202,7 +202,8 @@ export default {
.xy-table-item-label{
// width: 140px;
/* width: 160px; */
min-width: 120px;
min-width: 140px;
text-align: right;
padding-right: 0!important;
}
.xy-table-item-price{

@ -670,7 +670,7 @@ export default {
{
(this.showIndex? <el-table-column
type="index"
width="50" fixed="left" align="center" >
width="50" align="center" >
</el-table-column>:""
)

@ -1,17 +1,31 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增枢纽' : '编辑枢纽'" :form="form"
:rules="rules" @submit="submit">
:rules="rules" @submit="submit">
<template v-slot:type>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>站点分类
</div>
<div class="xy-table-item-content">
<el-select v-model="form.type" filterable placeholder="请选择站点分类" style="width: 400px;">
<el-option v-for="item in siteTypeList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>枢纽名称
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>站点名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" placeholder="请输入枢纽名称" clearable style="width: 400px;"></el-input>
</div>
</div>
</template>
<template v-slot:address>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -55,7 +69,10 @@
} from 'element-ui'
import {
save,get
} from "@/api/address/index.js";
} from "@/api/address/index.js";
import {
getparameteritem
} from "@/api/system/dictionary.js";
export default {
components: {
@ -65,8 +82,9 @@
isShow: false,
type: 'add',
id: '',
form: {
siteTypeList:[],
form: {
type:'',
name: '',
address: '',
lat: '',
@ -88,13 +106,18 @@
}
}
},
created() {
created() {
this.getType()
},
methods: {
async getType(){
const res = await getparameteritem('siteType')
this.siteTypeList = res.detail
},
async getDetail() {
const res = await get(this.id)
this.form = {
this.form = {
type:res?.type,
name: res?.name,
address: res?.address,
lat: res?.lat,

@ -1,7 +1,7 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="枢纽管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" text="站点管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="关键字搜索" />
@ -16,7 +16,7 @@
:list="list"
:total="total"
@page_sizeChange="e => {select.page_size = e,getList()}"
@pageIndexChange="e => {select.page_size = e,getList()}"
@pageIndexChange="e => {select.page = e,getList()}"
:table-item="table">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="260" header-align="center">
@ -54,10 +54,14 @@
},
total:0,
table:[{
label:"名称",
label:"站点分类",
prop:'type_detail.value',
align:'left',
width:180,
},{
label:"站点名称",
prop:'name',
align:'left',
fixed:'left'
},{
label:"地址",
prop:'address',
@ -79,7 +83,7 @@
},
watch:{},
methods:{
async getList(){
const res = await listaddress({...this.select})
this.list = res.data

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增检查' : '编辑检查'" :form="form"
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '检查问题' : '编辑问题'" :form="form"
:rules="rules" @submit="submit">
<template v-slot:mission_id>
<div class="xy-table-item">
@ -17,34 +17,20 @@
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label">
<div class="xy-table-item-label" style="font-weight: bold;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>检查日期
</div>
<div class="xy-table-item-content">
<el-date-picker style="width: 400px;" v-model="form.date" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime"
placeholder="选择检查日期">
<el-date-picker style="width: 400px;" v-model="form.date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" type="date" placeholder="选择检查日期">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:siteName>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>检查地点
</div>
<div class="xy-table-item-content">
<el-select @change="changeSite" v-model="form.siteName" filterable clearable placeholder="请选择检查地点" style="width: 400px;">
<el-option v-for="item in siteList" :key="-1" label="选择地图位置" :value="-1">
</el-option>
<el-option v-for="item in siteList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:ask_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<div class="xy-table-item-label" style="font-weight: bold;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>问题类型
</div>
<div class="xy-table-item-content">
@ -55,20 +41,58 @@
</div>
</div>
</template>
<template v-slot:ask_department>
<template v-slot:siteName>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>检查地点
</div>
<div class="xy-table-item-content">
<!-- <el-select @change="changeSite" v-model="form.siteName" filterable clearable placeholder="请选择检查地点" style="width: 400px;">
<el-option label="选择地图位置" :value="-1">
</el-option>
<el-option v-for="item in siteList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select> -->
<el-cascader v-model="form.siteName" v-if="showCasc" clearable :options="siteList" :props="{'label':'name','value':'id'}"
placeholder="请选择检查地点" style="width: 290px;margin-right: 10px;" @change="changeSite"></el-cascader>
<el-input v-model="form.siteName" v-if="!showCasc" type='text' placeholder="请选择检查地点" clearable
style="width: 290px;margin-right: 10px;" @focus="$refs.maps.box = true"></el-input>
<el-button type="primary" v-if="showCasc" @click="$refs.maps.box = true;showCasc=false;form.siteName=''"></el-button>
<el-button type="primary" v-if="!showCasc" @click="showCasc = true;form.siteName=''"></el-button>
</div>
</div>
</template>
<template v-slot:up_admin_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>建议科室
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>上报人
</div>
<div class="xy-table-item-content">
<el-input v-model="form.ask_department" type='text' placeholder="请输入建议科室" clearable
style="width: 400px;"></el-input>
<el-select v-model="form.up_admin_id" filterable allow-create clearable placeholder="请选择上报人" style="width: 400px;">
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:ask_introduce>
<template v-slot:ask_department>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>建议整改科室
</div>
<div class="xy-table-item-content">
<el-select @change="changeDepartment" v-model="form.ask_department" filterable allow-create clearable placeholder="请选择或输入建议整改科室" style="width: 400px;">
<el-option v-for="item in depList" :key="item.id" :label="item.name" :value="item.name">
</el-option>
</el-select>
<!-- <el-input v-model="form.ask_department" type='text' placeholder="请输入建议科室" clearable
style="width: 400px;"></el-input> -->
</div>
</div>
</template>
<template v-slot:ask_introduce>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>问题描述
</div>
<div class="xy-table-item-content">
@ -87,27 +111,27 @@
style="width: 400px;"></el-input>
</div>
</div>
</template>
<template v-slot:file_ids>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>附件
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' list-type="picture-card" :file-list="pictureList"
ref="pictureUpload" style="width:600px" :auto-upload="true" :data="uploadOther"
:on-preview="handlePictureCardPreview" :on-success="handlesuccess" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</template>
<template v-slot:file_ids>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>附件
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' list-type="picture-card" :file-list="pictureList"
ref="pictureUpload" style="width:600px" :auto-upload="true" :data="uploadOther"
:on-preview="handlePictureCardPreview" :on-success="handlesuccess" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</template>
</xy-dialog>
<el-dialog :visible.sync="showPic">
<img width="100%" :src="showPicUrl" alt="">
</el-dialog>
<avue-input-map ref="maps" :params="mapparams" placeholder="请选择地图" v-model="mapform"></avue-input-map>
</el-dialog>
<avue-input-map ref="maps" :params="mapparams" placeholder="请选择地图" v-model="mapform"></avue-input-map>
</div>
@ -150,31 +174,38 @@
id: '',
uploadOther: {
token: ""
},
},
login_id:'',
showCasc:true,
action: `${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
pictureList: [],
showPic: false,
showPicUrl: '',
unitList: [],
siteList: [],
siteListArr: [],
askList: [],
mission_id:'',
mapparams: {
zoom: 11,
depList:[],
mission_id: '',
mapparams: {
zoom: 11,
},
userdata:[],
mapform: [],
form: {
mission_id: '',
date: '',
site_id: '',
siteName:'',
address:'',
lat:'',
lon:'',
ask_id: '',
ask_department:'',
date: '',
ask_id: '',
site_id: '',
siteName: '',
address: '',
lat: '',
lon: '',
up_admin_id:"",
ask_department: '',
accept_department_ids:[],
ask_introduce: '',
tips: '',
tips: '',
file_ids: [],
},
@ -194,21 +225,23 @@
ask_id: [{
required: true,
message: '请选择问题类型'
}],
ask_introduce: [{
required: true,
message: '请输入问题描述'
}],
ask_introduce: [{
required: true,
message: '请输入问题描述'
}]
}
}
},
created() {
this.uploadOther.token = getToken();
created() {
// document.getElementById('casc').click()
this.uploadOther.token = getToken();
this.loadDeptOptions()
this.getUnit()
this.getAddress()
this.getAsk()
// this.loadDeptOptions()
// this.loadUser()
this.loadUser()
},
methods: {
//
@ -216,29 +249,59 @@
const res = await listunit({
page: 1,
page_size: 9999
})
})
this.unitList = res.data
},
changeSite(e){
console.log(e)
if(e==-1){
this.form.site_id = ''
this.form.address = ''
this.form.lat = ''
this.form.lon = ''
this.form.siteName = ''
this.$refs.maps.box = true
loadUser() {
listCommonuser({
page_size: 999
}).
then((res) => {
this.userdata = res.data?res.data.reverse():[];
}).catch(error => {
console.log(error)
})
},
loadDeptOptions() {
listdept().
then((res) => {
this.depList = res;
}).catch(error => {
console.log(error)
reject(error)
})
},
changeSite(e) {
console.log("this.siteListArr", this.siteListArr)
console.log("e", e[1])
this.siteListArr.map(item => {
if (item.id == e[1]) {
this.form.site_id = item.id
this.form.address = item.address
this.form.lat = item.lat
this.form.lon = item.lon
// this.form.siteName = item.name
}
})
console.log("this.form.siteName", this.form.siteName)
// if(e[0]!=undefined){
// this.form.site_id = ''
// this.form.address = ''
// this.form.lat = ''
// this.form.lon = ''
// this.form.siteName = ''
// // this.$refs.maps.box = true
// }else{
// }
},
changeDepartment(e){
console.log("e",e)
if(typeof(e)==='number'){
this.form.accept_department_ids.push(e)
}else{
this.siteList.map(item=>{
if(item.id==e){
this.form.site_id = item.id
this.form.address = item.address
this.form.lat = item.lat
this.form.lon = item.lon
this.form.siteName = item.name
}
})
this.form.accept_department_ids = []
}
},
async getAddress() {
@ -246,38 +309,66 @@
page: 1,
page_size: 9999
})
this.siteList = res.data
this.siteListArr = res.data
let arr = this.contactSite(res.data)
this.siteList = arr
},
contactSite(arr) {
let tempArr = [],
newArr = []
for (let i = 0; i < arr.length; i++) {
if (tempArr.indexOf(arr[i].type) === -1) {
newArr.push({
type: arr[i].type,
name: arr[i]['type_detail']['value'],
children: [arr[i]]
})
tempArr.push(arr[i].type);
} else {
for (let j = 0; j < newArr.length; j++) {
if (newArr[j].type == arr[i].type) {
newArr[j].children.push(arr[i])
}
}
}
}
return newArr
},
async getAsk(label) {
const res = await getparameteritem('askList')
this.askList = res.detail
},
handleRemove(file, fileList) {
this.pictureList = fileList
},
handlesuccess(response, file, fileList) {
this.pictureList = fileList
},
handlePictureCardPreview(file) {
this.showPicUrl = file.url;
this.showPic = true;
},
handleRemove(file, fileList) {
this.pictureList = fileList
},
handlesuccess(response, file, fileList) {
this.pictureList = fileList
},
handlePictureCardPreview(file) {
this.showPicUrl = file.url;
this.showPic = true;
},
async getDetail() {
const res = await get(this.id)
this.form = {
mission_id: res?.mission_id,
date: res?.date,
site_id: res?.site_id,
siteName:'',
address:res?.address,
lat:res?.lat,
lon:res?.lon,
ask_id: res?.ask_id,
ask_department:res?.ask_department,
date: res?.date,
ask_id: res?.ask_id,
site_id: res?.site_id,
siteName: res.site_id?[undefined,res.site_id]:res.address,
address: res?.address,
lat: res?.lat,
lon: res?.lon,
up_admin_id:res?.up_admin_id,
ask_department: res?.ask_department,
ask_introduce: res?.ask_introduce,
tips: res?.tips,
accept_department_ids:res.accept_department_ids?res.accept_department_ids:[],
file_ids: res?.file_ids,
}
}
this.showCasc = res.site_id?true:false
console.log("12333",this.form.siteName)
this.$refs.cascader.computePresentText()
this.mapform = [res.lon, res.lat, res.address]
for (var f of res.files) {
this.pictureList.push({
@ -337,34 +428,37 @@
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
}
if(this.type==='add'){
for(var k of this.unitList){
console.log("adddd",k.name)
if(k.name=='日常巡查'){
this.form.mission_id = k.id
}
}
}
if (this.type === 'add') {
this.form.up_admin_id = this.login_id
for (var k of this.unitList) {
console.log("adddd", k.name)
if (k.name == '日常巡查') {
this.form.mission_id = k.id
}
}
}
} else {
this.id = ''
this.pictureList = []
this.mission_id = ''
this.mapform=[]
this.pictureList = []
this.mission_id = ''
this.mapform = []
this.showCasc = true
this.$refs['dialog'].reset()
}
},
mission_id(newval){
console.log("newval",newval)
if(newval){
this.form.mission_id = this.mission_id
}
},
mapform(newVal, oldVal) {
this.form.lon = newVal[0];
this.form.lat = newVal[1];
this.form.address = newVal[2];
},
mission_id(newval) {
console.log("newval", newval)
if (newval) {
this.form.mission_id = this.mission_id
}
},
mapform(newVal, oldVal) {
this.form.lon = newVal[0];
this.form.lat = newVal[1];
this.form.address = newVal[2];
this.form.siteName = newVal[2]
this.form.site_id = ''
}
}
@ -374,16 +468,24 @@
<style scoped lang="scss">
// .xy-table-item-label {
// width: 160px;
// }
::v-deep .ask_department{
flex-basis: 100%;
}
::v-deep .avue-input-map{
display: none;
}
::v-deep .site_id,::v-deep .address,::v-deep .lat,::v-deep .lon{
display: none;
// }
::v-deep .ask_department {
// flex-basis: 100%;
}
::v-deep .avue-input-map {
display: none;
}
::v-deep .site_id,
::v-deep .address,
::v-deep .lat,
::v-deep .lon,
::v-deep .accept_department_ids
{
display: none;
}
.img__delete {
transform: scale(0.8, 0.8);

@ -4,18 +4,30 @@
:rules='rules' @submit="submit">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>计划名称
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>计划名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" placeholder="请输入计划名称" clearable style="width: 400px;"></el-input>
</div>
</div>
</template>
<template v-slot:year>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>计划年份
</div>
<div class="xy-table-item-content">
<el-date-picker style="width: 400px;" v-model="form.year" value-format="yyyy" type="year"
placeholder="选择计划年份">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:type>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>计划类型
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>计划类型
</div>
<div class="xy-table-item-content">
<el-select v-model="form.type" filterable clearable placeholder="请选择计划类型" style="width: 400px;">
@ -25,47 +37,35 @@
</div>
</div>
</template>
<template v-slot:status>
<template v-slot:start_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>计划状态
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>开始日期
</div>
<div class="xy-table-item-content">
<el-select v-model="form.status" filterable clearable placeholder="请选择计划状态" style="width: 400px;">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<el-date-picker style="width: 400px;" v-model="form.start_date" value-format="yyyy-MM-dd" type="date"
placeholder="选择开始日期">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:year>
<template v-slot:status>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>计划年份
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>计划状态
</div>
<div class="xy-table-item-content">
<el-date-picker style="width: 400px;" v-model="form.year" value-format="yyyy" type="year"
placeholder="选择计划年份">
</el-date-picker>
<el-select v-model="form.status" filterable clearable placeholder="请选择计划状态" style="width: 400px;">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:start_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>开始日期
</div>
<div class="xy-table-item-content">
<el-date-picker style="width: 400px;" v-model="form.start_date" value-format="yyyy-MM-dd" type="date"
placeholder="选择开始日期">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:end_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>结束日期
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>结束日期
</div>
<div class="xy-table-item-content">
<el-date-picker style="width: 400px;" v-model="form.end_date" value-format="yyyy-MM-dd" type="date"
@ -119,7 +119,7 @@
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' :file-list="pictureList" ref="pictureUpload"
style="width:600px" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
style="width:400px" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
:on-remove="handleRemove">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
@ -133,7 +133,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>说明
</div>
<div class="xy-table-item-content">
<el-input v-model="form.content" :rows='8' type='textarea' placeholder="请输入说明" clearable
<el-input v-model="form.content" :rows='2' type='textarea' placeholder="请输入说明" clearable
style="width:400px"></el-input>
</div>
</div>
@ -171,7 +171,7 @@
<div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>参与用户选择
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>参与人员
</div>
<div class="xy-table-item-content" style="width:400px">
<el-radio-group v-model="form.name7" @change='changeName7'>
@ -187,11 +187,15 @@
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content" style='min-width:600px'>
<el-transfer filterable :titles="['待选择', '已选择']" :props="{key: 'id',label: 'name'}"
<div class="xy-table-item-content" style='min-width:400px'>
<el-select style="width:400px" v-model="form.accept_admin_ids" clearable filterable multiple placeholder="请选择人员">
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<!-- <el-transfer filterable :titles="['待选择', '已选择']" :props="{key: 'id',label: 'name'}"
:filter-method="filterMethod" :format="{ noChecked: '${total}',hasChecked: '${checked}/${total}' }"
filter-placeholder="请选择参与人员" v-model="form.accept_admin_ids" :data="userdata">
</el-transfer>
</el-transfer> -->
</div>
</div>
</div>
@ -201,7 +205,7 @@
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content" style='min-width:100px'>
<div class="xy-table-item-content" style='min-width:400px'>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">
</el-checkbox>
<div style="margin: 15px 0;"></div>
@ -213,7 +217,17 @@
</div>
</div>
</template>
</template>
<template v-slot:footerContent>
<Button type="primary"
style='margin-left:5px;margin-bottom:5px;' @click="submit">确认</Button>
</Button>
<Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></Button>
<Poptip v-if="type='editor'" transfer confirm title="确认要删除吗?" @on-ok="deleteList">
<Button type="primary" style="margin-left:5px;margin-bottom:5px;" ghost>删除</Button>
</Poptip>
</template>
</xy-dialog>
</div>
@ -228,7 +242,7 @@
} from "@/api/system/dictionary.js";
import {
save,
get
get,del
} from "@/api/task/plan.js";
import {
listdept
@ -268,18 +282,21 @@
value:'未完成'
},{
id:1,
value:'开展'
value:'开展'
},{
id:2,
value:'开展中'
},{
id:3,
value:'已完成'
}],
form: {
plan_type:'',
name: '',
year:'',
type: '',
status:1,
year:'',
start_date: '',
start_date: '',
status:1,
end_date: '',
// count:'',
lefts:'',
@ -402,17 +419,18 @@
this.form = {
plan_type:res?.plan_type,
name: res?.name,
type: res?.type,
year:res.year?res.year:new Date().getFullYear(),
start_date: res?.start_date,
year:res.year?res.year:new Date().getFullYear(),
type: res?.type,
start_date: res?.start_date,
status:res.status?res.status:1,
end_date: res?.end_date,
status:res.status?res.status:1,
lefts:'',
name7: res.accept_department_ids.length > 0 ? 2 : 1,
name7: res.accept_department.length > 0 ? 2 : 1,
file_ids: res?.file_ids,
content: res?.content,
accept_admin_ids: res?.accept_admin_ids,
accept_department_ids: res?.accept_department_ids,
accept_admin_ids: res?.accept_admin,
accept_department_ids: res?.accept_department,
}
for (var f of res.files) {
this.pictureList.push({
@ -471,7 +489,20 @@
},
handlesuccess(response, file, fileList) {
this.pictureList = fileList
},
},
deleteList() {
var that = this;
if (this.id) {
del(this.id).then(response => {
this.$Message.success('操作成功');
this.isShow = false
this.$emit('refresh')
}).catch(error => {
console.log(error)
reject(error)
})
}
}
},
watch: {
isShow(newVal) {

@ -6,7 +6,7 @@
:visible.sync="qsShow"
:modal="true"
:show-close='false'
size="99%"
size="50%"
>
<template v-slot:title>
<div style='font-size: 20px;margin-bottom: 10px;display: flex;justify-content: space-between;'>

@ -2,45 +2,45 @@
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '发起任务' : '编辑任务'" :form="form"
:rules='rules' @submit="submit">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>任务名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" placeholder="请输入任务名称" clearable style="width: 400px;"></el-input>
</div>
</div>
</template>
<template v-slot:unit_type>
<div class="xy-table-item">
<div class="xy-table-item-label">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>任务类型
</div>
<div class="xy-table-item-content">
<el-select v-model="form.unit_type" filterable clearable placeholder="请选择任务类型" style="width: 400px;">
<el-select @change="changeUnitType" v-model="form.unit_type" filterable clearable placeholder="请选择任务类型" style="width: 400px;">
<el-option v-for="item in unitTypeList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:start_date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>开始日期
</div>
<div class="xy-table-item-content">
<el-date-picker style="width: 400px;" v-model="form.start_date" value-format="yyyy-MM-dd" type="date"
placeholder="选择开始日期">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:start_date>
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>开始日期
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>任务名称
</div>
<div class="xy-table-item-content">
<el-date-picker style="width: 400px;" v-model="form.start_date" value-format="yyyy-MM-dd" type="date"
placeholder="选择开始日期">
</el-date-picker>
<el-input v-model="form.name" placeholder="请输入任务名称" clearable style="width: 400px;"></el-input>
</div>
</div>
</template>
</template>
<template v-slot:end_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>结束日期
</div>
<div class="xy-table-item-content">
@ -50,35 +50,35 @@
</div>
</div>
</template>
<template v-slot:mission_plan_id>
<template v-slot:audit_status>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>关联计划
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>任务状态
</div>
<div class="xy-table-item-content">
<el-select v-model="form.mission_plan_id" filterable clearable placeholder="请选择计划" style="width: 400px;">
<el-option v-for="item in missionPlanList" :key="item.id" :label="item.name" :value="item.id">
<el-select v-model="form.audit_status" filterable clearable placeholder="请选择任务状态" style="width: 400px;">
<el-option v-for="item in auditStatusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:audit_status>
<template v-slot:mission_plan_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>任务状态
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>关联计划
</div>
<div class="xy-table-item-content">
<el-select v-model="form.audit_status" filterable clearable placeholder="请选择任务状态" style="width: 400px;">
<el-option v-for="item in auditStatusList" :key="item.id" :label="item.value" :value="item.id">
<el-select v-model="form.mission_plan_id" filterable clearable placeholder="请选择计划" style="width: 400px;">
<el-option v-for="item in missionPlanList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:lefts>
<div>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -114,27 +114,26 @@
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' :file-list="pictureList" ref="pictureUpload"
style="width:600px" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
style="width:400px" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
:on-remove="handleRemove">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</div>
</div>
<div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>说明
</div>
<div class="xy-table-item-content">
<el-input v-model="form.content" :rows='8' type='textarea' placeholder="请输入说明" clearable
<el-input v-model="form.content" :rows='2' type='textarea' placeholder="请输入说明" clearable
style="width:400px"></el-input>
</div>
</div>
</div>
<div>
<!-- <div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>{{mission_type==2?'学习方式':'完成要求'}}
@ -149,18 +148,28 @@
<el-option v-for="item in endTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<Button type="primary" style="height: 40px;margin-left: 10px;vertical-align: top;" v-if="mission_type==2&&form.end_type==5" @click="openQs"></Button>
</div>
</div>
</div> -->
<div v-if="isNeedAnswer=='答题'">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content">
<el-button type="primary" size="small"
style="height: 40px;vertical-align: top;"
@click="openQs">建设题库</el-button>
</div>
</div>
</div>
<div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>{{mission_type==2?'学习要求':'完成详情'}}
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>任务要求
</div>
<div class="xy-table-item-content">
<el-input v-model="form.end_content" :rows='8' type='textarea' placeholder="请输入完成详情" clearable
<el-input v-model="form.end_content" :rows='2' type='textarea' placeholder="请输入任务要求" clearable
style="width: 400px;"></el-input>
</div>
</div>
@ -171,7 +180,7 @@
<div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>参与用户选择
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>参与人员选择
</div>
<div class="xy-table-item-content" style="width:400px">
<el-radio-group v-model="form.name7" @change='changeName7'>
@ -188,11 +197,11 @@
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content" style='min-width:600px'>
<el-transfer filterable :titles="['待选择', '已选择']" :props="{key: 'id',label: 'name'}"
:filter-method="filterMethod" :format="{ noChecked: '${total}',hasChecked: '${checked}/${total}' }"
filter-placeholder="请选择参与人员" v-model="form.accept_admin_ids" :data="userdata">
</el-transfer>
<div class="xy-table-item-content" style='min-width:400px'>
<el-select style="width:400px" v-model="form.accept_admin_ids" clearable filterable multiple placeholder="请选择人员">
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</div>
@ -202,7 +211,7 @@
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content" style='min-width:100px'>
<div class="xy-table-item-content" style='min-width:400px'>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">
</el-checkbox>
<div style="margin: 15px 0;"></div>
@ -246,6 +255,15 @@
</div>
</div>
</template>
<template v-slot:footerContent>
<Button type="primary"
style='margin-left:5px;margin-bottom:5px;' @click="submit">确认</Button>
</Button>
<Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></Button>
<Poptip v-if="type='editor'" transfer confirm title="确认要删除吗?" @on-ok="deleteList">
<Button type="primary" style="margin-left:5px;margin-bottom:5px;" ghost>删除</Button>
</Poptip>
</template>
@ -266,7 +284,7 @@
} from "@/api/system/dictionary.js";
import {
save,
get
get,del
} from "@/api/task/unit.js";
import {
listdept
@ -289,6 +307,7 @@
return {
isShow: false,
type: 'add',
isNeedAnswer:'',
mission_type:'',
id: '',
department_id:'',
@ -306,13 +325,13 @@
},
auditStatusList:[{
id:0,
value:'审核'
value:'审核'
},{
id:1,
value:'开展中'
},{
id:2,
value:'不通过'
value:'未完成'
},{
id:3,
value:'已完成'
@ -348,13 +367,14 @@
form: {
type: '',
// mission_name:'',
// mission_name:'',
unit_type:'',
start_date: '',
name: '',
unit_type: '',
start_date: '',
end_date: '',
mission_plan_id:'',
audit_status:1,
mission_plan_id:'',
lefts:'',
name7: 1,
is_need_answer:'',
@ -410,10 +430,26 @@
}
this.loadDeptOptions()
this.getMissionPlan()
this.getMissionPlan()
this.getUnitTypeList()
// this.loadUser()
},
methods: {
async getUnitTypeList(){
const res = await getparameteritem('unitTypeList')
this.unitTypeList = res.detail
},
changeUnitType(e){
console.log("e",e)
this.unitTypeList.map(item=>{
if(e==item.id){
console.log(item.remark)
this.isNeedAnswer = item.remark
this.form.type=2
}
})
},
async getMissionPlan(){
const res = await listplan({page:1,page_size:9999})
this.missionPlanList = res.data
@ -434,8 +470,7 @@
this.form.mission_groups_list = []
}
},
changeAudit(e) {
console.log("e",e)
changeAudit(e) {
if (e == 1) {
this.form.audit_status = 0
this.form.audit_admin_id = ''
@ -511,14 +546,14 @@
const res = await get(this.id)
this.form = {
type: res?.type,
name: res?.name,
// mission_name:res?.mission_name,
unit_type: res?.unit_type,
unit_type: res?.unit_type,
start_date: res?.start_date,
name: res?.name,
end_date: res?.end_date,
mission_plan_id:res?.mission_plan_id,
audit_status: res.audit_status?res.audit_status:1,
audit_status: res.audit_status?res.audit_status:1,
mission_plan_id:res?.mission_plan_id,
lefts:'',
name7: res.accept_department_ids.length > 0 ? 2 : (res.accept_admin_ids.length > 0 ? 1 : (res
.groups.length > 0 ? 3 : 1)),
@ -638,7 +673,20 @@
},
handlesuccess(response, file, fileList) {
this.pictureList = fileList
},
},
deleteList() {
var that = this;
if (this.id) {
del(this.id).then(response => {
this.$Message.success('操作成功');
this.isShow = false
this.$emit('refresh')
}).catch(error => {
console.log(error)
reject(error)
})
}
}
},
watch: {
isShow(newVal) {

@ -60,7 +60,7 @@
</template>
{{showform.content?showform.content:''}}
</el-descriptions-item>
<el-descriptions-item span='2'>
<!-- <el-descriptions-item span='2'>
<template slot="label">
任务完成要求
</template>
@ -69,7 +69,7 @@
{{item.name}}
</span>
</div>
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item span='2'>
<template slot="label">
任务完成详情
@ -78,7 +78,7 @@
</el-descriptions-item>
<el-descriptions-item span='2'>
<template slot="label">
参与用户
参与人员
</template>
<div v-if="showform.accept_admin&&showform.accept_admin.length>0">
<el-tag style='margin-right:10px' v-for='item in showform.accept_admin'>

File diff suppressed because it is too large Load Diff

@ -13,7 +13,10 @@
</Select>
<Button type="primary" @click="getList"></Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;" @click="$refs['addPatrol'].isShow=true,$refs['addPatrol'].type='add'"></Button>
<Button type="primary" style="margin-left: 10px;" @click="$refs['addPatrol'].login_id=login_id,$refs['addPatrol'].isShow=true,$refs['addPatrol'].type='add'"></Button>
<Poptip v-if='is_guiji||is_chuzhang' transfer confirm title="确认要删除吗?" @on-ok="deleteList">
<Button type="primary" style="margin-left:5px;margin-bottom:5px;" ghost>删除</Button>
</Poptip>
</div>
</slot>
</lx-header>
@ -24,19 +27,21 @@
:total="total"
stripe
@cell-dblclick='cellClicks'
@selection-change='selectionChange'
@pageSizeChange="e => {select.page_size = e,getList()}"
@pageIndexChange="e => {select.page = e,getList()}"
:table-item="table">
<template v-slot:btns>
<el-table-column fixed="right" align='center' label="操作" min-width="180" header-align="center">
<el-table-column align='left' label="操作" min-width="180" header-align="center">
<template slot-scope="scope">
<Button v-if="is_guiji||is_chuzhang||login_id==scope.row.admin_id" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'show')"></Button>
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'show')"></Button>
<Button v-if='scope.row.status==0&&(is_guiji||is_chuzhang||login_id==scope.row.admin_id)' type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="editorPatrol(scope.row.id,'editor')"></Button>
<Button v-if="scope.row.status==1&&((scope.row.check_leader==1&&is_leader&&scope.row.leader_status===null)||(scope.row.check_main==1&&is_main_leader&&scope.row.main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leader')"></Button>
<Button v-if="scope.row.status==9&&((scope.row.re_check_leader==1&&is_leader&&scope.row.re_leader_status===null)||(scope.row.re_check_main==1&&is_main_leader&&scope.row.re_main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leaderconfirm')"></Button>
<Poptip v-if='is_guiji||is_chuzhang' transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<!-- <Button v-if="scope.row.status==1&&((scope.row.check_leader==1&&is_leader&&scope.row.leader_status===null)||(scope.row.check_main==1&&is_main_leader&&scope.row.main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leader')"></Button> -->
<!-- <Button v-if="scope.row.status==9&&((scope.row.re_check_leader==1&&is_leader&&scope.row.re_leader_status===null)||(scope.row.re_check_main==1&&is_main_leader&&scope.row.re_main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leaderconfirm')"></Button> -->
<!-- <Poptip v-if='is_guiji||is_chuzhang' transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<Button type="primary" size='small' style="margin-left:5px;margin-bottom:5px;" ghost>删除</Button>
</Poptip>
</Poptip> -->
</template>
</el-table-column>
</template>
@ -74,7 +79,42 @@ import {getInfo} from "@/api/user.js";
mission_id:''
// myself_update:0
},
sectionList:[],
total:0,
statusLabel:[{
id:-1,
value:'已撤回'
},{
id:0,
value:'待确认'
},{
id:1,
value:'待领导确认'
},{
id:2,
value:'已分发,待接收'
},{
id:3,
value:'整改中'
},{
id:4,
value:'整改中'
},{
id:5,
value:'已整改'
},{
id:6,
value:'不通过'
},{
id:7,
value:'整改中'
},{
id:8,
value:'部门退回'
},{
id:9,
value:'整改中'
}],
statusList:[{
id:-1,
value:'已撤回'
@ -110,32 +150,29 @@ import {getInfo} from "@/api/user.js";
value:'待领导审核'
}],
table:[{
type:'selection'
},{
label:"任务专题",
prop:'mission.name',
align:'left',
fixed:'left',
width:200
},{
label:"检查日期",
prop:'date',
width:120,
},{
label:"状态",
prop:'status',
width:180,
formatter:(cell,data,value,index)=>{
for(var item of this.statusList){
for(var item of this.statusLabel){
if(item.id==value){
return item.value
}
}
}
},{
label:"问题类型",
prop:'ask.value',
label:"检查日期",
prop:'date',
width:120,
},{
label:"地点",
label:"检查站点/地点",
prop:'site.name',
align:'left',
width:180,
@ -146,6 +183,15 @@ import {getInfo} from "@/api/user.js";
return cell.address
}
}
},{
label:"问题描述",
prop:'ask_introduce',
align:'left',
width:180
},{
label:"问题类型",
prop:'ask.value',
width:120,
},{
label:"问题图片",
prop:'files',
@ -180,12 +226,12 @@ import {getInfo} from "@/api/user.js";
</div>)
}
},{
label:"计划完成日期",
prop:'plan_end_date',
label:"建议整改科室",
prop:'ask_department',
width:120,
},{
label:"整改完成日期",
prop:'fix_end_date',
label:"计划整改日期",
prop:'plan_end_date',
width:120,
},{
label:"整改图片",
@ -221,16 +267,13 @@ import {getInfo} from "@/api/user.js";
</div>)
}
},{
label:"上报人",
prop:'admin.name',
label:"整改完成日期",
prop:'fix_end_date',
width:120,
},{
label:"上报时间",
prop:'created_at',
label:"上报",
prop:'up_admin.name',
width:120,
formatter:(cell,data,value,index)=>{
return value?value.substring(0,11):''
}
}],
list:[],
@ -256,6 +299,18 @@ import {getInfo} from "@/api/user.js";
this.getLeads()
},
methods: {
selectionChange(e){
console.log(e)
let arr = []
if(e.length>0){
for(var k of e){
arr.push(k.id)
}
}else{
arr = []
}
this.sectionList = arr
},
async getUserId(){
const res = await getInfo()
this.login_id = res.id
@ -333,16 +388,18 @@ import {getInfo} from "@/api/user.js";
this.$refs.showPatrol.department_id=this.department_id
this.$refs.showPatrol.isShow = true
},
deleteList(id){
deleteList(){
var that = this;
if (id) {
del(id).then(response => {
if (this.sectionList.length>0) {
del(this.sectionList[0]).then(response => {
this.$Message.success('操作成功');
that.getList();
}).catch(error => {
console.log(error)
reject(error)
})
}else{
this.$Message.warning('请选择要删除的数据');
}
}
},

@ -15,7 +15,7 @@
</Select> -->
<Button type="primary" @click="getList"></Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;" @click="editorPlan('','add')"></Button>
<Button type="primary" style="margin-left: 10px;" @click="editorPlan('','add')"></Button>
</div>
</slot>
</lx-header>
@ -29,12 +29,14 @@
@pageIndexChange="e => {select.page = e,getList()}"
:table-item="table">
<template v-slot:btns>
<el-table-column fixed="right" align='center' label="操作" width="180" header-align="center">
<el-table-column fixed="right" align='left' label="操作" width="180" header-align="center">
<template slot-scope="scope">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="editorPlan(scope.row.id,'editor')"></Button>
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="editorPlan(scope.row.id,'editor')"></Button>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<!-- <Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<Button type="primary" style="margin-right:5px;margin-bottom:5px;" size="small" ghost>删除</Button>
</Poptip>
</Poptip> -->
</template>
</el-table-column>
</template>
@ -79,8 +81,7 @@
table:[{
label:"计划名称",
prop:'name',
align:'left',
fixed:'left',
align:'left'
// width:200
},{
label:"类型",

@ -4,10 +4,10 @@
<lx-header icon="md-apps" :text="type_name" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Select v-if="path_type==1||path_type==5" filterable clearable style='width:150px;margin-right: 10px;' v-model="select.type" placeholder="任务类型">
<!-- <Select v-if="path_type==1||path_type==5" filterable clearable style='width:150px;margin-right: 10px;' v-model="select.type" placeholder="任务类型">
<Option v-for="(item,index) in typeName" v-if="index<typeName.length-1" :value="item.type">{{item.name}}</Option>
</Select>
<Select filterable clearable style='width:150px;margin-right: 10px;' v-model="select.unit_type" placeholder="任务类">
</Select> -->
<Select filterable clearable style='width:150px;margin-right: 10px;' v-model="select.unit_type" placeholder="任务类">
<Option v-for="(item,index) in unitTypeList" :value="item.id">{{item.value}}</Option>
</Select>
<Select filterable clearable style='width:150px;margin-right: 10px;' v-model="select.audit_status" placeholder="任务状态">
@ -20,10 +20,10 @@
<Input v-model="select.keyword" style="width: 150px;margin-right: 10px;" placeholder="关键字搜索" />
<Button type="primary" @click="getList" style="margin-right: 10px;">查询</Button>
<Button v-if="path_type!=5" type="primary" style="margin-right: 10px;"
<Button v-if="!(path_type==5||path_type_2==4)" type="primary" style="margin-right: 10px;"
@click="editorUnit('','add')">添加</Button>
<Button v-if="path_type!=5" type="primary" style="margin-right: 10px;"
@click="editorUnit('','add',2)">文件学习</Button>
<!-- <Button v-if="path_type!=5" type="primary" style="margin-right: 10px;"
@click="editorUnit('','add',2)">文件学习</Button> -->
</div>
</slot>
</lx-header>
@ -32,7 +32,7 @@
<el-table :data="list" style="width: 100%" class='v-table' border :height='tableHeight'>
<el-table-column type="index" align="center" fixed="left"></el-table-column>
<el-table-column type="index" align="center"></el-table-column>
<el-table-column type="expand">
<template slot-scope="props">
<div v-if="props.row.inspection.length>0">
@ -109,26 +109,34 @@
<el-tag v-else type='info'
style="margin-right: 5px;margin-bottom: 2px;">{{admin.admin.name}}</el-tag>
</span>
</div>
<div v-if="scope.row.groups.length>0">
<div v-for="group in scope.row.groups">
{{group.name}}:
<span v-if="group.type==1">
<span v-for="detail in scope.row.grounp_admin_detail">
<span v-for="detail in group.details">
<el-tag
style="margin-right: 5px;margin-bottom: 2px;">{{detail.name}}</el-tag>
</span>
<!-- <span v-for="detail in scope.row.grounp_admin_detail">
<el-tag v-if="detail.istrue"
style="margin-right: 5px;margin-bottom: 2px;">{{detail.admin.name}}</el-tag>
<el-tag v-else type='info'
style="margin-right: 5px;margin-bottom: 2px;">{{detail.admin.name}}</el-tag>
</span>
</span> -->
</span>
<span v-if="group.type==2">
<span v-for="detail in scope.row.grounp_department_detail">
<span v-for="detail in group.details">
<el-tag
style="margin-right: 5px;margin-bottom: 2px;">{{detail.name}}</el-tag>
</span>
<!-- <span v-for="detail in scope.row.grounp_department_detail">
<el-tag v-if="detail.istrue"
style="margin-right: 5px;margin-bottom: 2px;">{{detail.department.name}}</el-tag>
<el-tag v-else type='info'
style="margin-right: 5px;margin-bottom: 2px;">{{detail.department.name}}</el-tag>
</span>
</span> -->
</span>
</div>
@ -142,24 +150,27 @@
</span>
</template>
</el-table-column>
<el-table-column fixed="right" align='center' label="操作" width="180" header-align="center">
<el-table-column align='left' label="操作" width="180" header-align="center">
<template slot-scope="scope">
<div v-if="path_type==1||path_type==2">
<Button type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="checkUnits(scope.row.id,'show')"></Button>
<Button type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="editorUnit(scope.row.id,'editor')"></Button>
<Button v-if="scope.row.audit_admin_id==login_id&&scope.row.audit_status==0" style="margin-right:5px;margin-bottom:5px;" type="primary" size="small" @click="checkUnits(scope.row.id,'check')"></Button>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<!-- <Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<Button type="primary" style="margin-right:5px;margin-bottom:5px;" size="small" ghost>删除</Button>
</Poptip>
</Poptip> -->
</div>
<div v-else>
<Button type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="checkUnits(scope.row.id,'show')"></Button>
<Button v-if="!path_type_2" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="editorUnit(scope.row.id,'editor')"></Button>
<Button v-if="(!path_type_2)&&scope.row.audit_admin_id==login_id&&scope.row.audit_status==0" style="margin-right:5px;margin-bottom:5px;" type="primary" size="small" @click="checkUnits(scope.row.id,'check')"></Button>
<Button v-if="path_type_2==4||path_type_2==5" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="checkUnits(scope.row.id,'show')"></Button>
<Button v-if="scope.row.type==2&&(path_type_2==4||path_type_2==5)" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="openAsks(scope.row)"></Button>
<Button v-if="(scope.row.type!=2)&&(path_type_2==4||path_type_2==5)" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="$refs['addPatrol'].mission_id=scope.row.id,$refs['addPatrol'].isShow=true,$refs['addPatrol'].type='add'"></Button>
<Poptip v-if="path_type==4&&!path_type_2" transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<Button v-if="(scope.row.type!=2)&&(path_type_2==4||path_type_2==5)" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="$refs['addPatrol'].mission_id=scope.row.id,$refs['addPatrol'].isShow=true,$refs['addPatrol'].type='add'"></Button>
<!-- <Poptip v-if="path_type==4&&!path_type_2" transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<Button type="primary" style="margin-right:5px;margin-bottom:5px;" size="small" ghost>删除</Button>
</Poptip>
</Poptip> -->
</div>
</template>
@ -188,6 +199,9 @@
listunit,
del
} from '@/api/task/unit.js'
import {
getparameteritem
} from "@/api/system/dictionary.js";
import {getInfo} from "@/api/user.js";
export default {
@ -262,13 +276,13 @@
total: 0,
auditStatusList:[{
id:0,
value:'审核'
value:'审核'
},{
id:1,
value:'开展中'
},{
id:2,
value:'不通过'
value:'未完成'
},{
id:3,
value:'已完成'
@ -302,9 +316,8 @@
table: [{
label: "标题",
prop: 'name',
align: 'left',
// fixed:'left',
width: 200
// width: 200
}, {
label: "状态",
prop: 'audit_status',
@ -327,29 +340,28 @@
prop: 'end_date',
width: 120,
align:'center'
}, {
},
// {
// label: "",
// prop: 'type',
// width: 120,
// align:'center',
// formatter: (cell, data, value, index) => {
// return value == 1 ? '' : (value == 2 ? '' : (value == 3 ? '' : (value == 4 ? '' : '')))
// }
// },
{
label: "任务类型",
prop: 'type',
width: 120,
align:'center',
formatter: (cell, data, value, index) => {
return value == 1 ? '专项任务' : (value == 2 ? '文件学习培训' : (value == 3 ? '事件隐患任务' : (value == 4 ? '科室任务' : '')))
}
}, {
label: "任务类别",
prop: 'unit_type',
width: 120,
align:'center',
formatter: (cell, data, value, index) => {
return value == 1 ? '专项检查' : (value == 2 ? '资料收集' : (value == 3 ? '网络安全' : ''))
}
}, {
label: "完成要求",
prop: 'end_type',
width: 180,
align:'center',
formatter: (cell, data, value, index) => {
return value == 1 ? '提交文字' : (value == 2 ? '提交附件' : (value == 3 ? '提交文字与附件' : (value == 4 ? '查看即可' : (value == 5 ? '需要答题' : ''))))
formatter: (cell, data, value, index) => {
this.unitTypeList.map(item=>{
if(value==item.id){
return item.value
}
})
// return value == 1 ? '' : (value == 2 ? '' : (value == 3 ? '' : ''))
}
}, {
label: "参与人员",
@ -451,11 +463,17 @@
}
}
console.log("this.path_type ",this.path_type)
this.getUnitTypeList()
this.getUserId()
this.getList()
this.getList()
},
watch: {},
methods: {
methods: {
async getUnitTypeList(){
const res = await getparameteritem('unitTypeList')
this.unitTypeList = res.detail
},
initHeight() {
var that = this;
var clientHeight = document.documentElement.clientHeight

Loading…
Cancel
Save