|
|
|
|
@ -35,6 +35,16 @@
|
|
|
|
|
<div v-if="scope.row[column.field]==2">已审核</div>
|
|
|
|
|
<div v-if="scope.row[column.field]==3">已办结</div>
|
|
|
|
|
</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>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="column.type=='ask_type_id'">
|
|
|
|
|
<div v-for="item in selects.ask_types" v-if="scope.row[column.field] == item.id">
|
|
|
|
|
{{item.value}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>{{scope.row[column.field]}}</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
@ -48,26 +58,27 @@
|
|
|
|
|
|
|
|
|
|
<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-scrollbar style="flex: 1">
|
|
|
|
|
<el-form :model="formdetail" :rules="rules" ref="formdetail" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="类型" prop="from_id">
|
|
|
|
|
<el-select class="width100" v-model="form.from_id" placeholder="请选择类型">
|
|
|
|
|
<!-- <el-option v-for="item in selects.activityMain" :key="item.id" :label="item.value"
|
|
|
|
|
<el-form-item label="类型" prop="ask_type_id">
|
|
|
|
|
{{formdetail.ask_type_detail.value}}
|
|
|
|
|
<!-- <el-select @change="showAskContent" class="width100" v-model="form.ask_type_id" placeholder="请选择类型">
|
|
|
|
|
<el-option v-for="item in selects.ask_types" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
</el-option> -->
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="内容" prop="type_id">
|
|
|
|
|
<el-select class="width100" v-model="form.type_id" placeholder="请选择内容">
|
|
|
|
|
<!-- <el-option v-for="item in selects.activityType" :key="item.id" :label="item.value"
|
|
|
|
|
<el-form-item label="内容" prop="ask_content_id">
|
|
|
|
|
{{formdetail.ask_content_detail.value}}
|
|
|
|
|
<!-- <el-select class="width100" v-model="form.ask_content_id" placeholder="请选择内容">
|
|
|
|
|
<el-option v-for="item in selects.ask_content" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
</el-option> -->
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
@ -75,9 +86,6 @@
|
|
|
|
|
<el-input type="textarea" v-model="form.author" placeholder="请填写详情" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="备注" prop="type_id">
|
|
|
|
|
<el-input type="textarea" v-model="form.author" placeholder="请填写备注" autocomplete="off"></el-input>
|
|
|
|
|
@ -93,7 +101,7 @@
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="8" v-if="form.status==3">
|
|
|
|
|
<el-form-item label="反馈科室" prop="type_id">
|
|
|
|
|
<el-select class="width100" v-model="form.type_id" placeholder="请选择反馈科室">
|
|
|
|
|
@ -103,8 +111,8 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -131,7 +139,14 @@
|
|
|
|
|
update,
|
|
|
|
|
save,
|
|
|
|
|
del
|
|
|
|
|
} from '../../api/commonInspection/index.js'
|
|
|
|
|
} from '../../api/commonInspection/index.js'
|
|
|
|
|
import {
|
|
|
|
|
listdept
|
|
|
|
|
} from "../../api/system/department.js"
|
|
|
|
|
import {
|
|
|
|
|
getparameteritem,
|
|
|
|
|
getparameter
|
|
|
|
|
} from "../../api/system/dictionary.js"
|
|
|
|
|
import LxHeader from "@/components/LxHeader/index.vue";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
@ -145,16 +160,7 @@
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
formLabelWidth: "120px",
|
|
|
|
|
clientHeight: 0,
|
|
|
|
|
tableData: [{
|
|
|
|
|
feedback_department_id:"",
|
|
|
|
|
ask_type_id:"",
|
|
|
|
|
ask_content_id:"",
|
|
|
|
|
content:"",
|
|
|
|
|
longitude:"",
|
|
|
|
|
latitude:"",
|
|
|
|
|
address:"",
|
|
|
|
|
status:1}
|
|
|
|
|
],
|
|
|
|
|
tableData: [],
|
|
|
|
|
tableHeight: 900,
|
|
|
|
|
searchFields: {
|
|
|
|
|
KeyWord: ""
|
|
|
|
|
@ -163,6 +169,15 @@
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 15,
|
|
|
|
|
total: 0
|
|
|
|
|
},
|
|
|
|
|
selects:{
|
|
|
|
|
ask_types:[],
|
|
|
|
|
ask_content:[],
|
|
|
|
|
departments:[]
|
|
|
|
|
},
|
|
|
|
|
formdetail:{
|
|
|
|
|
ask_type_detail:"",
|
|
|
|
|
ask_content_detail:"",
|
|
|
|
|
},
|
|
|
|
|
form: {
|
|
|
|
|
feedback_department_id:"",
|
|
|
|
|
@ -182,13 +197,12 @@
|
|
|
|
|
columns: [{
|
|
|
|
|
field: "feedback_department_id",
|
|
|
|
|
title: "反馈科室",
|
|
|
|
|
type: "string"
|
|
|
|
|
type: "feedback_department_id"
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
field: "ask_type_id",
|
|
|
|
|
title: "类型",
|
|
|
|
|
type: "string",
|
|
|
|
|
type: "ask_type_id",
|
|
|
|
|
align: "center"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@ -210,22 +224,23 @@
|
|
|
|
|
align: "center"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "person",
|
|
|
|
|
field: "username",
|
|
|
|
|
title: "提交人",
|
|
|
|
|
type: "string",
|
|
|
|
|
type: "user",
|
|
|
|
|
align: "center"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "parimary",
|
|
|
|
|
field: "department_id",
|
|
|
|
|
title: "提交科室",
|
|
|
|
|
type: "string",
|
|
|
|
|
align: "center"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "date",
|
|
|
|
|
field: "created_at",
|
|
|
|
|
title: "提交日期",
|
|
|
|
|
type: "string",
|
|
|
|
|
align: "center"
|
|
|
|
|
align: "center",
|
|
|
|
|
width:200
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "操作",
|
|
|
|
|
@ -266,7 +281,17 @@
|
|
|
|
|
var paginationHeight = 37; //分页的高度
|
|
|
|
|
var topHeight = 50; //页面 头部
|
|
|
|
|
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
|
|
|
|
|
|
getparameteritem("general_type").then(res => {
|
|
|
|
|
this.selects.ask_types = res.detail
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
listdept().then(res => {
|
|
|
|
|
this.selects.departments = res
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(page) {
|
|
|
|
|
this.paginations.page = page;
|
|
|
|
|
@ -278,8 +303,11 @@
|
|
|
|
|
page: this.paginations.page,
|
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
|
keyword: this.searchFields.KeyWord
|
|
|
|
|
}).then(response => {
|
|
|
|
|
// this.tableData = response.data;
|
|
|
|
|
}).then(response => {
|
|
|
|
|
for(var m of response.data){
|
|
|
|
|
m.username = m.user.name
|
|
|
|
|
}
|
|
|
|
|
this.tableData = response.data;
|
|
|
|
|
this.paginations.total = response.total;
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
@ -297,15 +325,19 @@
|
|
|
|
|
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.fileList = _files;
|
|
|
|
|
// this.$set(that.form,res);
|
|
|
|
|
// showAskContent(result.ask_type_id);
|
|
|
|
|
// that.form = result;
|
|
|
|
|
that.formdetail = result;
|
|
|
|
|
console.log(that.formdetail);
|
|
|
|
|
|
|
|
|
|
// let _files = [];
|
|
|
|
|
// for (var mod of result.files) {
|
|
|
|
|
// let m = Object.assign({}, mod);
|
|
|
|
|
// m.name = mod.original_name;
|
|
|
|
|
// _files.push(m);
|
|
|
|
|
// }
|
|
|
|
|
// that.fileList = _files;
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
//reject(error)
|
|
|
|
|
})
|
|
|
|
|
@ -313,17 +345,20 @@
|
|
|
|
|
|
|
|
|
|
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.clientHeight = document.documentElement.clientHeight - 84 - 110;
|
|
|
|
|
if(obj){
|
|
|
|
|
this.info(obj);
|
|
|
|
|
}
|
|
|
|
|
// 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;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -382,11 +417,18 @@
|
|
|
|
|
},
|
|
|
|
|
resetForm(formName) {
|
|
|
|
|
var that = this;
|
|
|
|
|
that.fileList = [];
|
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
|
// that.fileList = [];
|
|
|
|
|
// this.$refs[formName].resetFields();
|
|
|
|
|
that.dialogFormVisible = false;
|
|
|
|
|
that.dialogShowViewVisible = false;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
showAskContent(val){
|
|
|
|
|
getparameter({
|
|
|
|
|
pid:val
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.selects.ask_content = res.detail
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleRemove(file, fileList) {
|
|
|
|
|
console.log(fileList);
|
|
|
|
|
|