master
lion 3 years ago
parent baa04b7633
commit 87aaa4e43a

@ -371,12 +371,19 @@
type: "string",
align: "center"
},
{
field: "created_at",
title: "提交时间",
type: "string",
align: "center"
{
field: "admin_id",
title: "提交人",
type: "string",
align: "center",
width:180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width:180
},
{
field: "操作",

@ -237,6 +237,20 @@ import AvueMap from 'avue-plugin-map'
title: "状态",
type: "status",
align: "center"
},
{
field: "admin_id",
title: "提交人",
type: "string",
align: "center",
width:180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width:180
},
{
field: "操作",

@ -209,6 +209,20 @@ import AvueMap from 'avue-plugin-map'
title: "状态",
type: "status",
align: "center"
},
{
field: "admin_id",
title: "提交人",
type: "string",
align: "center",
width:180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width:180
},
{
field: "操作",

@ -36,8 +36,11 @@
<el-tag type="warning" v-if="scope.row[column.field]==3"></el-tag>
</div>
<div v-else-if="column.type=='feedback_department_id'">
<div v-for="item in selects.departments" v-if="scope.row[column.field] == item.id">
{{item.name}}
<div v-for="item in selects.departments">
<div v-if="scope.row[column.field] == item.id">
{{item.name}}
</div>
</div>
</div>
<div v-else-if="column.type=='ask_type_id'">
@ -381,28 +384,28 @@
field: "feedback_department_id",
title: "反馈科室",
type: "feedback_department_id",
width:140
width:180
},
{
field: "ask_type_name",
title: "类型",
type: "ask_type_id",
align: "center",
width:140
width:180
},
{
field: "ask_content_name",
title: "内容",
type: "string",
align: "center",
width:140
width:180
},
{
field: "address",
title: "地址",
type: "string",
align: "lefft",
width:400
width:360
},
{
@ -410,33 +413,33 @@
title: "状态",
type: "status",
align: "center",
width:140
width:120
},
{
field: "username",
title: "提交人",
type: "user",
align: "center",
width:140
width:180
},
{
field: "department_id",
title: "提交科室",
type: "string",
align: "center",
width:140
width:180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width:200
width:180
},
{
field: "操作",
title: "操作",
width: 200,
width: 220,
type: "opt",
fixed:"right"
}

@ -1,8 +0,0 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -232,13 +232,15 @@
field: "admin_id",
title: "提交人",
type: "string",
align: "center"
align: "center",
width:180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center"
align: "center",
width:180
},
{
field: "操作",

@ -15,9 +15,9 @@
</div>
<div ref="lxTable">
<el-table :data="tableData" class="v-table" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" label="序号" align="center"> </el-table-column>
<el-table-column type="index" width="50" label="序号" fixed align="center"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
:label="column.title" :width="column.width" :fixed="column.fixed">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="edit(scope.row)" type="primary"
@ -25,8 +25,10 @@
<Button ghost size="small" @click="del(scope.row)" type="error" style="margin-left: 10px;">删除</Button>
</div>
<div v-else-if="column.type=='type'">
<div v-for="item in siteType" v-if="scope.row[column.field]==item.id">
<div v-for="item in siteType">
<div v-if="scope.row[column.field]==item.id">
{{item.value}}
</div>
</div>
</div>
<div v-else>{{scope.row[column.field]}}</div>
@ -206,59 +208,64 @@
field: "name",
title: "工地名称",
type: "string",
align: "center"
align: "left",
width:240
},
{
field: "number",
title: "工地编号",
type: "string",
align: "center"
align: "left",
width:180
},
{
field: "type",
title: "工地类型",
type: "type",
align: "center"
align: "center",
width:120
},
{
field: "link_name",
title: "联系人",
type: "string",
align: "center",
width:100
width:120
},
{
field: "link_mobile",
title: "联系电话",
type: "string",
align: "center"
align: "center",
width:120
},
{
field: "statusName",
title: "状态",
type: "string",
align: "center",
width:100
width:120
},
{
field: "admin_id",
title: "提交人",
type: "string",
align: "center"
align: "center",
width:120
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width:200
width:180
},
{
field: "操作",
title: "操作",
width: 220,
type: "opt",
type: "opt",
fixed:'right'
}
],
}

