|
@@ -9,6 +9,16 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="searchParams" ref="searchParams" size="small" :inline="true" v-show="showSearch"
|
|
|
label-width="110px">
|
|
|
+ <el-form-item label="行政区" prop="district">
|
|
|
+ <el-select v-model="queryParams.district" placeholder="请选择行政区" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.district"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="工程名称" prop="enginName">
|
|
|
<el-input v-model="searchParams.enginName" placeholder="请输入工程名称" maxlength="20"></el-input>
|
|
|
</el-form-item>
|
|
@@ -99,6 +109,11 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="comprehensiveList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
+ <el-table-column label="行政区" align="center" prop="district">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.district" :value="scope.row.district"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="工程名称" align="center" prop="enginName"/>
|
|
|
<el-table-column label="工程类型" align="center" prop="enginType"/>
|
|
|
<el-table-column label="工程分类" align="center" prop="enginClassification"/>
|
|
@@ -218,9 +233,25 @@
|
|
|
<!-- 修改工业工程对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" append-to-body customClass="appendElDialog">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
|
+ <el-form-item label="行政区" prop="district">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ :disabled="title == '添加用料'"
|
|
|
+ v-model="form.district"
|
|
|
+ placeholder="请选择行政区"
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="e in dict.type.district"
|
|
|
+ :key="e.value"
|
|
|
+ :label="e.label"
|
|
|
+ :value="e.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="工程名称" prop="enginName" v-hasPermi="['zdsz:engineeringgy:add']">
|
|
|
<el-input v-model="form.enginName" placeholder="请填写工程名称" maxlength="60"
|
|
|
- :readonly="title == '添加用料' "></el-input>
|
|
|
+ :readonly="title == '添加用料'"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="建筑单位" prop="constructUnit" v-hasPermi="['zdsz:engineeringgy:add']">
|
|
|
<el-input v-model="form.constructUnit" placeholder="请填写建筑单位" maxlength="50"
|
|
@@ -411,6 +442,22 @@
|
|
|
<!-- 添加工业工程对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="openadd" append-to-body customClass="appendElDialog">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
|
+ <el-form-item label="行政区" prop="district">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ :disabled="title == '添加用料'"
|
|
|
+ v-model="form.district"
|
|
|
+ placeholder="请选择行政区"
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="e in dict.type.district"
|
|
|
+ :key="e.value"
|
|
|
+ :label="e.label"
|
|
|
+ :value="e.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="工程名称" prop="enginName">
|
|
|
<el-input v-model="form.enginName" placeholder="请填写工程名称" maxlength="60"
|
|
|
:readonly="title == '添加用料' "></el-input>
|
|
@@ -696,7 +743,7 @@ import EnginNodeInfo from "@/components/EnginNodeInfo/indexGY.vue";
|
|
|
|
|
|
export default {
|
|
|
name: "工业",
|
|
|
- dicts: ['project_head','design_unit','supervision_unit'],
|
|
|
+ dicts: ['project_head', 'design_unit', 'supervision_unit', 'district'],
|
|
|
components: {
|
|
|
EnginNodeInfo,
|
|
|
ConstructionDetails,
|
|
@@ -819,22 +866,24 @@ export default {
|
|
|
specificationsList: [], // 用料规格List
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
+ district: [
|
|
|
+ {required: true, message: "行政区不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
enginName: [
|
|
|
- {required: true, validator:function(rule, value, callback) {
|
|
|
- if(value == null || value == ''){
|
|
|
- callback(new Error("工程名称不能为空"))
|
|
|
- }else {
|
|
|
- testEnginNameUnique({enginName: value, enginType: '工业工程'}).then(res => {
|
|
|
- if(!res.data){
|
|
|
- callback(new Error("工程名称不能重复"))
|
|
|
- }else {
|
|
|
- // callback(new Error("工程名称可以使用"))
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- // callback(new Error("123"))
|
|
|
- }
|
|
|
- }, trigger: 'blur'}
|
|
|
+ {required: true, message: "工程名称不能为空", trigger: "blur"},
|
|
|
+ // {required: true, validator:function(rule, value, callback) {
|
|
|
+ // if(value == null || value == ''){
|
|
|
+ // callback(new Error("工程名称不能为空"))
|
|
|
+ // }else {
|
|
|
+ // testEnginNameUnique({enginName: value, enginType: '工业工程'}).then(res => {
|
|
|
+ // if(res.data){
|
|
|
+ // // callback(new Error("工程名称可以使用"))
|
|
|
+ // }else {
|
|
|
+ // callback(new Error("工程名称不能重复"))
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }, trigger: 'blur'}
|
|
|
],
|
|
|
enginType: [
|
|
|
{required: true, message: "工程类型不能为空", trigger: 'blur'}
|