更新8D #21

Merged
zwq merged 1 commits from zwq into master 2023-07-17 10:18:52 +08:00
12 changed files with 605 additions and 116 deletions
Showing only changes of commit 0626237912 - Show all commits

View File

@ -15,7 +15,7 @@
"axios": "^0.19.2", "axios": "^0.19.2",
"babel-eslint": "^8.0.1", "babel-eslint": "^8.0.1",
"babel-plugin-component": "^1.1.1", "babel-plugin-component": "^1.1.1",
"code-brick-zj": "0.0.7", "code-brick-zj": "1.0.2",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"echarts": "^5.4.2", "echarts": "^5.4.2",
"element-theme": "^2.0.1", "element-theme": "^2.0.1",

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-22 14:57:51 * @Date: 2022-08-22 14:57:51
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-05-12 12:46:50 * @LastEditTime: 2023-07-14 15:53:17
* @Description: * @Description:
--> -->
<template> <template>
@ -39,7 +39,8 @@
<use xlink:href="#icon-home"></use> <use xlink:href="#icon-home"></use>
</svg> </svg>
</el-menu-item> </el-menu-item>
<el-menu-item index="7"> <!-- 中英文 -->
<!-- <el-menu-item index="7">
<el-dropdown trigger="click" class="international" @command="handleSetLanguage"> <el-dropdown trigger="click" class="international" @command="handleSetLanguage">
<div> <div>
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
@ -55,7 +56,7 @@
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-menu-item> </el-menu-item> -->
<el-menu-item index="4" @click="fullscreenHandle()"> <el-menu-item index="4" @click="fullscreenHandle()">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-fullscreen"></use> <use xlink:href="#icon-fullscreen"></use>

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-14 10:20:02 * @LastEditTime: 2023-07-17 10:00:53
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -9,6 +9,7 @@
<el-form <el-form
:model="dataForm" :model="dataForm"
ref="dataForm" ref="dataForm"
:rules="dataRule"
@keyup.enter.native="dataFormSubmitHandle()" @keyup.enter.native="dataFormSubmitHandle()"
label-width="100px" label-width="100px"
> >
@ -317,27 +318,48 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ code: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请输入编码",
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ title: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请输入标题",
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [ eightDisciplineType: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请选择8D类型",
// trigger: "blur", trigger: "change",
// }, },
// ], ],
defectSourceId: [
{
required: true,
message: "请选择缺陷来源",
trigger: "change",
},
],
occurrenceDate: [
{
required: true,
message: "请选择发生日期",
trigger: "change",
},
],
product: [
{
required: true,
message: "请选择产品",
trigger: "change",
},
],
}; };
}, },
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 14:06:53 * @LastEditTime: 2023-07-17 09:08:38
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -9,9 +9,6 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="3" class="item">
<el-button type="primary" size="small" @click="searchsClick">条件搜索</el-button>
</el-badge>
</SearchBar> </SearchBar>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
@ -35,7 +32,7 @@
@pagination="getDataList" @pagination="getDataList"
/> />
<!-- 弹窗, 条件搜索--> <!-- 弹窗, 条件搜索-->
<base-dialog <!-- <base-dialog
:dialogTitle="searchsTitle" :dialogTitle="searchsTitle"
:dialogVisible="searchsVisible" :dialogVisible="searchsVisible"
@cancel="searchsCancel" @cancel="searchsCancel"
@ -43,7 +40,7 @@
:before-close="searchsCancel" :before-close="searchsCancel"
> >
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs> <searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog> </base-dialog> -->
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog <base-dialog
:dialogTitle="addOrEditTitle" :dialogTitle="addOrEditTitle"
@ -64,7 +61,7 @@
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 available from "./components/available.vue"; import available from "./components/available.vue";
import Searchs from "./components/eightDiscipline-searchs"; // import Searchs from "./components/eightDiscipline-searchs";
import codeFilter from "@/filters/code-filter"; import codeFilter from "@/filters/code-filter";
import i18n from "@/i18n"; import i18n from "@/i18n";
const tableProps = [ const tableProps = [
@ -105,7 +102,7 @@ export default {
mixins: [basicPage], mixins: [basicPage],
components: { components: {
eightDisciplineAdd, eightDisciplineAdd,
Searchs // Searchs,
}, },
data() { data() {
return { return {
@ -117,10 +114,26 @@ export default {
tableBtn, tableBtn,
formConfig: [ formConfig: [
{ {
type: "button", type: "input",
btnName: "新增", label: i18n.t("code.name"),
name: "add", placeholder: i18n.t("code.name"),
color: "primary", param: "name",
},
{
type: "input",
label: i18n.t("code.code"),
placeholder: i18n.t("code.code"),
param: "code",
},
{
type: "select",
label: i18n.t('code.eightDisciplineStatus'),
selectOptions: [
{ id: 1, name: "可用" },
{ id: 0, name: "不可用" },
],
param: "eightDisciplineStatus",
defaultSelect: "",
}, },
{ {
type: "button", type: "button",
@ -128,6 +141,12 @@ export default {
name: "search", name: "search",
color: "primary", color: "primary",
}, },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
], ],
}; };
}, },
@ -142,9 +161,9 @@ export default {
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 = val.code;
this.listQuery.name = null; this.listQuery.name = val.name;
this.listQuery.eightDisciplineStatus = null; this.listQuery.eightDisciplineStatus = val.eightDisciplineStatus;
this.getDataList(); this.getDataList();
break; break;
case "add": case "add":

View File

@ -1,11 +1,7 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick"> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-badge :value="5" class="item">
<el-button type="primary" size="small" @click="searchsClick">条件搜索</el-button>
</el-badge>
</search-bar>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.page" :page="listQuery.page"
@ -28,7 +24,7 @@
@pagination="getDataList" @pagination="getDataList"
/> />
<!-- 弹窗, 条件搜索--> <!-- 弹窗, 条件搜索-->
<base-dialog <!-- <base-dialog
:dialogTitle="searchsTitle" :dialogTitle="searchsTitle"
:dialogVisible="searchsVisible" :dialogVisible="searchsVisible"
@cancel="searchsCancel" @cancel="searchsCancel"
@ -36,7 +32,7 @@
:before-close="searchsCancel" :before-close="searchsCancel"
> >
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs> <searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog> </base-dialog> -->
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog <base-dialog
:dialogTitle="addOrEditTitle" :dialogTitle="addOrEditTitle"
@ -54,7 +50,7 @@
<script> <script>
import AddOrUpdate from "./components/eightDisciplineList-detail"; import AddOrUpdate from "./components/eightDisciplineList-detail";
import Searchs from "./components/searchs1"; // import Searchs from "./components/searchs1";
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter"; import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter"; import { timeFormatter } from "@/filters/code-filter";
@ -104,7 +100,37 @@ export default {
tableProps, tableProps,
tableBtn, tableBtn,
tableData: [], tableData: [],
optionArrUrl: ["/basic/qmsProduct/page","/code/problemType/page"],
formConfig: [ formConfig: [
{
type: "input",
label: i18n.t("code.title"),
placeholder: i18n.t("code.title"),
param: "title",
},
{
type: "select",
label: "产品",
selectOptions: [],
param: "productId",
defaultSelect: "",
labelField: "productName",
filterable: true,
},
{
type: "select",
label: "缺陷",
selectOptions: [],
param: "defectId",
defaultSelect: "",
filterable: true,
},
{
type: "input",
label: "关键字",
placeholder: "关键字",
param: "description",
},
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
@ -116,9 +142,30 @@ export default {
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
Searchs, // Searchs,
},
created() {
this.getArr();
}, },
methods: { methods: {
getArr() {
this.optionArrUrl.forEach((item, index) => {
this.$http
.get(item, {
params: {
page: 1,
limit: 500,
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.formConfig[index + 1].selectOptions = res.data.list;
})
.catch(() => {});
});
},
// //
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
@ -146,15 +193,14 @@ export default {
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
this.listQuery = {};
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.limit = 10; this.listQuery.limit = 10;
this.listQuery.total = 1; this.listQuery.title = val.title;
this.listQuery.description = val.description;
this.listQuery.defectId = val.defectId;
this.listQuery.productId = val.productId;
this.getDataList(); this.getDataList();
break; break;
case "export":
this.exportHandle("工厂管理");
break;
default: default:
console.log(val); console.log(val);
} }

View File

@ -83,7 +83,7 @@ export default {
series: [], series: [],
}; };
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 === (this.eType?item.problemTypeId:item.productTypeId));
if (i >= 0) { if (i >= 0) {
option.series[i].data.push(this.eType?item.problemTypeNumber:item.productTypeNumber); option.series[i].data.push(this.eType?item.problemTypeNumber:item.productTypeNumber);
} else { } else {
@ -104,7 +104,6 @@ export default {
option.series.push(obj); option.series.push(obj);
} }
}) })
console.log(option.series)
this.lineChart = echarts.init(document.getElementById("lineChart")) this.lineChart = echarts.init(document.getElementById("lineChart"))
this.lineChart.setOption(option); this.lineChart.setOption(option);
window.addEventListener("resize", () => { window.addEventListener("resize", () => {
@ -117,10 +116,10 @@ export default {
<style lang="scss"> <style lang="scss">
.mod-demo-echarts { .mod-demo-echarts {
> .el-row { // > .el-row {
.el-col { // .el-col {
} // }
} // }
.chart-box { .chart-box {
min-height: 400px; min-height: 400px;
} }

View File

@ -0,0 +1,49 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-07-17 10:16:41
* @LastEditors: zwq
* @Description:
-->
<template>
<span>
<el-avatar
v-if="injectData.eightDisciplineStatus > injectData.num"
size="small"
style="background: #409EFF;"
icon="el-icon-check"
></el-avatar>
<el-avatar
v-else size="small"
icon="el-icon-close"
></el-avatar>
</span>
</template>
<script>
// import { addDynamicRoute } from '@/router'
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
methods: {
//
// emitClick () {
// //
// const routeParams = {
// routeName: `${this.$route.name}__${this.injectData.id}`,
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
// path: 'sys/dict-data',
// params: {
// dictTypeId: this.injectData.id
// }
// }
// //
// addDynamicRoute(routeParams, this.$router)
// }
},
};
</script>

View File

@ -1,11 +1,11 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick"> <search-bar
<el-badge :value="5" class="item"> :formConfigs="formConfig"
<el-button type="primary" size="small" @click="searchsClick">条件搜索</el-button> ref="searchBarForm"
</el-badge> @headBtnClick="buttonClick"
</search-bar> />
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.page" :page="listQuery.page"
@ -28,7 +28,7 @@
@pagination="getDataList" @pagination="getDataList"
/> />
<!-- 弹窗, 条件搜索--> <!-- 弹窗, 条件搜索-->
<base-dialog <!-- <base-dialog
:dialogTitle="searchsTitle" :dialogTitle="searchsTitle"
:dialogVisible="searchsVisible" :dialogVisible="searchsVisible"
@cancel="searchsCancel" @cancel="searchsCancel"
@ -36,7 +36,7 @@
:before-close="searchsCancel" :before-close="searchsCancel"
> >
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs> <searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog> </base-dialog> -->
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog <base-dialog
:dialogTitle="addOrEditTitle" :dialogTitle="addOrEditTitle"
@ -44,7 +44,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width=80% width="80%"
> >
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update> <add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog> </base-dialog>
@ -54,7 +54,7 @@
<script> <script>
import AddOrUpdate from "./components/eightDisciplineList-detail"; import AddOrUpdate from "./components/eightDisciplineList-detail";
import Searchs from "./components/searchs"; // import Searchs from "./components/searchs";
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter"; import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter"; import { timeFormatter } from "@/filters/code-filter";
@ -112,6 +112,44 @@ const tableBtn = [
}, },
]; ];
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 { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -122,8 +160,52 @@ export default {
}, },
tableProps, tableProps,
tableBtn, tableBtn,
eightDisciplineStatusArr,
tableData: [], tableData: [],
optionArrUrl: ["/basic/qmsCustomer/page", "/basic/qmsProduct/page"],
formConfig: [ formConfig: [
{
type: "input",
label: i18n.t("code.title"),
placeholder: i18n.t("code.title"),
param: "title",
},
{
type: "select",
label: "客户",
selectOptions: [],
param: "customId",
defaultSelect: "",
labelField: "customerName",
filterable: true,
},
{
type: "select",
label: "产品",
selectOptions: [],
param: "productId",
defaultSelect: "",
labelField: "productName",
filterable: true,
},
{
type: "select",
label: "步骤",
selectOptions: eightDisciplineStatusArr,
param: "eightDisciplineStatus",
defaultSelect: "",
filterable: true,
},
{
type: "datePicker",
label: "日期",
dateType: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-ddTHH:mm:ss",
placeholder: "日期",
param: "occurrenceDate",
width: 170,
},
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
@ -135,9 +217,30 @@ export default {
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
Searchs, // Searchs,
},
created() {
this.getArr();
}, },
methods: { methods: {
getArr() {
this.optionArrUrl.forEach((item, index) => {
this.$http
.get(item, {
params: {
page: 1,
limit: 500,
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.formConfig[index + 1].selectOptions = res.data.list;
})
.catch(() => {});
});
},
// //
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
@ -165,15 +268,15 @@ export default {
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
this.listQuery = {};
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.limit = 10; this.listQuery.limit = 10;
this.listQuery.total = 1; this.listQuery.title = val.title;
this.listQuery.eightDisciplineStatus = val.eightDisciplineStatus;
this.listQuery.customId = val.customId;
this.listQuery.productId = val.productId;
this.listQuery.occurrenceDate = val.occurrenceDate;
this.getDataList(); this.getDataList();
break; break;
case "export":
this.exportHandle("工厂管理");
break;
default: default:
console.log(val); console.log(val);
} }

View File

@ -1,11 +1,7 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick"> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-badge :value="5" class="item">
<el-button type="primary" size="small" @click="searchsClick">条件搜索</el-button>
</el-badge>
</search-bar>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.page" :page="listQuery.page"
@ -28,7 +24,7 @@
@pagination="getDataList" @pagination="getDataList"
/> />
<!-- 弹窗, 条件搜索--> <!-- 弹窗, 条件搜索-->
<base-dialog <!-- <base-dialog
:dialogTitle="searchsTitle" :dialogTitle="searchsTitle"
:dialogVisible="searchsVisible" :dialogVisible="searchsVisible"
@cancel="searchsCancel" @cancel="searchsCancel"
@ -36,7 +32,7 @@
:before-close="searchsCancel" :before-close="searchsCancel"
> >
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs> <searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog> </base-dialog> -->
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog <base-dialog
:dialogTitle="addOrEditTitle" :dialogTitle="addOrEditTitle"
@ -44,7 +40,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width=80% width="80%"
> >
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update> <add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog> </base-dialog>
@ -54,7 +50,8 @@
<script> <script>
import AddOrUpdate from "./components/eightDisciplineList-detail"; import AddOrUpdate from "./components/eightDisciplineList-detail";
import Searchs from "./components/searchs"; // import Searchs from "./components/searchs";
import processStatus from "./components/processStatus"
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter"; import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter"; import { timeFormatter } from "@/filters/code-filter";
@ -85,42 +82,58 @@ const tableProps = [
{ {
prop: "D1", prop: "D1",
label: "D1", label: "D1",
num: 1,
align: "center", align: "center",
subcomponent: processStatus,
}, },
{ {
prop: "D2", prop: "D2",
label: "D2", label: "D2",
num: 2,
align: "center", align: "center",
subcomponent: processStatus,
}, },
{ {
prop: "D3", prop: "D3",
label: "D3", label: "D3",
num: 3,
align: "center", align: "center",
subcomponent: processStatus,
}, },
{ {
prop: "D4", prop: "D4",
label: "D4", label: "D4",
num: 4,
align: "center", align: "center",
subcomponent: processStatus,
}, },
{ {
prop: "D5", prop: "D5",
label: "D5", label: "D5",
num: 5,
align: "center", align: "center",
subcomponent: processStatus,
}, },
{ {
prop: "D6", prop: "D6",
label: "D6", label: "D6",
num: 6,
align: "center", align: "center",
subcomponent: processStatus,
}, },
{ {
prop: "D7", prop: "D7",
label: "D7", label: "D7",
num: 7,
align: "center", align: "center",
subcomponent: processStatus,
}, },
{ {
prop: "D8", prop: "D8",
label: "D8", label: "D8",
num: 8,
align: "center", align: "center",
subcomponent: processStatus,
}, },
]; ];
const tableBtn = [ const tableBtn = [
@ -130,6 +143,44 @@ const tableBtn = [
}, },
]; ];
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 { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -140,8 +191,52 @@ export default {
}, },
tableProps, tableProps,
tableBtn, tableBtn,
eightDisciplineStatusArr,
tableData: [], tableData: [],
optionArrUrl: ["/basic/qmsCustomer/page", "/basic/qmsProduct/page"],
formConfig: [ formConfig: [
{
type: "input",
label: i18n.t("code.title"),
placeholder: i18n.t("code.title"),
param: "title",
},
{
type: "select",
label: "客户",
selectOptions: [],
param: "customId",
defaultSelect: "",
labelField: "customerName",
filterable: true,
},
{
type: "select",
label: "产品",
selectOptions: [],
param: "productId",
defaultSelect: "",
labelField: "productName",
filterable: true,
},
{
type: "select",
label: "步骤",
selectOptions: eightDisciplineStatusArr,
param: "eightDisciplineStatus",
defaultSelect: "",
filterable: true,
},
{
type: "datePicker",
label: "日期",
dateType: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-ddTHH:mm:ss",
placeholder: "日期",
param: "occurrenceDate",
width: 170,
},
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
@ -153,9 +248,31 @@ export default {
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
Searchs, processStatus,
// Searchs,
},
created() {
this.getArr();
}, },
methods: { methods: {
getArr() {
this.optionArrUrl.forEach((item, index) => {
this.$http
.get(item, {
params: {
page: 1,
limit: 500,
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.formConfig[index + 1].selectOptions = res.data.list;
})
.catch(() => {});
});
},
// //
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
@ -183,15 +300,15 @@ export default {
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
this.listQuery = {};
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.limit = 10; this.listQuery.limit = 10;
this.listQuery.total = 1; this.listQuery.title = val.title;
this.listQuery.eightDisciplineStatus = val.eightDisciplineStatus;
this.listQuery.customId = val.customId;
this.listQuery.productId = val.productId;
this.listQuery.occurrenceDate = val.occurrenceDate;
this.getDataList(); this.getDataList();
break; break;
case "export":
this.exportHandle("工厂管理");
break;
default: default:
console.log(val); console.log(val);
} }

View File

@ -1,11 +1,12 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick"> <search-bar
<el-badge :value="5" class="item"> :isFold="true"
<el-button type="primary" size="small" @click="searchsClick">条件搜索</el-button> :formConfigs="formConfig"
</el-badge> ref="searchBarForm"
</search-bar> @headBtnClick="buttonClick"
/>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.page" :page="listQuery.page"
@ -28,7 +29,7 @@
@pagination="getDataList" @pagination="getDataList"
/> />
<!-- 弹窗, 条件搜索--> <!-- 弹窗, 条件搜索-->
<base-dialog <!-- <base-dialog
:dialogTitle="searchsTitle" :dialogTitle="searchsTitle"
:dialogVisible="searchsVisible" :dialogVisible="searchsVisible"
@cancel="searchsCancel" @cancel="searchsCancel"
@ -36,7 +37,7 @@
:before-close="searchsCancel" :before-close="searchsCancel"
> >
<searchs ref="searchsRef" :show-obj=showObj @refreshDataList="searchsSubmit"></searchs> <searchs ref="searchsRef" :show-obj=showObj @refreshDataList="searchsSubmit"></searchs>
</base-dialog> </base-dialog> -->
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog <base-dialog
:dialogTitle="addOrEditTitle" :dialogTitle="addOrEditTitle"
@ -44,7 +45,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width=80% width="80%"
> >
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update> <add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog> </base-dialog>
@ -54,7 +55,7 @@
<script> <script>
import AddOrUpdate from "./components/eightDisciplineList-detail"; import AddOrUpdate from "./components/eightDisciplineList-detail";
import Searchs from "./components/searchs"; // import Searchs from "./components/searchs";
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter"; import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter"; import { timeFormatter } from "@/filters/code-filter";
@ -100,6 +101,62 @@ const tableBtn = [
}, },
]; ];
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,
},
];
const roleArr = [
{
name: "启动人",
id: 1,
},
{
name: "分析人",
id: 2,
},
{
name: "负责人",
id: 3,
},
{
name: "处理人",
id: 4,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -109,11 +166,65 @@ export default {
}, },
tableProps, tableProps,
tableBtn, tableBtn,
eightDisciplineStatusArr,
roleArr,
tableData: [], tableData: [],
showObj: { optionArrUrl: ["/basic/qmsCustomer/page", "/basic/qmsProduct/page"],
role: true // showObj: {
}, // role: true
// },
formConfig: [ formConfig: [
{
type: "input",
label: i18n.t("code.title"),
placeholder: i18n.t("code.title"),
param: "title",
},
{
type: "select",
label: "客户",
selectOptions: [],
param: "customId",
defaultSelect: "",
labelField: "customerName",
filterable: true,
},
{
type: "select",
label: "产品",
selectOptions: [],
param: "productId",
defaultSelect: "",
labelField: "productName",
filterable: true,
},
{
type: "select",
label: "步骤",
selectOptions: eightDisciplineStatusArr,
param: "eightDisciplineStatus",
defaultSelect: "",
filterable: true,
},
{
type: "select",
label: "角色",
selectOptions: roleArr,
param: "role",
defaultSelect: "",
filterable: true,
},
{
type: "datePicker",
label: "日期",
dateType: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-ddTHH:mm:ss",
placeholder: "日期",
param: "occurrenceDate",
width: 170,
},
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
@ -125,9 +236,30 @@ export default {
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,
Searchs, // Searchs,
},
created() {
this.getArr();
}, },
methods: { methods: {
getArr() {
this.optionArrUrl.forEach((item, index) => {
this.$http
.get(item, {
params: {
page: 1,
limit: 500,
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.formConfig[index + 1].selectOptions = res.data.list;
})
.catch(() => {});
});
},
// //
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
@ -155,15 +287,16 @@ export default {
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
this.listQuery = {};
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.limit = 10; this.listQuery.limit = 10;
this.listQuery.total = 1; this.listQuery.title = val.title;
this.listQuery.eightDisciplineStatus = val.eightDisciplineStatus;
this.listQuery.customId = val.customId;
this.listQuery.productId = val.productId;
this.listQuery.occurrenceDate = val.occurrenceDate;
this.listQuery.role = val.role;
this.getDataList(); this.getDataList();
break; break;
case "export":
this.exportHandle("工厂管理");
break;
default: default:
console.log(val); console.log(val);
} }

View File

@ -74,7 +74,7 @@
label: "日期", label: "日期",
dateType: "daterange", dateType: "daterange",
format: "yyyy-MM-dd", format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-ddTHH:mm:ss", valueFormat: "yyyy-MM-dd",
rangeSeparator: "-", rangeSeparator: "-",
startPlaceholder: "开始时间", startPlaceholder: "开始时间",
endPlaceholder: "结束时间", endPlaceholder: "结束时间",

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-07-03 15:21:14 * @Date: 2023-07-03 15:21:14
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-07-04 08:53:10 * @LastEditTime: 2023-07-14 16:50:39
* @Description: * @Description:
--> -->
<template> <template>
@ -72,7 +72,7 @@ export default {
label: "日期", label: "日期",
dateType: "daterange", dateType: "daterange",
format: "yyyy-MM-dd", format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-ddTHH:mm:ss", valueFormat: "yyyy-MM-dd",
rangeSeparator: "-", rangeSeparator: "-",
startPlaceholder: "开始时间", startPlaceholder: "开始时间",
endPlaceholder: "结束时间", endPlaceholder: "结束时间",