@ -773,21 +773,21 @@
title: "地址",
type: "string",
align: "left",
width: 400
width: 360
},
{
field: "type",
title: "类型",
type: "type",
align: "left",
width: 160
align: "center",
width: 180
},
{
field: "status",
title: "状态",
type: "status",
align: "center",
width: 160
width: 180
},
// {
// field: "end_type",
@ -801,14 +801,14 @@
title: "提交人",
type: "string",
align: "center",
width: 160
width: 180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width: 200
width: 180
},
{
field: "操作",

@ -209,7 +209,7 @@
title: "巡查名称",
type: "string",
align: "left",
width:250
width:240
},
{
field: "item_type_name",
@ -229,7 +229,7 @@
field: "day",
title: "循环机制",
type: "string",
width:180,
width:120,
align: "center"
},
@ -237,7 +237,7 @@
field: "daterange",
title: "巡查周期",
type: "daterange",
width:220,
width:240,
align:'center'
},
@ -253,7 +253,7 @@
title: "提交日期",
type: "string",
align: "center",
width:200,
width:180,
align:'center'
},
{
@ -319,7 +319,7 @@
}
}
m.area_name = m.area_info.name
m.responsibleName = m.responsible?m.responsible.name :""
m.responsibleName = m.responsible?m.responsible.name :""
}
this.tableData = response.data;
this.paginations.total = response.total;

@ -821,21 +821,21 @@
title: "地址/排放点",
type: "string",
align: "left",
width:400
width:360
},
{
field: "type",
title: "类型",
type: "type",
align: "left",
width:160
align: "center",
width:180
},
{
field: "status",
title: "状态",
type: "status",
align: "center",
width:160
width:180
},
// {
// field: "end_type",
@ -849,14 +849,14 @@
title: "提交人",
type: "string",
align: "center",
width:160
width:180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width:200
width:180
},
{
field: "操作",

@ -209,7 +209,7 @@
title: "养护名称",
type: "string",
align: "left",
width:250
width:240
},
{
field: "item_type_name",
@ -229,7 +229,7 @@
field: "day",
title: "循环机制",
type: "string",
width:180,
width:120,
align: "center"
},
@ -237,7 +237,7 @@
field: "daterange",
title: "养护周期",
type: "daterange",
width:220,
width:240,
align:'center'
},
@ -253,7 +253,7 @@
title: "提交日期",
type: "string",
align: "center",
width:200,
width:180,
align:'center'
},
{

@ -15,9 +15,9 @@
</div>
<div ref="lxTable">
<el-table :data="tableData" class="v-table" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" label="序号" align="center"> </el-table-column>
<el-table-column type="index" width="50" fixed label="序号" align="center"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
:label="column.title" :width="column.width" :fixed="column.fixed">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="edit(scope.row)" type="primary"
@ -238,44 +238,51 @@
field: "accept_date",
title: "接收日期",
type: "string",
align: "center"
align: "left",
width:180
},
{
field: "fromName",
title: "来源",
type: "string",
align: "center"
align: "center",
width:120
},
{
field: "areaName",
title: "所属片区",
type: "string",
align: "center"
align: "center",
width:180
},
{
field: "levelName",
title: "处理等级",
type: "string",
align: "center"
align: "center",
width:180
},
{
field: "admin_id",
title: "提交人",
type: "string",
align: "center"
align: "center",
width:180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center"
align: "center",
width:180
},
{
field: "操作",
title: "操作",
width: 220,
type: "opt",
type: "opt",
fixed:"right"
}
],
}

