Merge pull request '更新8D处理中心' (#9) from zwq into master

Reviewed-on: #9
This commit is contained in:
朱文强 2023-06-30 11:14:46 +08:00
commit b11683e519
26 changed files with 2349 additions and 230 deletions

View File

@ -13,6 +13,10 @@ const table = {
1: '客诉问题',
2: '重大质量问题',
0: '重复发生问题',
},
examineStatus: {
1: '需要审批',
0: '不需要审批',
}
}

View File

@ -0,0 +1,37 @@
<template>
<div class="tableInner">
<el-input v-model="list[itemProp]" @blur="changeInput" />
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 1
this.$emit("emitData", this.list,1);
},
},
};
</script>
<style scoped>
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@ -0,0 +1,45 @@
<template>
<div class="tableInner">
<el-select v-model="list.string" @change="changeInput">
<el-option
v-for="item in injectData.roleList"
:key="item.id"
:label="item.username"
:value="item.id + '+' + item.username"
>
</el-option>
</el-select>
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 2
this.$emit("emitData", this.list);
},
},
};
</script>
<style scoped>
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@ -0,0 +1,47 @@
<template>
<div class="tableInner">
<el-date-picker
@change="changeInput"
v-model="list.time"
type="date"
size="mini"
:style="{width:'100%'}"
format='yyyy-MM-dd'
valueFormat='yyyy-MM-ddTHH:mm:ss'
prefix-icon="none"
placeholder="选择日期">
</el-date-picker>
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 3
this.$emit("emitData", this.list);
},
},
};
</script>
<style scoped>
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-28 16:53:02
* @LastEditTime: 2023-06-29 10:54:23
* @LastEditors: zwq
* @Description:
-->
@ -136,6 +136,19 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="finalCompletionDate" :label="$t('code.finalCompletionDate')">
<el-date-picker
:style="{ width: '100%' }"
v-model="dataForm.finalCompletionDate"
type="datetime"
:placeholder="$t('code.finalCompletionDate')"
format="yyyy-MM-dd HH:mm:ss"
valueFormat="yyyy-MM-ddTHH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item prop="examineStatus" :label="$t('code.examineStatus')">
<el-select
:style="{ width: '100%' }"
@ -150,22 +163,9 @@
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="finalCompletionDate" :label="$t('code.finalCompletionDate')">
<el-date-picker
:style="{ width: '100%' }"
v-model="dataForm.finalCompletionDate"
type="datetime"
:placeholder="$t('code.finalCompletionDate')"
format="yyyy-MM-dd HH:mm:ss"
valueFormat="yyyy-MM-ddTHH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="teamList" :label="$t('code.eightDTeam')">
<el-select
@ -234,15 +234,15 @@ export default {
],
eightDisciplineTypeList: [
{
value: 0,
value: '0',
label: "重复发生问题 ",
},
{
value: 1,
value: '1',
label: "1客诉问题",
},
{
value: 2,
value: '2',
label: "重大质量问题",
},
],

View File

