zhp #19

Merged
zhp merged 2 commits from zhp into master 2023-07-14 15:37:24 +08:00
30 changed files with 614 additions and 234 deletions
Showing only changes of commit 9702f23d55 - Show all commits

View File

@ -1,13 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 09:49:36 * @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-31 15:50:02 * @LastEditTime: 2023-07-14 13:46:42
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
<span> <span>
<el-tag v-if="injectData.eightDisciplineStatus === 1" type="success">可用</el-tag> <el-tag v-if="injectData.eightDisciplineStatus === 1||injectData.problemStatus === 1" type="success">可用</el-tag>
<el-tag v-else type="warning">不可用</el-tag> <el-tag v-else type="warning">不可用</el-tag>
</span> </span>
</template> </template>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:04:28 * @LastEditTime: 2023-07-14 10:17:26
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -321,7 +321,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@ -333,7 +332,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@ -345,7 +343,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@ -361,7 +358,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.unitList = res.data.list this.unitList = res.data.list
} }
}) })
@ -373,7 +369,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@ -385,7 +380,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })
@ -411,7 +405,6 @@ export default {
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false; this.visible = false;
console.log(1111);
this.$emit("successSubmit"); this.$emit("successSubmit");
}, },
}); });

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zwq
* @LastEditTime: 2023-06-20 15:20:53 * @LastEditTime: 2023-07-14 10:17:37
* @Description: * @Description:
--> -->
<template> <template>
@ -211,7 +211,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@ -223,7 +222,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@ -235,7 +233,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@ -247,7 +244,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

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-06-28 16:51:03 * @LastEditTime: 2023-07-14 10:17:44
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -155,7 +155,6 @@ export default {
type: "success", type: "success",
duration: 500, duration: 500,
onClose: () => { onClose: () => {
console.log(1111);
this.visible = false; this.visible = false;
this.$emit("successSubmit"); this.$emit("successSubmit");
}, },

View File

@ -0,0 +1,69 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zwq
* @LastEditTime: 2023-07-14 14:03:43
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" label-width="120px">
<el-form-item prop="name" :label="$t('code.name')">
<el-input v-model="dataForm.name" :placeholder="$t('code.name')">
</el-input>
</el-form-item>
<el-form-item prop="code" :label="$t('code.code')">
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
</el-form-item>
<el-form-item prop="eightDisciplineStatus" :label="$t('code.eightDisciplineStatus')">
<el-switch v-model="dataForm.eightDisciplineStatus" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
optionArrUrl: [],
},
visible: false,
dataForm: {
code: "",
name: "",
eightDisciplineStatus: 0
},
};
},
computed: {
dataRule() {
return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
methods: {
init() {
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
this.getArr();
});
},
dataFormSubmit() {
this.$emit("refreshDataList", this.dataForm);
},
},
};
</script>

View File

