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
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-31 15:50:02
* @LastEditors: zhp
* @LastEditTime: 2023-07-14 13:46:42
* @LastEditors: zwq
* @Description:
-->
<template>
<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>
</span>
</template>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
* @Author: zwq
* @Date: 2023-06-29 14:12:48
* @LastEditors: zwq
* @LastEditTime: 2023-06-30 09:07:57
* @LastEditTime: 2023-07-14 10:20:11
* @Description:
-->
<template>
@ -151,7 +151,6 @@ export default {
formClear() {},
//
dataFormSubmit() {
console.log(this.tableData);
let putData = {
eightDisciplineStatus: 4,
examineStatus: 1,

View File

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

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 11:16:43
* @LastEditTime: 2023-07-14 14:06:53
* @LastEditors: zwq
* @Description:
-->
@ -10,18 +10,48 @@
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<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>
</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="100"
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="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"
@confirm="handleConfirm" :before-close="handleCancel">
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<eightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
</eightDiscipline-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
@ -31,38 +61,36 @@
</template>
<script>
import basicPage from "@/mixins/basic-page"
import eightDisciplineAdd from "./components/eightDiscipline-add"
// import AddOrUpdate from './params-add-or-update'
// import disposalMethodSearch from "./components/disposalMethodSearch"
import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
import basicPage from "@/mixins/basic-page";
import eightDisciplineAdd from "./components/eightDiscipline-add";
import available from "./components/available.vue";
import Searchs from "./components/eightDiscipline-searchs";
import codeFilter from "@/filters/code-filter";
import i18n from "@/i18n";
const tableProps = [
{
prop: 'name',
prop: "name",
label: i18n.t("code.name"),
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: 'problemStatus',
prop: "problemStatus",
label: i18n.t("code.problemStatus"),
align: 'center',
subcomponent: available
}
]
align: "center",
subcomponent: available,
},
];
const tableBtn = [
{
type: "edit",
@ -74,10 +102,10 @@ const tableBtn = [
},
];
export default {
mixins: [basicPage, basicSearch],
mixins: [basicPage],
components: {
// disposalMethodSearch,
eightDisciplineAdd
eightDisciplineAdd,
Searchs
},
data() {
return {
@ -87,18 +115,7 @@ export default {
},
tableProps,
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
@ -110,90 +127,35 @@ export default {
btnName: "搜索",
name: "search",
color: "primary",
}
},
],
};
},
// components: {
// AddOrUpdate,
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
// 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);
});
}
searchsClick() {
this.searchsTitle = "条件搜索";
this.searchsHandle();
},
buttonClick(val) {
switch (val.btnName) {
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.code = null;
this.listQuery.name = null;
this.listQuery.eightDisciplineStatus = null;
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,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 11:02:36
* @LastEditTime: 2023-07-14 10:15:45
* @LastEditors: zwq
* @Description:
-->
@ -167,7 +167,6 @@ export default {
// this.conditionSearchSubmit();
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
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
* @Date: 2023-06-19 15:52:51
* @LastEditTime: 2023-06-20 15:37:02
* @LastEditors: zhp
* @LastEditTime: 2023-07-14 10:16:01
* @LastEditors: zwq
* @Description:
-->
<template>
@ -186,7 +186,6 @@ export default {
this.productOrEditTitle = "";
},
handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {}
},
setCurrent(index) {
@ -285,12 +284,10 @@ export default {
})
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1;
this.getDataList();
break;
@ -302,7 +299,6 @@ export default {
this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData);
});
console.log(this.productId);
break;
case "add":
this.addOrEditTitle = '新增'

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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