Browse Source

Merge remote-tracking branch 'origin/master'

master_tdsql
zth 1 month ago
parent
commit
2e88ddc273
  1. 3
      src/components/linkNameSelect/linkDike.vue
  2. 3
      src/components/linkNameSelect/linkSluice.vue
  3. 7
      src/components/myUpload/index.vue
  4. 138
      src/views/dike/managementGuarantee/standardizationConstruction/listPage/index.vue
  5. 128
      src/views/sluice/managementGuarantee/standardizationConstruction/listPage/index.vue

3
src/components/linkNameSelect/linkDike.vue

@ -36,6 +36,7 @@
:remote-method="remoteMethod"
:loading="loading"
@change="handleChange"
:disabled="disabled"
>
<el-option
v-for="dict in dikeNameOptions"
@ -50,7 +51,7 @@
<script>
import { listJbxx, getJbxx } from "@/api/yg/dike/jbxx";
export default {
props: ["form", "isMultiple"],
props: ["form", "isMultiple",'disabled'],
data() {
return {
loading: false,

3
src/components/linkNameSelect/linkSluice.vue

@ -36,6 +36,7 @@
:remote-method="remoteMethod"
:loading="loading"
@change="handleChange"
:disabled="disabled"
>
<el-option
v-for="dict in wagaNameOptions"
@ -50,7 +51,7 @@
<script>
import { listJbxx, getJbxx } from "@/api/yg/jbxx";
export default {
props: ["form", "isMultiple"],
props: ["form", "isMultiple",'disabled'],
data() {
return {
loading: false,

7
src/components/myUpload/index.vue

@ -11,8 +11,9 @@
:on-exceed="handleExceed"
:on-success="submitUpload"
:file-list="fileList"
:disabled="disabled"
>
<el-button size="small" type="primary" plain>
<el-button size="small" type="primary" plain :disabled="disabled">
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
@ -32,6 +33,10 @@ export default {
return [];
},
},
disabled:{
type:Boolean,
default:false
}
},
data() {
return {

138
src/views/dike/managementGuarantee/standardizationConstruction/listPage/index.vue

@ -143,8 +143,17 @@
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
@click="handleUpdate(scope.row, true)"
v-if="scope.row.status !== '0'"
>{{ formatStatusText(scope.row) }}</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row, true)"
v-hasPermi="['df:bzhjs:edit']"
v-if="scope.row.status == 0 || scope.row.status == null"
>自评审核</el-button
>
<el-button
@ -153,6 +162,11 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['df:bzhjs:remove']"
v-if="
scope.row.status == 0 ||
scope.row.status == 2 ||
scope.row.status == null
"
>删除</el-button
>
</template>
@ -178,7 +192,11 @@
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="堤防名称" prop="dikeCode">
<linkDike :form="form" v-if="open" />
<linkDike
:form="form"
v-if="open"
:disabled="!(statusBtnShow(['0', '2']) || !this.form.status)"
/>
<!-- <el-select
v-model="form.dikeCode"
placeholder="请选择堤防名称"
@ -194,7 +212,10 @@
</el-form-item>
<el-form-item label="验收申请" prop="acceptanceAttachment">
<myUpload :fileList="fileList1" />
<myUpload
:fileList="fileList1"
:disabled="!(statusBtnShow(['0', '2']) || !this.form.status)"
/>
<!-- <el-upload
class="upload-demo"
:action="uploadUrl"
@ -582,8 +603,39 @@
</table>
</div>
<div class="ipt-wrap" v-if="statusBtnShow(['1', '2', '3', '4'])">
<div class="listTitle">
<span>意见</span>
</div>
<el-input
type="textarea"
:rows="3"
placeholder="请输入意见"
v-model="form.auditOpinion"
:disabled="!statusBtnShow(['1', '2'])"
>
</el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button
type="primary"
@click="submitForm()"
v-if="statusBtnShow(['0', '1', '2', '3'])"
>{{ formatBtnText() }}</el-button
>
<el-button
type="warning"
@click="submitForm(true)"
v-if="statusBtnShow(['1'])"
> </el-button
>
<el-button
type="primary"
@click="submitForm()"
v-if="statusBtnShow(['0']) || !this.form.status"
> </el-button
>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -657,7 +709,9 @@ export default {
},
},
//
form: {},
form: {
// status: "0", //
},
//
rules: {
dikeCode: [
@ -675,8 +729,17 @@ export default {
reason: {},
},
totalScore: 0,
statusHandle: false,
statusType: {
0: "新增",
1: "已上报",
2: "被驳回",
3: "审核通过",
4: "已备案",
},
};
},
computed: {},
created() {
this.getList();
this.getEval();
@ -745,6 +808,7 @@ export default {
score: {},
reason: {},
};
this.reset();
},
/** 查询堤防标准化建设列表 */
getList() {
@ -766,6 +830,7 @@ export default {
//
cancel() {
this.open = false;
this.statusHandle = false;
this.reset();
},
//
@ -780,6 +845,7 @@ export default {
createTime: null,
updateUid: null,
updateTime: null,
status: null,
};
this.resetForm("form");
},
@ -798,6 +864,7 @@ export default {
createTime: null,
updateUid: null,
updateTime: null,
auditOpinion:''
},
//
params: {
@ -831,8 +898,45 @@ export default {
this.open = true;
this.title = "添加堤防标准化建设";
},
formatStatusText(row) {
console.log("formatStatusText", row);
let status = row.status;
return this.statusType[status];
},
formatBtnText() {
let data = this.form;
let status = JSON.parse(JSON.stringify(data.status));
switch (status) {
case "0":
return "上 报";
case "1":
return "审 核";
case "2":
return "重新上报";
case "3":
return "备 案";
}
},
statusBtnShow(typeList) {
console.log("statusBtnShowtypeList", typeList);
console.log("statusBtnShowform", this.form);
console.log("-----------");
// let data = this.form;
let data = JSON.parse(JSON.stringify(this.form));
// let status = JSON.parse(JSON.stringify(data.status));
if (data.status) {
return typeList.includes(data.status);
} else {
return false;
}
},
/** 修改按钮操作 */
handleUpdate(row) {
handleUpdate(row, statusHandle = false) {
this.statusHandle = statusHandle;
this.reset();
const id = row.id || this.ids;
getBzhjs(id).then((response) => {
@ -848,14 +952,28 @@ export default {
});
},
/** 提交按钮 */
submitForm() {
submitForm(status) {
this.form.acceptanceAttachment = this.fileList1.length
? JSON.stringify(this.fileList1)
: null;
this.$refs["form"].validate((valid) => {
if (valid) {
console.log("----------", status);
// return;
this.form.score = JSON.stringify(this.evalForm);
if (this.form.id != null) {
if (this.statusHandle) {
if (status) {
this.form.status = "2";
} else if (this.form.status == "2") {
this.form.status = "1";
} else if (this.form.status == "1") {
this.form.status = "3";
} else {
this.form.status = parseInt(this.form.status) + 1;
}
}
updateBzhjs(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("自评成功");
@ -864,6 +982,8 @@ export default {
}
});
} else {
this.form.status = "0";
this.form.auditOpinion = "";
addBzhjs(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
@ -982,6 +1102,10 @@ export default {
margin-top: 0;
}
.ipt-wrap {
margin-top: 30px;
}
.tableBox {
height: 600px;
overflow-y: auto;

128
src/views/sluice/managementGuarantee/standardizationConstruction/listPage/index.vue

@ -143,8 +143,17 @@
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['sz:bzhjs:edit']"
@click="handleUpdate(scope.row, true)"
v-if="scope.row.status !== '0'"
>{{ formatStatusText(scope.row) }}</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row, true)"
v-hasPermi="['df:bzhjs:edit']"
v-if="scope.row.status == 0 || scope.row.status == null"
>自评审核</el-button
>
<el-button
@ -152,7 +161,12 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['sz:bzhjs:remove']"
v-hasPermi="['df:bzhjs:remove']"
v-if="
scope.row.status == 0 ||
scope.row.status == 2 ||
scope.row.status == null
"
>删除</el-button
>
</template>
@ -178,7 +192,7 @@
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="水闸名称" prop="wagaCode">
<linkSluice :form="form" v-if="open" />
<linkSluice :form="form" v-if="open" :disabled="!(statusBtnShow(['0', '2']) || !this.form.status)"/>
<!-- <el-select
v-model="form.wagaCode"
placeholder="请选择水闸名称"
@ -194,7 +208,7 @@
</el-form-item>
<el-form-item label="验收申请" prop="acceptanceAttachment">
<myUpload :fileList="fileList1" />
<myUpload :fileList="fileList1" :disabled="!(statusBtnShow(['0', '2']) || !this.form.status)"/>
<!-- <el-upload
class="upload-demo"
:action="uploadUrl"
@ -582,8 +596,39 @@
</table>
</div>
<div class="ipt-wrap" v-if="statusBtnShow(['1', '2', '3', '4'])">
<div class="listTitle">
<span>意见</span>
</div>
<el-input
type="textarea"
:rows="3"
placeholder="请输入意见"
v-model="form.auditOpinion"
:disabled="!statusBtnShow(['1', '2'])"
>
</el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button
type="primary"
@click="submitForm()"
v-if="statusBtnShow(['0', '1', '2', '3'])"
>{{ formatBtnText() }}</el-button
>
<el-button
type="warning"
@click="submitForm(true)"
v-if="statusBtnShow(['1'])"
> </el-button
>
<el-button
type="primary"
@click="submitForm()"
v-if="statusBtnShow(['0']) || !this.form.status"
> </el-button
>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -675,6 +720,14 @@ export default {
reason: {},
},
totalScore: 0,
statusHandle: false,
statusType: {
0: "新增",
1: "已上报",
2: "被驳回",
3: "审核通过",
4: "已备案",
},
};
},
created() {
@ -745,6 +798,7 @@ export default {
score: {},
reason: {},
};
this.reset();
},
/** 查询水闸标准化建设列表 */
getList() {
@ -766,6 +820,7 @@ export default {
//
cancel() {
this.open = false;
this.statusHandle = false;
this.reset();
},
//
@ -780,6 +835,8 @@ export default {
createTime: null,
updateUid: null,
updateTime: null,
status: null,
auditOpinion:''
};
this.resetForm("form");
},
@ -831,8 +888,46 @@ export default {
this.open = true;
this.title = "添加水闸标准化建设";
},
formatStatusText(row) {
console.log("formatStatusText", row);
let status = row.status;
return this.statusType[status];
},
formatBtnText() {
let data = this.form;
let status = JSON.parse(JSON.stringify(data.status));
switch (status) {
case "0":
return "上 报";
case "1":
return "审 核";
case "2":
return "重新上报";
case "3":
return "备 案";
}
},
statusBtnShow(typeList) {
console.log("statusBtnShowtypeList", typeList);
console.log("statusBtnShowform", this.form);
console.log("-----------");
// let data = this.form;
let data = JSON.parse(JSON.stringify(this.form));
// let status = JSON.parse(JSON.stringify(data.status));
if (data.status) {
return typeList.includes(data.status);
} else {
return false;
}
},
/** 修改按钮操作 */
handleUpdate(row) {
handleUpdate(row, statusHandle = false) {
this.statusHandle = statusHandle;
this.reset();
const id = row.id || this.ids;
getBzhjs(id).then((response) => {
@ -848,7 +943,7 @@ export default {
});
},
/** 提交按钮 */
submitForm() {
submitForm(status) {
this.form.acceptanceAttachment = this.fileList1.length
? JSON.stringify(this.fileList1)
: null;
@ -856,6 +951,17 @@ export default {
if (valid) {
this.form.score = JSON.stringify(this.evalForm);
if (this.form.id != null) {
if (this.statusHandle) {
if (status) {
this.form.status = "2";
} else if (this.form.status == "2") {
this.form.status = "1";
} else if (this.form.status == "1") {
this.form.status = "3";
} else {
this.form.status = parseInt(this.form.status) + 1;
}
}
updateBzhjs(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
@ -864,6 +970,8 @@ export default {
}
});
} else {
this.form.status = "0";
this.form.auditOpinion = "";
addBzhjs(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
@ -982,6 +1090,10 @@ export default {
margin-top: 0;
}
.ipt-wrap {
margin-top: 30px;
}
.tableBox {
height: 600px;
overflow-y: auto;

Loading…
Cancel
Save