@ -0,0 +1,207 @@
<!--
* @Author: zwq
* @Date: 2023-06-29 14:12:48
* @LastEditors: zwq
* @LastEditTime: 2023-06-30 09:03:53
* @Description:
-->
<template>
<base-table border :table-props="tableProps" :table-data="tableData" @emitFun="inputChange" />
</template>
<script>
import basicAdd from "@/mixins/basic-add";
import inputArea from "./inputArea";
import selectMember from "./selectMember";
import i18n from "@/i18n";
const tableProps = [
{
prop: "stepName",
label: i18n.t("disqualification.step"),
align: "center",
},
{
prop: "member",
label: "成员",
align: "center",
subcomponent: selectMember,
},
{
prop: "time",
label: "时间(小时)",
align: "center",
subcomponent: inputArea,
},
{
prop: "approver",
label: "审批人",
align: "center",
subcomponent: selectMember,
},
{
prop: "terminationApprover",
label: "终止审批人",
align: "center",
subcomponent: selectMember,
},
];
export default {
components: {
inputArea,
selectMember,
},
mixins: [basicAdd],
props: {
roleList: {
type: Array,
default: () => [],
},
},
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreliminaryAnalysis/",
},
tableProps,
visible: false,
tableData: [
{
stepName: "D3",
step: 3,
roleList: this.roleList,
},
{
stepName: "D4",
step: 4,
roleList: this.roleList,
},
{
stepName: "D5",
step: 5,
roleList: this.roleList,
},
{
stepName: "D6",
step: 6,
roleList: this.roleList,
},
{
stepName: "D7",
step: 7,
roleList: this.roleList,
},
{
stepName: "D8",
step: 8,
roleList: this.roleList,
},
],
id: "",
};
},
computed: {
dataRule() {
return {
// description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.id = id;
this.visible = true;
this.$nextTick(() => {});
},
inputChange(data) {
switch (data.sType) {
case 1:
this.tableData[data._pageIndex - 1][data.prop] = data[data.prop];
break;
case 2:
this.tableData[data._pageIndex - 1][data.prop] = data.string
? data.string.split("+")[0]
: "";
this.tableData[data._pageIndex - 1][data.prop + "Name"] = data.string
? data.string.split("+")[1]
: "";
break;
default:
console.log(val);
}
},
formClear() {},
//
dataFormSubmit() {
let putData = {
eightDisciplineStatus: 3,
examineStatus: 1,
id: this.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.tableData.forEach((item) => {
item.startEightDisciplineId = this.id;
});
this.$http.post("/code/startEightDisciplineCreateTeam/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");
},
});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplineDescriptionCorrectiveAction",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.dataForm.startEightDisciplineId = id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 6,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.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");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreliminaryAnalysis/",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(data) {
this.dataForm.startEightDisciplineId = data.id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 2,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.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");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreventRecurrence",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.dataForm.startEightDisciplineId = id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 8,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.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");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="problemType" label="问题类型">
<el-input type="textarea" :rows="2" placeholder="请输入工艺问题" v-model="dataForm.problemType">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplineRootCauseAnalysis",
},
visible: false,
dataForm: {
problemType: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
problemType: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(data) {
this.dataForm.startEightDisciplineId = data.id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 5,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.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");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,116 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplineSummaryExperience",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.dataForm.startEightDisciplineId = id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 9,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.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");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,225 @@
<!--
* @Author: zwq
* @Date: 2023-06-29 14:12:48
* @LastEditors: zwq
* @LastEditTime: 2023-06-30 09:07:57
* @Description:
-->
<template>
<base-table border :table-props="tableProps" :table-data="tableData" @emitFun="inputChange" />
</template>
<script>
import basicAdd from "@/mixins/basic-add";
import inputArea from "./inputArea";
import selectMember from "./selectMember";
import selectTime from "./selectTime";
import i18n from "@/i18n";
const tableProps = [
{
prop: "containmentLocaleName",
label: "遏制区域设置",
align: "center",
},
{
prop: "developCountermeasuresName",
label: "拟定对策",
align: "center",
},
{
prop: "controlleQuantity",
label: "应受控数量",
align: "center",
subcomponent: inputArea,
},
{
prop: "actualQuantity",
label: "实际数量",
align: "center",
subcomponent: inputArea,
},
{
prop: "defectQuantity",
label: "不良数量",
align: "center",
subcomponent: inputArea,
},
{
prop: "userName",
label: "负责人",
align: "center",
subcomponent: selectMember,
},
{
prop: "completionDate",
label: "完成日期",
align: "center",
subcomponent: selectTime,
},
];
export default {
components: {
inputArea,
selectMember,
},
mixins: [basicAdd],
props: {
roleList: {
type: Array,
default: () => [],
},
},
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreliminaryAnalysis/",
},
tableProps,
visible: false,
tableData: [
{
containmentLocaleName: "装配线",
containmentLocale: 1,
developCountermeasuresName: "让步接收",
developCountermeasures: 1,
roleList: this.roleList,
},
{
containmentLocaleName: "生产线",
containmentLocale: 2,
developCountermeasuresName: "分选返工",
developCountermeasures: 2,
roleList: this.roleList,
},
{
containmentLocaleName: "实验室",
containmentLocale: 3,
developCountermeasuresName: "隔离",
developCountermeasures: 3,
roleList: this.roleList,
},
{
containmentLocaleName: "成品在途",
containmentLocale: 4,
developCountermeasuresName: "退换货",
developCountermeasures: 4,
roleList: this.roleList,
},
{
containmentLocaleName: "第三方中间商",
containmentLocale: 5,
developCountermeasuresName: "通知供应商",
developCountermeasures: 5,
roleList: this.roleList,
},
],
id: "",
};
},
computed: {
dataRule() {
return {
// description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.id = id;
this.visible = true;
this.$nextTick(() => {});
},
inputChange(data) {
switch (data.sType) {
case 1:
this.tableData[data._pageIndex - 1][data.prop] = data[data.prop];
break;
case 2:
this.tableData[data._pageIndex - 1].userName = data.string
? data.string.split("+")[1]
: "";
this.tableData[data._pageIndex - 1].userId = data.string ? data.string.split("+")[0] : "";
break;
case 3:
this.tableData[data._pageIndex - 1][data.prop] = data.time;
break;
default:
console.log(val);
}
},
formClear() {},
//
dataFormSubmit() {
console.log(this.tableData);
let putData = {
eightDisciplineStatus: 4,
examineStatus: 1,
id: this.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.tableData.forEach((item) => {
item.startEightDisciplineId = this.id;
});
this.$http.post("/code/startEightDisciplineTemporaryTreatmentMeasures/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");
},
});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplineValidation",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.dataForm.startEightDisciplineId = id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 7,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.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");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,208 @@
<!--
* @Author: zwq
* @Date: 2023-06-29 14:12:48
* @LastEditors: zwq
* @LastEditTime: 2023-06-30 10:58:16
* @Description:
-->
<template>
<base-table border show-summary :table-props="tableProps" :table-data="tableData" @emitFun="inputChange" />
</template>
<script>
import basicAdd from "@/mixins/basic-add";
import selectMember from "./selectMember";
import i18n from "@/i18n";
const tableProps = [
{
prop: "stepName",
label: i18n.t("disqualification.step"),
align: "center",
},
{
prop: "desc",
label: "打分项",
align: "center",
},
{
prop: "gradeList",
label: "打分",
align: "center",
subcomponent: selectMember,
},
{
prop: "grade",
label: "分数",
align: "center",
},
];
const gradeList = [
{ id: 1, username: "优" },
{ id: 2, username: "良" },
{ id: 3, username: "差" },
];
const score = [10, 8, 0];
export default {
components: {
selectMember,
},
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreliminaryAnalysis/",
},
tableProps,
score,
visible: false,
tableData: [
{
stepName: "D1",
step: 1,
desc: "初步分析",
roleList: gradeList,
},
{
stepName: "D2",
step: 2,
desc: "创建团队",
roleList: gradeList,
},
{
stepName: "D3",
step: 3,
desc: "临时处理措施",
roleList: gradeList,
},
{
stepName: "D4",
step: 4,
desc: "根本原因分析",
roleList: gradeList,
},
{
stepName: "D5",
step: 5,
desc: "纠正措施描述",
roleList: gradeList,
},
{
stepName: "D6",
step: 6,
desc: "有效性验证",
roleList: gradeList,
},
{
stepName: "D7",
step: 7,
desc: "预防再发生",
roleList: gradeList,
},
{
stepName: "D8",
step: 8,
desc: "总结与经验分享",
roleList: gradeList,
},
],
id: "",
};
},
computed: {
dataRule() {
return {
// description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.id = id;
this.visible = true;
this.$nextTick(() => {});
},
inputChange(data) {
switch (data.sType) {
case 1:
this.tableData[data._pageIndex - 1][data.prop] = data[data.prop];
break;
case 2:
this.tableData[data._pageIndex - 1].gradeStatus = data.string
? data.string.split("+")[0]
: "";
if (this.tableData[data._pageIndex - 1].gradeStatus) {
this.$set(
this.tableData[data._pageIndex - 1],
'grade',
this.score[this.tableData[data._pageIndex - 1].gradeStatus - 1]
);
}
break;
default:
console.log(val);
}
},
formClear() {},
//
dataFormSubmit() {
this.tableData.forEach((item) => {
item.startEightDisciplineId = this.id;
});
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");
},
});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:12:12
* @LastEditors: zhp
* @LastEditTime: 2023-06-29 11:02:36
* @LastEditors: zwq
* @Description:
-->
<template>
@ -14,7 +14,7 @@
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@ -29,6 +29,8 @@ import basicPage from "@/mixins/basic-page"
// import transferSchemeAdd from "./components/transferScheme-add"
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [
{
@ -39,12 +41,14 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
align: 'center',
filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: 'center',
filter: timeFormatter,
},
{
prop: 'productName',
@ -76,6 +80,10 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "approve",
btnName: "审批",
},
];
export default {
mixins: [basicPage, basicSearch],
@ -94,7 +102,7 @@ export default {
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 8
examineStatus:1
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -105,23 +113,23 @@ export default {
placeholder: i18n.t('code.title'),
param: 'title'
},
{
type: 'select',
label: i18n.t('code.examineStatus'),
selectOptions: [
{
id: 0,
name: '不需要审批',
},
{
id: 1,
name: '需要审批',
}
],
param: 'examineStatus',
clearable: true,
filterable: true
},
// {
// type: 'select',
// label: i18n.t('code.examineStatus'),
// selectOptions: [
// {
// id: 0,
// name: '',
// },
// {
// id: 1,
// name: '',
// }
// ],
// param: 'examineStatus',
// clearable: true,
// filterable: true
// },
{
type: "button",
btnName: "搜索",
@ -189,6 +197,33 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "approve") {
this.$confirm(`确定对此条数据进行审批操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let putData = {
examineStatus: 0,
id: val.data.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => {});
}
},
buttonClick(val) {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-28 16:49:41
* @LastEditTime: 2023-06-29 11:15:25
* @LastEditors: zwq
* @Description:
-->
@ -9,19 +9,40 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item">
<!-- <el-badge :value="1" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="150"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel" width="70%">
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="70%"
>
<startEightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
</startEightDiscipline-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
@ -31,35 +52,37 @@
</template>
<script>
import basicPage from "@/mixins/basic-page"
import startEightDisciplineAdd from "./components/startEightDiscipline-add"
import basicPage from "@/mixins/basic-page";
import startEightDisciplineAdd from "./components/startEightDiscipline-add";
// import AddOrUpdate from './params-add-or-update'
// import customSamplingSearch from "./components/customSamplingSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
import basicSearch from "@/mixins/basic-search";
import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter";
import i18n from "@/i18n";
const tableProps = [
{
prop: 'title',
prop: "title",
label: i18n.t("code.title"),
align: 'center'
align: "center",
},
{
prop: 'code',
prop: "code",
label: i18n.t("code.code"),
align: 'center'
align: "center",
},
{
prop: 'eightDisciplineType',
prop: "eightDisciplineType",
label: i18n.t("code.eightDisciplineType"),
align: 'center',
filter: codeFilter('eightDisciplineType'),
align: "center",
filter: codeFilter("eightDisciplineType"),
},
{
prop: 'occurrenceDate',
prop: "occurrenceDate",
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: "center",
filter: timeFormatter,
},
// {
// prop: 'productName',
@ -72,16 +95,17 @@ const tableProps = [
// align: 'center'
// },
{
prop: 'description',
prop: "description",
label: i18n.t("code.description"),
align: 'center'
align: "center",
},
{
prop: 'userId',
label: i18n.t("code.userId"),
align: 'center'
}
]
prop: "examineStatus",
label: i18n.t("code.examineStatus"),
align: "center",
filter: codeFilter("examineStatus"),
},
];
const tableBtn = [
{
type: "edit",
@ -91,12 +115,16 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "CAR",
btnName: "启动CAR",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// customSamplingSearch,
startEightDisciplineAdd
startEightDisciplineAdd,
},
data() {
return {
@ -106,9 +134,15 @@ export default {
},
tableProps,
tableBtn,
searchOrEditTitle: '',
searchOrEditTitle: "",
searchOrUpdateVisible: false,
formConfig: [
{
type: "input",
label: i18n.t("code.title"),
placeholder: i18n.t("code.title"),
param: "title",
},
// {
// type: "",
// label: i18n.t("params.paramCode"),
@ -120,22 +154,23 @@ export default {
// },
{
type: "button",
btnName: "新增",
name: "add",
btnName: "搜索",
name: "search",
color: "primary",
},
{
type: "button",
btnName: "搜索",
name: "search",
btnName: "新增",
name: "add",
color: "primary",
}
},
],
listQuery: {
limit: 10,
page: 1,
total: 1,
eightDisciplineStatus: 0,
examineStatus: 0
},
};
},
@ -156,19 +191,19 @@ export default {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init()
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
// this.listQuery.key = key;
this.listQuery.customSamplingCode = dataForm.customSamplingCode
this.listQuery.customSamplingCode = dataForm.customSamplingCode;
// this.listQuery.name = dataForm.name
// this.listQuery.failureTypeStatus = dataForm.failureTypeStatus
this.listQuery.page = 1
this.getDataList()
this.searchOrUpdateVisible = false
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
@ -181,7 +216,43 @@ export default {
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
this.$http
.delete(this.urlOptions.deleteURL, { data: [val.data.id] })
.then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => {});
} else if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = this.$t("edit");
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "CAR") {
this.$confirm(`确定对此条数据进行启动CAR操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let putData = {
eightDisciplineStatus: 1,
examineStatus: 1,
id: val.data.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
@ -196,13 +267,7 @@ export default {
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
.catch(() => {});
}
},
buttonClick(val) {
@ -210,21 +275,20 @@ export default {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.code = null
this.listQuery.name = null
this.listQuery.failureTypeStatus = null
this.listQuery.eightDisciplineStatus = 0
this.listQuery.title = val.title ? val.title : "";
this.listQuery.failureTypeStatus = null;
this.listQuery.eightDisciplineStatus = 0;
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrEditTitle = this.$t("add");
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
this.addOrUpdateHandle();
break;
default:
console.log(val)
console.log(val);
}
},
}
},
};
</script>

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:39
* @LastEditors: zhp
* @LastEditTime: 2023-06-29 15:56:04
* @LastEditors: zwq
* @Description:
-->
<template>
@ -13,62 +13,94 @@
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="teamSetTitle"
:dialogVisible="teamSetVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update
ref="teamSet"
:roleList="roleList"
@refreshDataList="successSubmit"
></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import basicPage from "@/mixins/basic-page";
// import transferRecordsAdd from "./components/transferRecords-add"
// import AddOrUpdate from './params-add-or-update'
import AddOrUpdate from "./components/startEightDisciplineCreateTeam-add";
// import transferRecordsSearch from "./components/transferRecordsSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
import basicSearch from "@/mixins/basic-search";
import { timeFormatter } from "@/filters/code-filter";
import codeFilter from "@/filters/code-filter";
import i18n from "@/i18n";
const tableProps = [
{
prop: 'productName',
label: i18n.t("quality.productName"),
align: 'center'
prop: "title",
label: i18n.t("code.title"),
align: "center",
},
{
prop: 'supplierName',
label: i18n.t("quality.supplierName"),
align: 'center'
prop: "eightDisciplineType",
label: i18n.t("oss.type"),
align: "center",
filter: codeFilter("eightDisciplineType"),
},
{
prop: 'transferOutName',
label: i18n.t("quality.transferOutName"),
align: 'center'
},
{
prop: 'transferInName',
label: i18n.t("quality.transferInName"),
align: 'center'
prop: "occurrenceDate",
label: i18n.t("gage.createDate"),
align: "center",
filter: timeFormatter,
},
{
prop: 'dataSources',
label: i18n.t("quality.dataSources"),
align: 'center'
},
{
prop: 'remark',
label: i18n.t("quality.remark"),
align: 'center'
prop: "productName",
label: i18n.t("code.productName"),
align: "center",
},
{
prop: 'userName',
label: i18n.t("quality.userName"),
align: 'center'
}
]
prop: "customName",
label: i18n.t("gage.connection"),
align: "center",
},
{
prop: "description",
label: i18n.t("basic.remark"),
align: "center",
},
{
prop: "userId",
label: i18n.t("code.userId"),
align: "center",
},
];
const tableBtn = [
{
type: "edit",
@ -78,12 +110,15 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "team",
btnName: "团队",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferRecordsSearch,
// transferRecordsAdd
AddOrUpdate,
},
data() {
return {
@ -93,12 +128,16 @@ export default {
},
tableProps,
tableBtn,
teamSetTitle: "",
teamSetVisible: false,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 2
eightDisciplineStatus: 2,
examineStatus: 0,
},
searchOrEditTitle: '',
roleList: [],
searchOrEditTitle: "",
searchOrUpdateVisible: false,
formConfig: [
// {
@ -111,23 +150,20 @@ export default {
// type: "separate",
// },
{
type: 'input',
label: i18n.t('code.title'),
placeholder: i18n.t('code.title'),
param: 'title'
type: "input",
label: i18n.t("code.title"),
placeholder: i18n.t("code.title"),
param: "title",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
}
},
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
@ -161,47 +197,71 @@ export default {
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
this.$http
.delete(this.urlOptions.deleteURL, { data: [val.data.id] })
.then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
.catch(() => {});
} else if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = this.$t("edit");
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "team") {
this.$http
.get("/sys/user/list")
.then(({ data: res }) => {
if (res.code === 0) {
this.roleList = res.data;
this.teamSetVisible = true;
this.teamSetTitle = "团队";
this.$nextTick(() => {
this.$refs.teamSet.init(val.data.id);
});
}
})
.catch(() => {});
}
},
handleCancel() {
this.$refs.teamSet.formClear();
this.teamSetVisible = false;
this.teamSetTitle = "";
},
handleConfirm() {
this.$refs.teamSet.dataFormSubmit();
},
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.title = val.title ? val.title : ''
this.listQuery.title = val.title ? val.title : "";
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t('add')
this.addOrEditTitle = this.$t("add");
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
this.addOrUpdateHandle();
break;
default:
console.log(val)
console.log(val);
}
},
}
},
};
</script>

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:18
* @LastEditors: zhp
* @LastEditTime: 2023-06-30 09:26:26
* @LastEditors: zwq
* @Description:
-->
<template>
@ -14,12 +14,21 @@
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
@ -31,7 +40,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplineDescriptionCorrectiveAction-add.vue'
import basicSearch from "@/mixins/basic-search"
import codeFilter from '@/filters/code-filter'
import { timeFormatter } from "@/filters/code-filter"
import i18n from "@/i18n"
const tableProps = [
{
@ -47,12 +59,14 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
align: 'center',
filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: 'center',
filter: timeFormatter,
},
// {
// prop: 'productName',
@ -84,12 +98,15 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "corrective",
btnName: "纠正",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
AddOrUpdate,
},
data() {
return {
@ -102,7 +119,8 @@ export default {
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 5
eightDisciplineStatus: 5,
examineStatus: 0
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -180,6 +198,12 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "corrective") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "纠正措施描述"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:07
* @LastEditors: zhp
* @LastEditTime: 2023-06-29 13:57:15
* @LastEditors: zwq
* @Description:
-->
<template>
@ -14,12 +14,21 @@
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="110" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
@ -27,11 +36,13 @@
<script>
import basicPage from "@/mixins/basic-page"
// import InspectionPositionAdd from "./components/InspectionPosition-add"
// import AddOrUpdate from './params-add-or-update'
import AddOrUpdate from './components/startEightDisciplinePreliminaryAnalysis-add.vue'
// import failureTypeSearch from "./components/failureTypeSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import i18n from "@/i18n"
import codeFilter from '@/filters/code-filter'
import { timeFormatter } from "@/filters/code-filter"
const tableProps = [
{
prop: 'title',
@ -46,12 +57,14 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
align: 'center',
filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: 'center',
filter: timeFormatter,
},
// {
// prop: 'productName',
@ -83,12 +96,15 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "analysis",
btnName: "分析",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
// InspectionPositionAdd
AddOrUpdate,
},
data() {
return {
@ -102,7 +118,8 @@ export default {
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus:1
eightDisciplineStatus:1,
examineStatus: 0
},
searchOrUpdateVisible: false,
formConfig: [
@ -188,6 +205,12 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "analysis") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "初步分析"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data);
});
}
},
buttonClick(val) {

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:50
* @LastEditors: zhp
* @LastEditTime: 2023-06-30 09:34:16
* @LastEditors: zwq
* @Description:
-->
<template>
@ -14,12 +14,21 @@
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
@ -31,7 +40,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplinePreventRecurrence-add.vue'
import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [
{
@ -47,12 +59,14 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
align: 'center',
filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: 'center',
filter: timeFormatter,
},
// {
// prop: 'productName',
@ -84,12 +98,15 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "prevent",
btnName: "预防",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
AddOrUpdate,
},
data() {
return {
@ -102,7 +119,8 @@ export default {
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 6
eightDisciplineStatus: 7,
examineStatus: 0
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -180,6 +198,12 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "prevent") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "预防再发生"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {

View File

@ -0,0 +1,155 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter"
import i18n from "@/i18n";
const tableProps = [
{
prop: "title",
label: i18n.t("code.title"),
align: "center",
},
{
prop: "code",
label: i18n.t("code.code"),
align: "center",
},
{
prop: "eightDisciplineType",
label: i18n.t("code.eightDisciplineType"),
align: "center",
filter: codeFilter("eightDisciplineType"),
},
{
prop: "occurrenceDate",
label: i18n.t("code.occurrenceDate"),
align: "center",
filter: timeFormatter,
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: "description",
label: i18n.t("code.description"),
align: "center",
},
{
prop: "examineStatus",
label: i18n.t("code.examineStatus"),
align: "center",
filter: codeFilter("examineStatus"),
},
];
const eightDisciplineStatusArr = [
{
name: "D0",
id: 0,
},
{
name: "D1",
id: 1,
},
{
name: "D2",
id: 2,
},
{
name: "D3",
id: 3,
},
{
name: "D4",
id: 4,
},
{
name: "D5",
id: 5,
},
{
name: "D6",
id: 6,
},
{
name: "D7",
id: 7,
},
{
name: "D8",
id: 8,
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
eightDisciplineStatusArr,
tableData: [],
formConfig: [
{
type: "select",
label: "状态",
selectOptions: eightDisciplineStatusArr,
param: "status",
defaultSelect: "",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
],
};
},
methods: {
//search-bar
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.eightDisciplineStatus = val.status;
this.listQuery.page = 1;
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:40
* @LastEditors: zhp
* @LastEditTime: 2023-06-30 09:21:25
* @LastEditors: zwq
* @Description:
-->
<template>
@ -14,12 +14,21 @@
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
@ -30,7 +39,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplineRootCauseAnalysis-add.vue'
import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [
{
@ -46,12 +58,14 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
align: 'center',
filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: 'center',
filter: timeFormatter,
},
// {
// prop: 'productName',
@ -83,12 +97,15 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "analysis",
btnName: "分析",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
AddOrUpdate,
},
data() {
return {
@ -101,7 +118,8 @@ export default {
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 4
eightDisciplineStatus: 4,
examineStatus: 0
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -179,6 +197,12 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "analysis") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "根本原因分析"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data);
});
}
},
buttonClick(val) {

View File

@ -2,8 +2,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:30
* @LastEditors: zhp
* @LastEditTime: 2023-06-30 09:37:58
* @LastEditors: zwq
* @Description:
-->
<template>
@ -15,12 +15,21 @@
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
@ -31,7 +40,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplineSummaryExperience-add.vue'
import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [
{
@ -47,12 +59,14 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
align: 'center',
filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: 'center',
filter: timeFormatter,
},
// {
// prop: 'productName',
@ -84,12 +98,15 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "summary",
btnName: "总结",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
AddOrUpdate,
},
data() {
return {
@ -102,7 +119,8 @@ export default {
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 8
eightDisciplineStatus: 8,
examineStatus: 0
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -180,6 +198,12 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "summary") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "总结与经验分享"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:13:01
* @LastEditors: zhp
* @LastEditTime: 2023-06-29 16:48:05
* @LastEditors: zwq
* @Description:
-->
<template>
@ -14,23 +14,41 @@
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="teamSetTitle"
:dialogVisible="teamSetVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width=70%
>
<add-or-update
ref="teamSet"
:roleList="roleList"
@refreshDataList="successSubmit"
></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import AddOrUpdate from "./components/startEightDisciplineTemporaryTreatmentMeasures-add";
// import samplingPlanAdd from "./components/samplingPlan-add"
// import AddOrUpdate from './params-add-or-update'
// import failureTypeSearch from "./components/failureTypeSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [
{
@ -46,12 +64,14 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
align: 'center',
filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: 'center',
filter: timeFormatter,
},
// {
// prop: 'productName',
@ -83,12 +103,15 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "measure",
btnName: "措施",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// failureTypeSearch,
// samplingPlanAdd
AddOrUpdate,
},
data() {
return {
@ -96,10 +119,14 @@ export default {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
roleList: [],
teamSetTitle: "",
teamSetVisible: false,
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 3
eightDisciplineStatus: 3,
examineStatus: 0
},
tableProps,
tableBtn,
@ -188,8 +215,30 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "measure") {
this.$http
.get("/sys/user/list")
.then(({ data: res }) => {
if (res.code === 0) {
this.roleList = res.data;
this.teamSetVisible = true;
this.teamSetTitle = "措施";
this.$nextTick(() => {
this.$refs.teamSet.init(val.data.id);
});
}
})
.catch(() => {});
}
},
handleCancel() {
this.$refs.teamSet.formClear();
this.teamSetVisible = false;
this.teamSetTitle = "";
},
handleConfirm() {
this.$refs.teamSet.dataFormSubmit();
},
buttonClick(val) {
switch (val.btnName) {
case "search":

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:09:59
* @LastEditors: zhp
* @LastEditTime: 2023-06-30 09:31:04
* @LastEditors: zwq
* @Description:
-->
<template>
@ -14,12 +14,21 @@
</el-badge> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
@ -30,7 +39,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplineValidation-add.vue'
import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [
{
@ -46,12 +58,14 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
align: 'center'
align: 'center',
filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"),
align: 'center'
align: 'center',
filter: timeFormatter,
},
// {
// prop: 'productName',
@ -83,12 +97,15 @@ const tableBtn = [
type: "delete",
btnName: "删除",
},
{
type: "validation",
btnName: "验证",
},
];
export default {
mixins: [basicPage, basicSearch],
components: {
// transferSchemeSearch,
// transferSchemeAdd
AddOrUpdate,
},
data() {
return {
@ -101,7 +118,8 @@ export default {
listQuery: {
limit: 10,
page: 1,
eightDisciplineStatus: 7
eightDisciplineStatus: 6,
examineStatus: 0
},
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -179,6 +197,12 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "validation") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "有效性验证"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) {

View File

@ -0,0 +1,139 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="60"
:label="$t('handle')"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
<script>
import AddOrUpdate from "./components/startEightGrade-add";
import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter";
import i18n from "@/i18n";
const tableProps = [
{
prop: "title",
label: i18n.t("code.title"),
align: "center",
},
{
prop: "code",
label: i18n.t("code.code"),
align: "center",
},
{
prop: "eightDisciplineType",
label: i18n.t("code.eightDisciplineType"),
align: "center",
filter: codeFilter("eightDisciplineType"),
},
{
prop: "occurrenceDate",
label: i18n.t("code.occurrenceDate"),
align: "center",
filter: timeFormatter,
},
{
prop: "description",
label: i18n.t("code.description"),
align: "center",
},
{
prop: "examineStatus",
label: i18n.t("code.examineStatus"),
align: "center",
filter: codeFilter("examineStatus"),
},
];
const tableBtn = [
{
type: "grade",
btnName: "打分",
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
total: 1,
eightDisciplineStatus: 9,
examineStatus: 0,
},
tableData: [],
formConfig: [
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
],
};
},
components: {
AddOrUpdate,
},
methods: {
//search-bar
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.getDataList();
break;
default:
console.log(val);
}
},
otherMethods(val) {
this.addOrEditTitle = "打分";
this.addOrUpdateVisible = true;
this.addOrUpdateHandle(val.data.id);
},
},
};
</script>