<template>
|
<el-main>
|
<!--案件来源登记表-->
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="150px"
|
:disabled="dataForm.registerState == '1'">
|
<h3>案件信息:</h3>
|
<div>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="案例名称" prop="caseName">
|
<el-input v-model="dataForm.caseName"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="登记号" prop="registerNo">
|
<el-input v-model="dataForm.registerNo"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="登记时间">
|
<el-date-picker
|
v-model="dataForm.registerTime"
|
type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="选择登记时间"
|
style="width: 100%"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="来源类别" prop="sourceType">
|
<el-select v-model="dataForm.sourceType" placeholder="请选择案件来源" style="width: 100%"
|
@change="changeType(dataForm.sourceType)">
|
<el-option
|
v-for="item in caseSourceList"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item v-show="qita" label="其他来源" prop="otherSource">
|
<el-input v-model="dataForm.otherSource"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
<div v-show="xuncha">
|
<h3>监督巡查人:</h3>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="姓名" prop="fieldOne">
|
<el-input v-model="dataForm.fieldOne"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="所属单位" prop="affiliatedUnitOne">
|
<el-input v-model="dataForm.affiliatedUnitOne"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="姓名" prop="fieldTwo">
|
<el-input v-model="dataForm.fieldTwo"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="所属单位" prop="affiliatedUnitTwo">
|
<el-input v-model="dataForm.affiliatedUnitTwo"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
</div>
|
<div v-show="tousu">
|
<h3>投诉人、举报人:</h3>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="单位名称" prop="whistleblowerUnit">
|
<el-input v-model="dataForm.whistleblowerUnit"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="法定代表人(负责人)" prop="legalPerson">
|
<el-input v-model="dataForm.legalPerson"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="个人姓名" prop="name">
|
<el-input v-model="dataForm.name"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="身份证号码" prop="identificationNumber">
|
<el-input v-model="dataForm.identificationNumber"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="联系电话" prop="contactNumber">
|
<el-input v-model="dataForm.contactNumber"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="其他联系方式" prop="otherPhone">
|
<el-input v-model="dataForm.otherPhone"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="联系地址" prop="contactAddress">
|
<el-input v-model="dataForm.contactAddress"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
<div v-show="yisong">
|
<h3>移送、交办部门:</h3>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="名称" prop="departmentName">
|
<el-input v-model="dataForm.departmentName"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="联系人" prop="departmentMan">
|
<el-input v-model="dataForm.departmentMan"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="联系电话" prop="departmentPhone">
|
<el-input v-model="dataForm.departmentPhone"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="联系地址" prop="departmentAddress">
|
<el-input v-model="dataForm.departmentAddress"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
<h3>当事人信息:</h3>
|
<div>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="姓名" prop="litigant">
|
<el-input v-model="dataForm.litigant"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="住所" prop="address">
|
<el-input v-model="dataForm.address"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="联系电话" prop="phone">
|
<el-input v-model="dataForm.phone"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="其他联系方式" prop="otherLink">
|
<el-input v-model="dataForm.otherLink"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
<h3>案件内容与处理意见:</h3>
|
<div>
|
<el-row>
|
<el-form-item label="案件登记内容" prop="caseContent">
|
<el-input type="textarea" v-model="dataForm.caseContent"></el-input>
|
</el-form-item>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="登记人" prop="signName">
|
<el-input v-model="dataForm.signName"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="签字时间">
|
<el-date-picker
|
v-model="dataForm.signTime"
|
type="date"
|
:value-format="`yyyy-MM-dd`"
|
placeholder="选择日期"
|
style="width: 100%"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-form-item label="案源处理意见" prop="caseHandlingOpinions">
|
<el-input type="textarea" :rows="2" v-model="dataForm.caseHandlingOpinions"
|
></el-input>
|
</el-form-item>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="案件处理人" prop="personId">
|
<el-select v-model="dataForm.personId" clearable filterable multiple :multiple-limit="2"
|
placeholder="请选择" style="width: 100%;" @change="setPersonname($event)">
|
<el-option
|
v-for="item in organPersons"
|
:key="item.userId"
|
:label="item.realName"
|
:value="item.userId">
|
<span style="float: left">{{ item.realName }}</span>
|
<span style="float: right; color: #8492a6; font-size: 13px">执法证号:{{ item.lawCert }}</span>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="办案机构负责人" prop="chargePerson">
|
<el-input v-model="dataForm.chargePerson"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="批示时间">
|
<el-date-picker
|
v-model="dataForm.opinionTime"
|
type="date"
|
:value-format="`yyyy-MM-dd`"
|
placeholder="选择日期"
|
style="width: 100%"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="是否立案" prop="isCase">
|
<el-select v-model="dataForm.isCase" placeholder="请选择是否立案" style="width: 100%">
|
<el-option
|
v-for="item in whetherList"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<!-- <el-row>
|
<el-col :span="12">
|
<el-form-item label="是否本单位管辖" prop="isAccept">
|
<el-select v-model="dataForm.isAccept" placeholder="请选择是否本单位管辖" style="width: 100%">
|
<el-option
|
v-for="item in whetherList"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="移送单位" prop="transferUnit">
|
<el-input v-model="dataForm.transferUnit"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>-->
|
<el-row>
|
<el-form-item label="备注" prop="remarkes">
|
<el-input v-model="dataForm.remarkes"></el-input>
|
</el-form-item>
|
</el-row>
|
</div>
|
<WordView ref="wordInfo" :isShowYulan="showView" @cancel="cancelWord"></WordView>
|
</el-form>
|
<div style="text-align: center;">
|
<el-button v-show="dataForm.registerState != '1'" plain @click="dataFormSubmit('0')">保存</el-button>
|
<el-button v-show="dataForm.registerState != '1'" type="warning" plain @click="dataFormSubmit('1')">定稿</el-button>
|
<el-button type="primary" plain @click="viewVord(dataForm)">预览</el-button>
|
<el-button type="success" plain @click="downloadWord(dataForm)">下载</el-button>
|
</div>
|
</el-main>
|
</template>
|
<script>
|
import {getObj, saveObj} from "@/api/News/caseRegister";
|
import {getfindAll} from "@/api/News/useres";
|
import publicOpinion from "@/views/News/publicOpinion"
|
import WordView from '@/views/News/word-view/index'
|
import moment from "moment";
|
import {remote} from "@/api/admin/dict";
|
|
|
export default {
|
name: "fileCase",
|
props: ["isShowYulan", 'id', 'processId'],
|
components: {
|
publicOpinion,
|
WordView
|
},
|
data() {
|
return {
|
showView: false,
|
visible: false,
|
submitLoading: false,
|
xuncha: true,
|
tousu: false,
|
yisong: false,
|
qita: false,
|
persons: [],
|
dataForm: {
|
caseName: '',//案例名称
|
registerNo: '',//登记号
|
registerTime: '',//登记时间
|
sourceType: '',//来源类别
|
otherSource: '',//其他来源
|
fieldOne: '',
|
affiliatedUnitOne:'',
|
fieldTwo: '',
|
affiliatedUnitTwo:'',
|
whistleblowerUnit:'',
|
name:'',
|
identificationNumber:'',
|
contactNumber:'',
|
otherPhone:'',
|
contactAddress:'',
|
departmentName:'',
|
departmentMan:'',
|
departmentPhone:'',
|
departmentAddress:'',
|
litigant: '',
|
address: '',
|
phone: '',
|
otherLink: '',
|
caseContent: '',
|
signName: '',
|
signTime: '',
|
handlePerson: '',
|
personId: '',
|
chargePerson: '',
|
opinionTime: '',
|
remarkes: '',
|
isCase: '',
|
isAccept: '',
|
transferUnit: '',
|
registerState: '0',
|
caseHandlingOpinions: '',
|
//来源数据
|
},
|
dataRule: {},
|
organPersons: [],
|
caseSourceList: [],
|
whetherList:[]
|
}
|
},
|
created() {
|
this.init()
|
this.getDataType()
|
},
|
methods: {
|
init() {
|
//查询用户
|
getfindAll().then(res => {
|
this.organPersons = res.data.data;
|
});
|
getObj(this.id).then((res) => {
|
if (res.data.code == 0) {
|
// 转换null为""
|
let v = res.data.data;
|
for (let attr in v) {
|
if (v[attr] == null) {
|
v[attr] = "";
|
}
|
}
|
let str = JSON.stringify(v);
|
let data = JSON.parse(str);
|
this.dataForm = data;
|
|
if (this.dataForm.personId != "") {
|
let ids = [];
|
this.dataForm.personId.split(",").forEach(o => {
|
ids.push(parseInt(o));
|
})
|
this.dataForm.personId = ids;
|
}
|
//根据来源更改页面内容
|
this.changeType(this.dataForm.sourceType);
|
}
|
});
|
|
},
|
//获取来源
|
getDataType() {
|
remote('caseSource_Type').then(res => {
|
this.caseSourceList = res.data.data
|
}),
|
remote('document_type').then(res => {
|
this.certList = res.data.data
|
}),
|
remote('whether').then(res => {
|
this.whetherList = res.data.data
|
})
|
},
|
/*reset() {
|
this.dataForm = {}
|
},*/
|
cancel() {
|
this.$emit('cancel', false);
|
},
|
dataFormSubmit(type) {
|
this.$refs['dataForm'].validate((valid) => {
|
if (valid) {
|
let obj = this;
|
if ("1" == type) {
|
this.$confirm('保存为定稿将不能修改,是否继续?', '提示', {
|
confirmButtonText: '是',
|
cancelButtonText: '否',
|
type: 'warning'
|
}).then(function () {
|
obj.submitLoading = true;
|
obj.dataForm.registerState = type;
|
obj.dataForm.registerId = obj.id;
|
// obj.dataForm.publicOpinion = obj.$refs.publicOpinion.opinionForm;
|
obj.dataForm.processId = obj.processId;
|
obj.dataForm.personId = obj.dataForm.personId.toString();
|
if (obj.dataForm.personId.length < 1) {
|
obj.dataForm.handlePerson = '';
|
}
|
saveObj(obj.dataForm).then((res) => {
|
obj.submitLoading = false;
|
if (res.data.code == 0) {
|
obj.$message.success("操作成功");
|
obj.cancel();
|
obj.$emit('getDataList');
|
}
|
})
|
})
|
} else {
|
this.submitLoading = true;
|
this.dataForm.registerState = type;
|
this.dataForm.registerId = obj.id;
|
// this.dataForm.publicOpinion = this.$refs.publicOpinion.opinionForm;
|
this.dataForm.processId = this.processId;
|
this.dataForm.personId = this.dataForm.personId.toString();
|
if (this.dataForm.personId.length < 1) {
|
this.dataForm.handlePerson = '';
|
}
|
saveObj(this.dataForm).then((res) => {
|
this.submitLoading = false;
|
if (res.data.code == 0) {
|
this.$message.success("操作成功");
|
this.cancel();
|
obj.$emit('getDataList');
|
}
|
})
|
}
|
}
|
})
|
},
|
// 来源类别与其他来源绑定
|
changeType(value) {
|
if ('巡查发现' == value) {
|
this.xuncha = true;
|
this.yisong = false;
|
this.tousu = false;
|
this.qita = false;
|
// this.dataForm.fieldFive = '';
|
// this.dataForm.fieldSix = '';
|
// this.dataForm.fieldSeven = '';
|
// this.dataForm.otherSource = '';
|
} else if ('投诉、举报' == value) {
|
this.xuncha = false;
|
this.yisong = false;
|
this.tousu = true;
|
this.qita = false;
|
} else if (value == '其他部门移送' || value == '上级交办') {
|
this.xuncha = false;
|
this.yisong = true;
|
this.tousu = false;
|
this.qita = false;
|
// this.dataForm.fieldThree = '';
|
// this.dataForm.fieldFour = '';
|
// this.dataForm.fieldSeven = '';
|
// this.dataForm.otherSource = '';
|
} else {
|
this.qita = true;
|
this.xuncha = false;
|
this.yisong = false;
|
this.tousu = false;
|
// this.dataForm.fieldOne = '';
|
// this.dataForm.fieldTwo = '';
|
// this.dataForm.fieldThree = '';
|
// this.dataForm.fieldFour = '';
|
// this.dataForm.fieldFive = '';
|
// this.dataForm.fieldSix = '';
|
// this.dataForm.fieldSeven = '';
|
}
|
|
},
|
cancelWord() {
|
this.showView = false;
|
},
|
viewVord(data) {
|
if(data.registerState == null || data.registerState == ""){
|
//预览前先进行保存
|
data.registerState = '0';
|
data.registerId = this.id;
|
data.processId = this.processId;
|
saveObj(data).then((res) => {
|
})
|
}
|
//↓↓↓↓↓↓以下部分根据具体业务修改↓↓↓↓↓↓
|
//格式转换
|
let wordData = this.transforData(data);
|
//↑↑↑↑↑↑以上部分根据具体业务修改↑↑↑↑↑↑
|
this.showView = true;
|
this.$nextTick(() => {
|
this.$refs.wordInfo.init(wordData, "/wordes/ajlydjb.docx");
|
})
|
},
|
downloadWord(data) {
|
if(data.registerState == null || data.registerState == ""){
|
//预览前先进行保存
|
data.registerState = '0';
|
data.registerId = this.id;
|
data.processId = this.processId;
|
saveObj(data).then((res) => {
|
})
|
}
|
let wordData = this.transforData(data);
|
WordView.methods.exportDoc(wordData, "/wordes/ajlydjb.docx", "案件来源登记表.docx");
|
},
|
transforData(obj) {
|
let s = JSON.stringify(obj);
|
let data = JSON.parse(s);
|
|
if(data.handlePerson != null && data.handlePerson.indexOf(",") > 0) {
|
data.handlePerson = data.handlePerson.replace(",","、");
|
}
|
|
if (data.sourceType == "巡查发现"){
|
data.xun = true;
|
data.cha = false;
|
}else {
|
data.xun = false;
|
data.cha = true;
|
}
|
|
if (data.sourceType == "投诉、举报"){
|
data.tou = true;
|
data.su = false;
|
}else {
|
data.tou = false;
|
data.su = true;
|
}
|
|
if (data.sourceType == "其他部门移送"){
|
data.bu = true;
|
data.men = false;
|
}else {
|
data.bu = false;
|
data.men = true;
|
}
|
|
if (data.sourceType == "上级交办"){
|
data.shang = true;
|
data.ji = false;
|
}else {
|
data.shang = false;
|
data.ji = true;
|
}
|
|
if (data.sourceType == "其他"){
|
data.qi = true;
|
data.ta = false;
|
}else {
|
data.qi = false;
|
data.ta = true;
|
}
|
if (data.registerTime != '' && data.registerTime != null) {
|
data.registerTime = moment(data.registerTime).format('YYYY年MM月DD日HH时mm分');
|
}else {
|
data.registerTime = ' 年 月 日 时 分'
|
}
|
if (data.signTime != '' && data.signTime != null) {
|
data.signTime = moment(data.signTime).format('YYYY年MM月DD日');
|
}else {
|
data.signTime = ' 年 月 日'
|
}
|
if (data.opinionTime != '' && data.opinionTime != null) {
|
data.opinionTime = moment(data.opinionTime).format('YYYY年MM月DD日');
|
}else {
|
data.opinionTime = ' 年 月 日'
|
}
|
return data;
|
},
|
setPersonname(val) {
|
let names = "";
|
for (let i in this.organPersons) {
|
if (val.indexOf(this.organPersons[i].userId) > -1) {
|
names += this.organPersons[i].realName + ",";
|
}
|
}
|
if (names != "") {
|
this.dataForm.handlePerson = names.substring(0, names.length - 1);
|
}
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
|
</style>
|