|
@@ -126,14 +126,18 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="上报单位" prop="deptName" class="duanInput">
|
|
|
- <el-input v-model="form.deptName" :disabled ="disabled"/>
|
|
|
+ <el-col :span="12" style="padding-left:20px;padding-right:40px">
|
|
|
+ <el-form-item label="上报单位" prop="reportunitName" class="duanInput">
|
|
|
+ <treeselect v-model="form.reportunitId" :options="deptOptions" :disabled ="disabled" multiple:false :show-count="true"
|
|
|
+ :noResultsText="'空'" :noOptionsText="'空'" placeholder="请选择上报单位" @select="hx"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="上报人" prop="createName" class="duanInput">
|
|
|
- <el-input v-model="form.createName" :disabled = "disabled"/>
|
|
|
+ <el-select v-model="form.createName" placeholder="请选择上报人" :disabled ="disabled" @change="setVal">
|
|
|
+ <el-option v-for="dict in renOptions" :key="dict.userId" :label="dict.nickName"
|
|
|
+ :value="{value:dict.userId,label:dict.nickName}"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -255,10 +259,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {listCase, getCase, getCaseLog, updateCase} from "@/api/lawenforcement/case";
|
|
|
+import {listCase, getCase, getCaseLog, updateCase,getRenByDeptId} from "@/api/lawenforcement/case";
|
|
|
import register from "@/views/lawenforcement/register/index.vue";
|
|
|
import form from "element-ui/packages/form";
|
|
|
import fileUpload from '@/views/components/FileUpload/index.vue';
|
|
|
+import {treeselect} from "@/api/system/dept";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
|
export default {
|
|
|
name: "Case",
|
|
@@ -267,7 +274,7 @@ export default {
|
|
|
return form
|
|
|
}
|
|
|
},
|
|
|
- components: {register, fileUpload},
|
|
|
+ components: {register, fileUpload,Treeselect},
|
|
|
dicts: ['lawenforcement_punish_target', 'lawenforcement_punish_type', 'lawenforcement_caseState'],
|
|
|
data() {
|
|
|
return {
|
|
@@ -278,6 +285,8 @@ export default {
|
|
|
describe2: null,
|
|
|
describe3: null,
|
|
|
|
|
|
+ deptOptions: undefined,
|
|
|
+ renOptions: undefined,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -330,15 +339,39 @@ export default {
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
- rules: {}
|
|
|
+ rules: {},
|
|
|
+ selected: null
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.queryParams.state = this.$route.query.state;
|
|
|
this.type = this.$route.query.type;
|
|
|
this.getList();
|
|
|
+ this.getTreeselect();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getTreeselect() {
|
|
|
+ treeselect().then(response => {
|
|
|
+ this.deptOptions = response.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getRen(id){
|
|
|
+ //获取人员列表
|
|
|
+ getRenByDeptId({deptId:id}).then(response => {
|
|
|
+ this.renOptions = response.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ hx(node) {
|
|
|
+ this.form.reportunitId = node.id
|
|
|
+ this.form.reportunitName = node.label
|
|
|
+ this.form.createBy = null
|
|
|
+ this.form.createName = null
|
|
|
+ this.getRen(this.form.reportunitId)
|
|
|
+ },
|
|
|
+ setVal(data) {
|
|
|
+ this.form.createBy = data.value
|
|
|
+ this.form.createName = data.label
|
|
|
+ },
|
|
|
/** 查询案件列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
@@ -349,9 +382,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 按部门查看日志
|
|
|
- getCaseLog(row) {
|
|
|
+ getCaseLog(id) {
|
|
|
+ console.log(id)
|
|
|
this.form.deptId = this.$store.state.user.dept.deptId;
|
|
|
- this.form.id = row.id;
|
|
|
+ this.form.id = id;
|
|
|
getCaseLog(this.form).then(response => {
|
|
|
this.logNum = response.data;
|
|
|
});
|
|
@@ -369,6 +403,8 @@ export default {
|
|
|
createBy: null,
|
|
|
createName: null,
|
|
|
createTime: null,
|
|
|
+ reportunitId: null,
|
|
|
+ reportunitName: null,
|
|
|
updateBy: null,
|
|
|
updateName: null,
|
|
|
updateTime: null,
|
|
@@ -403,12 +439,14 @@ export default {
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
+ this.selected = selection.map(item => item.reportunitId)
|
|
|
this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
// 修改
|
|
|
updateCase(row) {
|
|
|
- this.getCaseLog(row);
|
|
|
+ this.getRen(this.selected[0])
|
|
|
+ this.getCaseLog(this.ids[0]);
|
|
|
this.reset();
|
|
|
const id = row.id || this.ids
|
|
|
getCase(id).then(response => {
|
|
@@ -433,7 +471,7 @@ export default {
|
|
|
/** 详情 */
|
|
|
handleUpdate(row) {
|
|
|
this.disabled = true
|
|
|
- this.getCaseLog(row);
|
|
|
+ this.getCaseLog(row.id);
|
|
|
this.reset();
|
|
|
const id = row.id || this.ids
|
|
|
getCase(id).then(response => {
|
|
@@ -458,10 +496,13 @@ export default {
|
|
|
this.form.state = state;
|
|
|
this.form.type = type;
|
|
|
updateCase(this.form).then(response => {
|
|
|
- if (state == 'state_2') {
|
|
|
+ if (type == '1') {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ }
|
|
|
+ if (state == 'state_2' && type != '1') {
|
|
|
this.$modal.msgSuccess("受理成功");
|
|
|
}
|
|
|
- if (state == 'state_6') {
|
|
|
+ if (state == 'state_6' && type != '1') {
|
|
|
this.$modal.msgSuccess("通过成功");
|
|
|
}
|
|
|
this.open = false;
|