更新8D的bug

This commit is contained in:
朱文强 2023-07-17 15:50:12 +08:00
parent 7acd83e501
commit 675b716a32
18 changed files with 274 additions and 244 deletions

View File

@ -18,6 +18,10 @@ const table = {
1: '需要审批', 1: '需要审批',
0: '不需要审批', 0: '不需要审批',
}, },
gradeFinish: {
1: '已打分',
0: '未打分',
},
step: { step: {
0: 'D0', 0: 'D0',
1: 'D1', 1: 'D1',

View File

@ -1,15 +1,20 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 10:17:44 * @LastEditTime: 2023-07-17 10:21:47
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px"> <el-form
:model="dataForm"
ref="dataForm"
:rules="dataRule"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="130px"
>
<el-form-item prop="name" :label="$t('code.name')"> <el-form-item prop="name" :label="$t('code.name')">
<el-input v-model="dataForm.name" :placeholder="$t('code.name')"> <el-input v-model="dataForm.name" :placeholder="$t('code.name')"> </el-input>
</el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" :label="$t('code.code')"> <el-form-item prop="code" :label="$t('code.code')">
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input> <el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
@ -19,8 +24,16 @@
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')"> <el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')">
<el-select v-model="dataForm.eightDisciplineType" :placeholder="$t('code.eightDisciplineType')"> <el-select
<el-option v-for="item in eightDisciplineTypeList" :key="item.value" :label="item.label" :value="item.value"> v-model="dataForm.eightDisciplineType"
:placeholder="$t('code.eightDisciplineType')"
>
<el-option
v-for="item in eightDisciplineTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -36,36 +49,38 @@ export default {
return { return {
urlOptions: { urlOptions: {
submitURL: "/code/eightDiscipline", submitURL: "/code/eightDiscipline",
infoURL: "/code/eightDiscipline" infoURL: "/code/eightDiscipline",
}, },
options: [{ options: [
value: 0, {
label: '不可用' value: 0,
}, label: "不可用",
{ },
value: 1, {
label: '可用' value: 1,
}], label: "可用",
},
],
eightDisciplineTypeList: [ eightDisciplineTypeList: [
{ {
value: '0', value: "0",
label: '重复发生问题 ' label: "重复发生问题 ",
}, },
{ {
value: '1', value: "1",
label: '客诉问题' label: "客诉问题",
}, },
{ {
value: '2', value: "2",
label: '重大质量问题' label: "重大质量问题",
} },
], ],
visible: false, visible: false,
dataForm: { dataForm: {
id: null, id: null,
name: null, name: null,
code:null, code: null,
eightDisciplineType:null, eightDisciplineType: null,
eightDisciplineStatus: 0, eightDisciplineStatus: 0,
}, },
}; };
@ -73,40 +88,33 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ code: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请输入编码",
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ name: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请输入名称",
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
}; };
}, },
}, },
methods: { methods: {
init(id, ) { init(id) {
this.dataForm.id = id || "" this.dataForm.id = id || "";
// console.log(11111) // console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || ""; // this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo() this.getInfo();
} else { } else {
// this.getCode() // this.getCode()
} }

View File

@ -1,78 +1,74 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 13:41:37 * @LastEditTime: 2023-07-17 10:23:23
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px"> <el-form
<el-form-item prop="name" :label="$t('code.name')"> :model="dataForm"
<el-input v-model="dataForm.name" :placeholder="$t('code.name')"> :rules="dataRule"
</el-input> ref="dataForm"
</el-form-item> @keyup.enter.native="dataFormSubmitHandle()"
<el-form-item prop="code" :label="$t('code.code')"> label-width="130px"
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input> >
</el-form-item> <el-form-item prop="name" :label="$t('code.name')">
<el-form-item prop="problemStatus" label="状态"> <el-input v-model="dataForm.name" :placeholder="$t('code.name')"> </el-input>
<el-switch v-model="dataForm.problemStatus" :active-value="1" :inactive-value="0"> </el-form-item>
</el-switch> <el-form-item prop="code" :label="$t('code.code')">
</el-form-item> <el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
<el-form-item prop="description" label="描述"> </el-form-item>
<el-input v-model="dataForm.description" placeholder="描述"></el-input> <el-form-item prop="problemStatus" label="状态">
</el-form-item> <el-switch v-model="dataForm.problemStatus" :active-value="1" :inactive-value="0">
</el-form> </el-switch>
</template> </el-form-item>
<el-form-item prop="description" label="描述">
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
</el-form-item>
</el-form>
</template>
<script> <script>
import basicAdd from "@/mixins/basic-add"; import basicAdd from "@/mixins/basic-add";
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
data() { data() {
return {
urlOptions: {
submitURL: "/code/problemType",
infoURL: "/code/problemType",
},
visible: false,
dataForm: {
id: null,
name: null,
code: null,
description: null,
problemStatus: 0,
},
};
},
computed: {
dataRule() {
return { return {
urlOptions: { code: [
submitURL: "/code/problemType", {
infoURL: "/code/problemType" required: true,
}, message: "请输入编码",
visible: false, trigger: "blur",
dataForm: { },
id: null, ],
name: null, name: [
code:null, {
description:null, required: true,
problemStatus: 0, message: "请输入名称",
}, trigger: "blur",
},
],
}; };
}, },
computed: { },
dataRule() { methods: {},
return { };
// dictLabel: [ </script>
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// dictValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
methods: {
}
};
</script>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-17 10:00:53 * @LastEditTime: 2023-07-17 10:27:00
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -272,7 +272,7 @@ export default {
}, },
{ {
value: '1', value: '1',
label: "1客诉问题", label: "客诉问题",
}, },
{ {
value: '2', value: '2',

View File

@ -2,11 +2,17 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-06-29 14:12:48 * @Date: 2023-06-29 14:12:48
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-06-30 10:58:16 * @LastEditTime: 2023-07-17 13:30:04
* @Description: * @Description:
--> -->
<template> <template>
<base-table border show-summary :table-props="tableProps" :table-data="tableData" @emitFun="inputChange" /> <base-table
border
show-summary
:table-props="tableProps"
:table-data="tableData"
@emitFun="inputChange"
/>
</template> </template>
<script> <script>
@ -134,7 +140,7 @@ export default {
if (this.tableData[data._pageIndex - 1].gradeStatus) { if (this.tableData[data._pageIndex - 1].gradeStatus) {
this.$set( this.$set(
this.tableData[data._pageIndex - 1], this.tableData[data._pageIndex - 1],
'grade', "grade",
this.score[this.tableData[data._pageIndex - 1].gradeStatus - 1] this.score[this.tableData[data._pageIndex - 1].gradeStatus - 1]
); );
} }
@ -146,24 +152,33 @@ export default {
formClear() {}, formClear() {},
// //
dataFormSubmit() { dataFormSubmit() {
this.tableData.forEach((item) => { this.tableData.forEach((item) => {
item.startEightDisciplineId = this.id; item.startEightDisciplineId = this.id;
});
let putData = {
gradeFinish: 1,
id: this.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http.post("/code/startEightGrade/save/list", this.tableData).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
}); });
this.$http.post("/code/startEightGrade/save/list", this.tableData) });
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
});
}, },
}, },
}; };

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 10:15:45 * @LastEditTime: 2023-07-17 10:38:22
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -66,20 +66,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "approve", type: "approve",
btnName: "审批", btnName: "审批",

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 10:16:41 * @LastEditTime: 2023-07-17 10:39:16
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -96,20 +96,20 @@ const tableProps = [
align: "center", align: "center",
}, },
{ {
prop: "userId", prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: "center", align: "center",
}, },
]; ];
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "team", type: "team",
btnName: "团队", btnName: "团队",

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 10:16:46 * @LastEditTime: 2023-07-17 10:38:45
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -84,20 +84,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "corrective", type: "corrective",
btnName: "纠正", btnName: "纠正",

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 10:16:53 * @LastEditTime: 2023-07-17 10:39:03
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -82,7 +82,7 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
@ -92,10 +92,10 @@ const tableBtn = [
// type: "edit", // type: "edit",
// btnName: "", // btnName: "",
// }, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "analysis", type: "analysis",
btnName: "分析", btnName: "分析",

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 10:16:58 * @LastEditTime: 2023-07-17 10:38:34
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -84,20 +84,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "prevent", type: "prevent",
btnName: "预防", btnName: "预防",

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 09:21:25 * @LastEditTime: 2023-07-17 10:38:50
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -83,20 +83,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "analysis", type: "analysis",
btnName: "分析", btnName: "分析",

View File

@ -2,7 +2,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 09:37:58 * @LastEditTime: 2023-07-17 10:38:29
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -84,20 +84,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "summary", type: "summary",
btnName: "总结", btnName: "总结",

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 10:17:04 * @LastEditTime: 2023-07-17 10:39:25
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -89,20 +89,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "measure", type: "measure",
btnName: "措施", btnName: "措施",

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 09:31:04 * @LastEditTime: 2023-07-17 10:38:40
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -83,20 +83,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "",
}, // },
{ {
type: "validation", type: "validation",
btnName: "验证", btnName: "验证",

View File

@ -1,7 +1,7 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <!-- <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> -->
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.page" :page="listQuery.page"
@ -73,10 +73,10 @@ const tableProps = [
align: "center", align: "center",
}, },
{ {
prop: "examineStatus", prop: "gradeFinish",
label: i18n.t("code.examineStatus"), label: "打分状态",
align: "center", align: "center",
filter: codeFilter("examineStatus"), filter: codeFilter("gradeFinish"),
}, },
]; ];
const tableBtn = [ const tableBtn = [
@ -130,9 +130,16 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if(val.data.gradeFinish){
this.$message({
message: '该数据已完成打分操作,请勿重复打分!',
type: 'warning'
});
}else{
this.addOrEditTitle = "打分"; this.addOrEditTitle = "打分";
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrUpdateHandle(val.data.id); this.addOrUpdateHandle(val.data.id);
}
}, },
}, },
}; };

View File

@ -77,11 +77,11 @@ const tableProps = [
label: "关键字", label: "关键字",
align: "center", align: "center",
}, },
{ // {
prop: "associationNumber", // prop: "associationNumber",
label: "关联次数", // label: "",
align: "center", // align: "center",
}, // },
]; ];
const tableBtn = [ const tableBtn = [
{ {

View File

@ -93,11 +93,11 @@ const tableProps = [
label: i18n.t("code.description"), label: i18n.t("code.description"),
align: "center", align: "center",
}, },
{ // {
prop: "userName", // prop: "userName",
label: "启动人", // label: "",
align: "center", // align: "center",
}, // },
{ {
prop: "eightDisciplineStatus", prop: "eightDisciplineStatus",
label: "步骤", label: "步骤",

View File

@ -88,11 +88,11 @@ const tableProps = [
label: i18n.t("code.description"), label: i18n.t("code.description"),
align: "center", align: "center",
}, },
{ // {
prop: "userName", // prop: "userName",
label: "启动人", // label: "",
align: "center", // align: "center",
}, // },
]; ];
const tableBtn = [ const tableBtn = [
{ {