@ -0,0 +1,78 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 13:41:37
* @LastEditors: zwq
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
<el-form-item prop="name" :label="$t('code.name')">
<el-input v-model="dataForm.name" :placeholder="$t('code.name')">
</el-input>
</el-form-item>
<el-form-item prop="code" :label="$t('code.code')">
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
</el-form-item>
<el-form-item prop="problemStatus" label="状态">
<el-switch v-model="dataForm.problemStatus" :active-value="1" :inactive-value="0">
</el-switch>
</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>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
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 {
// dictLabel: [
// {
// 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

@ -2,8 +2,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:05:29 * @LastEditTime: 2023-07-14 10:18:03
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -322,7 +322,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@ -334,7 +333,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@ -346,7 +344,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@ -362,7 +359,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.unitList = res.data.list this.unitList = res.data.list
} }
}) })
@ -374,7 +370,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@ -386,7 +381,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })
@ -412,7 +406,6 @@ export default {
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false; this.visible = false;
console.log(1111);
this.$emit("successSubmit"); this.$emit("successSubmit");
}, },
}); });

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zwq
* @LastEditTime: 2023-06-20 15:23:54 * @LastEditTime: 2023-07-14 10:18:16
* @Description: * @Description:
--> -->
<template> <template>
@ -211,7 +211,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@ -223,7 +222,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@ -235,7 +233,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@ -247,7 +244,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:18:54 * @LastEditTime: 2023-07-14 10:18:33
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -480,7 +480,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@ -492,7 +491,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@ -504,7 +502,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@ -520,7 +517,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.unitList = res.data.list this.unitList = res.data.list
} }
}) })
@ -532,7 +528,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@ -544,7 +539,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zwq
* @LastEditTime: 2023-06-20 15:26:47 * @LastEditTime: 2023-07-14 10:19:47
* @Description: * @Description:
--> -->
<template> <template>
@ -244,7 +244,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@ -256,7 +255,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@ -268,7 +266,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@ -280,7 +277,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@ -292,7 +288,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:27:51 * @LastEditTime: 2023-07-14 10:19:44
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -480,7 +480,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@ -492,7 +491,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@ -504,7 +502,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@ -520,7 +517,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.unitList = res.data.list this.unitList = res.data.list
} }
}) })
@ -532,7 +528,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@ -544,7 +539,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zwq
* @LastEditTime: 2023-06-20 15:27:11 * @LastEditTime: 2023-07-14 10:19:42
* @Description: * @Description:
--> -->
<template> <template>
@ -244,7 +244,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@ -256,7 +255,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@ -268,7 +266,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@ -280,7 +277,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@ -292,7 +288,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

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-03 16:24:52 * @LastEditTime: 2023-07-14 10:20:02
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -84,9 +84,9 @@
> >
<el-option <el-option
v-for="item in defectList" v-for="item in defectList"
:key="item.dictTypeId" :key="item.id"
:label="item.dictLabel" :label="item.name"
:value="item.dictTypeId" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -386,13 +386,12 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.teamList = res.data.list; this.teamList = res.data.list;
} }
}) })
.catch(() => {}); .catch(() => {});
this.$http this.$http
.get(this.urlOptions.getDictURL, { .get("code/problemType/page", {
params: { params: {
limit: 999, limit: 999,
page: 1, page: 1,
@ -401,7 +400,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.defectList = res.data.list; this.defectList = res.data.list;
} }
}) })
@ -416,7 +414,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.dutyList = res.data.list; this.dutyList = res.data.list;
} }
}) })
@ -455,7 +452,6 @@ export default {
type: "success", type: "success",
duration: 500, duration: 500,
onClose: () => { onClose: () => {
console.log(1111);
this.visible = false; this.visible = false;
this.$emit("successSubmit"); this.$emit("successSubmit");
}, },

View File

@ -3,7 +3,7 @@
* @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 09:07:57 * @LastEditTime: 2023-07-14 10:20:11
* @Description: * @Description:
--> -->
<template> <template>
@ -151,7 +151,6 @@ export default {
formClear() {}, formClear() {},
// //
dataFormSubmit() { dataFormSubmit() {
console.log(this.tableData);
let putData = { let putData = {
eightDisciplineStatus: 4, eightDisciplineStatus: 4,
examineStatus: 1, examineStatus: 1,

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-19 15:52:51 * @Date: 2023-06-19 15:52:51
* @LastEditTime: 2023-06-20 15:37:10 * @LastEditTime: 2023-07-14 10:15:12
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -187,7 +187,6 @@ export default {
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {} this.productData = val.newVal ? val.newVal: {}
}, },
setCurrent(index) { setCurrent(index) {
@ -286,12 +285,10 @@ export default {
}) })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val);
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
@ -303,7 +300,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData);
}); });
console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

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 11:16:43 * @LastEditTime: 2023-07-14 14:06:53
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -10,59 +10,87 @@
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="3" class="item"> <el-badge :value="3" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button> <el-button type="primary" size="small" @click="searchsClick">条件搜索</el-button>
</el-badge> </el-badge>
</SearchBar> </SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData"> <base-table
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn" :table-props="tableProps"
@clickBtn="handleClick" /> :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> </base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination
@pagination="getDataList" /> :limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<!-- 弹窗, 条件搜索-->
<base-dialog
:dialogTitle="searchsTitle"
:dialogVisible="searchsVisible"
@cancel="searchsCancel"
@confirm="searchsConfirm"
:before-close="searchsCancel"
>
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog
@confirm="handleConfirm" :before-close="handleCancel"> :dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<eightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit"> <eightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
</eightDiscipline-add> </eightDiscipline-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page" import basicPage from "@/mixins/basic-page";
import eightDisciplineAdd from "./components/eightDiscipline-add" import eightDisciplineAdd from "./components/eightDiscipline-add";
// import AddOrUpdate from './params-add-or-update' import available from "./components/available.vue";
// import disposalMethodSearch from "./components/disposalMethodSearch" import Searchs from "./components/eightDiscipline-searchs";
import available from "./components/available.vue" import codeFilter from "@/filters/code-filter";
import basicSearch from "@/mixins/basic-search" import i18n from "@/i18n";
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: "name",
label: i18n.t("code.name"), label: i18n.t("code.name"),
align: 'center' align: "center",
}, },
{ {
prop: 'code', prop: "code",
label: i18n.t("code.code"), label: i18n.t("code.code"),
align: 'center' align: "center",
}, },
{ {
prop: 'eightDisciplineType', prop: "eightDisciplineType",
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center', align: "center",
filter: codeFilter('eightDisciplineType'), filter: codeFilter("eightDisciplineType"),
}, },
{ {
prop: 'problemStatus', prop: "problemStatus",
label: i18n.t("code.problemStatus"), label: i18n.t("code.problemStatus"),
align: 'center', align: "center",
subcomponent: available subcomponent: available,
} },
] ];
const tableBtn = [ const tableBtn = [
{ {
type: "edit", type: "edit",
@ -74,10 +102,10 @@ const tableBtn = [
}, },
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
components: { components: {
// disposalMethodSearch, eightDisciplineAdd,
eightDisciplineAdd Searchs
}, },
data() { data() {
return { return {
@ -87,18 +115,7 @@ export default {
}, },
tableProps, tableProps,
tableBtn, tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [ formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{ {
type: "button", type: "button",
btnName: "新增", btnName: "新增",
@ -110,90 +127,35 @@ export default {
btnName: "搜索", btnName: "搜索",
name: "search", name: "search",
color: "primary", color: "primary",
} },
], ],
}; };
}, },
// components: {
// AddOrUpdate,
// },
methods: { methods: {
//search-bar //search-bar
handleProductCancel() { searchsClick() {
this.productOrUpdateVisible = false; this.searchsTitle = "条件搜索";
this.productOrEditTitle = ""; this.searchsHandle();
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
conditionSearchSubmit(dataForm) {
this.listQuery.disposalMethodStatus = dataForm.disposalMethodStatus
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
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);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
}, },
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.code = null this.listQuery.code = null;
this.listQuery.name = null this.listQuery.name = null;
this.listQuery.failureTypeStatus = null this.listQuery.eightDisciplineStatus = null;
this.getDataList(); this.getDataList();
break; break;
case "add": case "add":
this.addOrEditTitle = this.$t('add') this.addOrEditTitle = this.$t("add");
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrUpdateHandle() this.addOrUpdateHandle();
break; break;
default: default:
console.log(val) console.log(val);
} }
}, },
} },
}; };
</script> </script>

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-29 11:02:36 * @LastEditTime: 2023-07-14 10:15:45
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -167,7 +167,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@ -0,0 +1,143 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 13:53:02
* @LastEditors: zwq
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> </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>
<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 basicPage from "@/mixins/basic-page";
import AddOrUpdate from "./components/problemType-add";
import available from "./components/available.vue";
import i18n from "@/i18n";
const tableProps = [
{
prop: "name",
label: i18n.t("code.name"),
align: "center",
},
{
prop: "code",
label: i18n.t("code.code"),
align: "center",
},
{
prop: "description",
label: "描述",
align: "center",
},
{
prop: "problemStatus",
label: i18n.t("code.problemStatus"),
align: "center",
subcomponent: available,
},
];
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage],
components: {
AddOrUpdate,
},
data() {
return {
urlOptions: {
getDataListURL: "/code/problemType/page",
deleteURL: "/code/problemType",
},
tableProps,
tableBtn,
formConfig: [
{
type: "select",
label: "状态",
selectOptions: [
{ id: 1, name: "可用" },
{ id: 0, name: "不可用" },
],
param: "problemStatus",
defaultSelect: "",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
],
};
},
methods: {
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.listQuery.problemStatus = val.problemStatus;
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t("add");
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-19 15:52:51 * @Date: 2023-06-19 15:52:51
* @LastEditTime: 2023-06-20 15:37:02 * @LastEditTime: 2023-07-14 10:16:01
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -186,7 +186,6 @@ export default {
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {} this.productData = val.newVal ? val.newVal: {}
}, },
setCurrent(index) { setCurrent(index) {
@ -285,12 +284,10 @@ export default {
}) })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val);
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
@ -302,7 +299,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData);
}); });
console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-12 13:22:50 * @Date: 2023-06-12 13:22:50
* @LastEditTime: 2023-06-20 15:36:58 * @LastEditTime: 2023-07-14 10:16:14
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -203,7 +203,6 @@ export default {
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {} this.productData = val.newVal ? val.newVal: {}
}, },
setCurrent(index) { setCurrent(index) {
@ -302,12 +301,10 @@ export default {
}) })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val);
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
@ -319,7 +316,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData);
}); });
console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-12 13:22:50 * @Date: 2023-06-12 13:22:50
* @LastEditTime: 2023-06-20 15:36:53 * @LastEditTime: 2023-07-14 10:16:28
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -203,7 +203,6 @@ export default {
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {} this.productData = val.newVal ? val.newVal: {}
}, },
setCurrent(index) { setCurrent(index) {
@ -302,12 +301,10 @@ export default {
}) })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val);
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
@ -319,7 +316,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData);
}); });
console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

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-29 11:15:25 * @LastEditTime: 2023-07-14 10:16:34
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -208,7 +208,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

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-29 15:56:04 * @LastEditTime: 2023-07-14 10:16:41
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -189,7 +189,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

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:26:26 * @LastEditTime: 2023-07-14 10:16:46
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -168,7 +168,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

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-29 13:57:15 * @LastEditTime: 2023-07-14 10:16:53
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -175,7 +175,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

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:34:16 * @LastEditTime: 2023-07-14 10:16:58
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -168,7 +168,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

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-29 16:48:05 * @LastEditTime: 2023-07-14 10:17:04
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -185,7 +185,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@ -23,6 +23,10 @@ export default {
return []; return [];
}, },
}, },
eType: {
type: Number,
default: 0
}
}, },
data() { data() {
return { return {
@ -81,12 +85,11 @@ export default {
this.dataList.forEach((item) => { this.dataList.forEach((item) => {
const i = option.series.findIndex((c) => c.id === item.productTypeId); const i = option.series.findIndex((c) => c.id === item.productTypeId);
if (i >= 0) { if (i >= 0) {
option.series[i].data.push(item.productTypeNumber); option.series[i].data.push(this.eType?item.problemTypeNumber:item.productTypeNumber);
} else { } else {
console.log(item.productTypeName)
const obj = { const obj = {
name: item.productTypeName, name: this.eType?item.problemTypeName:item.productTypeName,
id: item.productTypeId, id: this.eType?item.problemTypeId:item.productTypeId,
type: "bar", type: "bar",
stack: "total", stack: "total",
label: { label: {
@ -97,7 +100,7 @@ export default {
}, },
data: [], data: [],
}; };
obj.data.push(item.productTypeNumber); obj.data.push(this.eType?item.problemTypeNumber:item.productTypeNumber);
option.series.push(obj); option.series.push(obj);
} }
}) })

View File

@ -23,6 +23,10 @@ export default {
return []; return [];
}, },
}, },
eType: {
type: Number,
default: 0
}
}, },
data() { data() {
return { return {
@ -62,8 +66,8 @@ export default {
radius: "50%", radius: "50%",
data: this.dataList?.map((item) => { data: this.dataList?.map((item) => {
const obj = { const obj = {
value: item.productTypeNumber, value: this.eType?item.problemTypeNumber:item.productTypeNumber,
name: item.productTypeName, name: this.eType?item.problemTypeName:item.productTypeName,
}; };
return obj; return obj;
}), }),

View File

@ -0,0 +1,194 @@
<!--
* @Author: zwq
* @Date: 2023-07-03 15:21:14
* @LastEditors: zwq
* @LastEditTime: 2023-07-14 14:10:48
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<div style="height:20px;width:100%"></div>
<el-row :gutter="4" style="margin-top:20px">
<el-col :span="12" v-if="pieVisible">
<pie-chart
v-loading="pieLoading"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
ref="pieRef"
:e-type="1"
:title="'问题类型分布图'"
:data-list="pieData"
></pie-chart>
</el-col>
<el-col :span="12" v-else>
<el-empty description="无数据"></el-empty>
</el-col>
<el-col :span="12" v-if="lineVisible">
<line-chart
v-loading="lineLoading"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
ref="lineRef"
:e-type="1"
:title="'问题类型月份分布图'"
:data-list="lineData"
></line-chart>
</el-col>
<el-col :span="12" v-else>
<el-empty description="无数据"></el-empty>
</el-col>
</el-row>
</div>
</el-card>
</template>
<script>
import pieChart from "./components/pie-chart";
import lineChart from "./components/line-chart";
import basicPage from "@/mixins/basic-page";
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
pieURL: "/code/startEightDiscipline/problem/type/distribution",
lineURL: "/code/startEightDiscipline/problem/type/month/distribution",
},
pieLoading: false,
pieVisible: false,
lineLoading: false,
lineVisible: false,
listQuery: {
limit: 999,
page: 1,
total: 1,
},
formConfig: [
{
type: "datePicker",
label: "日期",
dateType: "daterange",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-ddTHH:mm:ss",
rangeSeparator: "-",
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
param: "time",
},
{
type: "select",
label: "8D类型",
selectOptions: [
{ id: 1, name: "客诉问题" },
{ id: 2, name: "重大质量问题" },
{ id: 0, name: "重复发生问题" },
],
param: "eightDisciplineType",
defaultSelect: "",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
],
pieData: [],
lineData: [],
};
},
components: {
pieChart,
lineChart,
},
methods: {
//
getDataList() {
this.dataListLoading = true;
this.$http
.post(this.urlOptions.pieURL, this.listQuery)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.pieData = [];
this.pieLoading = false;
return this.$message.error(res.msg);
}
this.pieLoading = false;
this.pieData = res.data;
if (this.pieData.length > 0) {
this.pieVisible = true;
this.$nextTick(() => {
this.$refs.pieRef.initChartLine();
});
} else {
this.pieVisible = false;
this.$message({
message: "没有发现数据",
type: "warning",
});
}
})
.catch(() => {});
this.$http
.post(this.urlOptions.lineURL, this.listQuery)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.lineData = [];
this.lineLoading = false;
return this.$message.error(res.msg);
}
this.lineLoading = false;
this.lineData = res.data;
if (this.lineData.length > 0) {
this.lineVisible = true;
this.$nextTick(() => {
this.$refs.lineRef.initChartLine();
});
} else {
this.lineVisible = false;
this.$message({
message: "没有发现数据",
type: "warning",
});
}
})
.catch(() => {});
},
//search-bar
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.listQuery.eightDisciplineType = val.eightDisciplineType;
this.listQuery.startTime = val.time && val.time.length > 0 ? val.time[0] : "";
this.listQuery.endTime = val.time && val.time.length > 0 ? val.time[1] : "";
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>
<style lang="scss">
.mod-sys__user {
> .el-row {
display:flex;
flex-wrap: wrap;
.el-col {
}
}
.chart-box {
min-height: 400px;
}
}
</style>