@ -1,338 +0,0 @@
<template>
<div class="container">
<div style="padding: 0px 20px">
<div ref="lxHeader">
<LxHeader icon="md-apps" text="安全生产任务上报" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.KeyWord" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
</div>
</slot>
</LxHeader>
</div>
<div ref="lxTable">
<el-table :data="tableData" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" align="center"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
<template slot-scope="scope">
<div v-for="safe in scope.row.safety_task_departments" v-if="safe.departments.id==department_user_id">
<div v-if="column.type=='status'">
<div v-for="item in isStatus" v-if="safe.status==item.id">
{{item.name}}
</div>
</div>
<div v-else-if="column.type=='opt'">
<Button v-if="safe.status==0" ghost size="small" @click="edit(scope.row)" type="primary"
style="margin-left: 10px;">新增上报</Button>
<Button v-if="safe.status==1" ghost size="small" @click="edit(safe,true)" type="primary"
style="margin-left: 10px;">编辑上报</Button>
<Button v-if="safe.status==2" ghost size="small" @click="show(safe)" type="primary"
style="margin-left: 10px;">查看上报</Button>
</div>
<div v-else>{{scope.row[column.field]}}</div>
</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</div>
</div>
<el-dialog title="安全生产任务上报编辑" :visible.sync="dialogFormVisible" fullscreen width="90%">
<div class="dialogConcent" :style="{height:clientHeight+'px'}">
<el-scrollbar style="flex: 1">
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="内容" prop="content">
<div style="width: 99.9%;">
</div>
</el-form-item>
<el-form-item label="附件" prop="file_list">
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
action="/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
:on-exceed="handleExceed" :file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer" v-if="!isReportSave">
<el-button @click="resetForm('form')"> </el-button>
<el-button type="primary" v-preventReClick @click="submitForm('form','1')"> </el-button>
</div>
<div slot="footer" class="dialog-footer" v-if="isReportSave">
<el-button @click="resetForm('form')"> </el-button>
<el-button type="primary" v-preventReClick @click="submitForm('form','1')"> </el-button>
<el-button type="primary" v-preventReClick @click="submitForm('form', '2')"> </el-button>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import {
getToken
} from '@/utils/auth'
import LxHeader from "@/components/LxHeader/index.vue";
export default {
components: {
LxHeader
},
data() {
return {
isReportSave: false,
checkAll: false,
isIndeterminate: true,
department_user_id: "",
paginations: {
page: 1,
page_size: 15,
total: 0
},
show_self: 1,
tableHeight: 0,
dialogFormVisible: false,
dialogShowViewVisible: false,
formLabelWidth: "120px",
clientHeight: 0,
form: {
content: "",
file_list: "",
},
fileList: [],
tableData: [],
rules: {
content: [{
required: true,
message: '请输入内容',
trigger: 'blur'
}]
},
tableHeight: 900,
searchFields: {
KeyWord: ""
},
columns: [{
field: "title",
title: "任务名称",
type: "string"
},
{
field: "start_date",
title: "开始时间",
type: "date",
width: 160,
align: "center"
},
{
field: "end_date",
title: "结束时间",
type: "date",
width: 160,
align: "center"
},
{
field: "status",
title: "上报状态",
type: "status",
width: 180,
align: "center"
},
{
field: "操作",
title: "操作",
width: 220,
type: "opt",
}
],
uploadOther: {
token: ""
},
deptOptions: [],
isStatus: [{
id: 0,
name: "未上报",
opt: "上报"
}, {
id: 1,
name: "已保存",
opt: "编辑上报"
}, {
id: 2,
name: "已上报",
opt: "查看"
}]
}
},
created() {
this.uploadOther.token = getToken();
this.initLoad();
this.load();
},
methods: {
initLoad() {
var that = this;
var clientHeight = document.documentElement.clientHeight
var lxHeader_height = 96.5; //
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
load() {
getInfo({
// token:this.uploadOther.token;
}).then(response => {
this.department_user_id = response.department_id
}).catch(error => {
console.log(error)
reject(error)
});
listtask({
page: this.paginations.page,
page_size: this.paginations.page_size,
show_self: this.show_self
}).then(response => {
this.tableData = response.data;
this.paginations.page_size = response.total;
}).catch(error => {
console.log(error)
reject(error)
});
},
show(obj) {
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
this.dialogViewVisible = false;
this.dialogShowViewVisible = true;
this.info(obj);
},
info(obj) {
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
// this.$set(that.form,res);
that.form = result;
let _files = [];
for (var mod of result.files) {
let m = Object.assign({}, mod);
m.name = mod.original_name;
_files.push(m);
}
that.form.safety_task_department_id = result.id;
that.form.safety_task_id = result.safety_task_id;
that.fileList = _files;
this.$refs.tinymce.setContent(result.content);
}).catch(error => {
//reject(error)
})
},
edit(obj, isnew) {
this.form = this.$options.data().form;
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
if (isnew) {
var that = this;
that.form.content = "";
that.info(obj);
this.isReportSave = true;
} else {
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
this.form.safety_task_id = obj.id;
this.isReportSave = false;
}
this.dialogFormVisible = true;
},
editSave(obj) {
},
submitForm(formName, status) {
var that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
if (status == "2") {
that.form.status = status;
submitsave(that.form).then(response => {
//console.log(response)
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
} else {
save(that.form).then(response => {
//console.log(response)
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
}
that.fileList = [];
} else {
this.$Message.error('数据校验失败');
console.log('error submit!!');
return false;
}
});
},
handleRemove(file, fileList) {
console.log(fileList);
let listUrl = [];
for (var m of fileList) {
if (m.response)
listUrl.push(m.response.id);
else
listUrl.push(m.id);
}
this.form.file_list = listUrl;
},
handleExceed(files, fileList) {},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${ file.name }`);
},
handlesuccess(response, file, fileList) {
console.log(fileList);
let listUrl = [];
for (var m of fileList) {
if (m.response)
listUrl.push(m.response.id);
else
listUrl.push(m.id);
}
this.form.file_list = listUrl;
},
resetForm(formName) {
var that = this;
that.fileList = [];
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
that.dialogShowViewVisible = false;
},
}
}
</script>
<style>
.dialogConcent {
overflow-y: auto;
}
</style>

@ -1,9 +0,0 @@
<!--涉水审批-->
<template>
</template>
<script>
</script>
<style>
</style>
Loading…
Cancel
Save