Merge pull request '更新8D' (#21) from zwq into master

Reviewed-on: #21
This commit is contained in:
朱文强 2023-07-17 10:18:51 +08:00
commit 7acd83e501
12 changed files with 605 additions and 116 deletions

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 10:20:02
* @LastEditTime: 2023-07-17 10:00:53
* @LastEditors: zwq
* @Description:
-->
@ -9,6 +9,7 @@
<el-form
:model="dataForm"
ref="dataForm"
:rules="dataRule"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="100px"
>
@ -317,27 +318,48 @@ export default {
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",
// },
// ],
code: [
{
required: true,
message: "请输入编码",
trigger: "blur",
},
],
title: [
{
required: true,
message: "请输入标题",
trigger: "blur",
},
],
eightDisciplineType: [
{
required: true,
message: "请选择8D类型",
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
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 14:06:53
* @LastEditTime: 2023-07-17 09:08:38
* @LastEditors: zwq
* @Description:
-->
@ -9,9 +9,6 @@
<el-card shadow="never" class="aui-card--fill">
<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="searchsClick">条件搜索</el-button>
</el-badge>
</SearchBar>
<base-table
:table-props="tableProps"
@ -35,7 +32,7 @@
@pagination="getDataList"
/>
<!-- 弹窗, 条件搜索-->
<base-dialog
<!-- <base-dialog
:dialogTitle="searchsTitle"
:dialogVisible="searchsVisible"
@cancel="searchsCancel"
@ -43,7 +40,7 @@
:before-close="searchsCancel"
>
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog>
</base-dialog> -->
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
@ -64,7 +61,7 @@
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 Searchs from "./components/eightDiscipline-searchs";
import codeFilter from "@/filters/code-filter";
import i18n from "@/i18n";
const tableProps = [
@ -105,7 +102,7 @@ export default {
mixins: [basicPage],
components: {
eightDisciplineAdd,
Searchs
// Searchs,
},
data() {
return {
@ -117,10 +114,26 @@ export default {
tableBtn,
formConfig: [
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
type: "input",
label: i18n.t("code.name"),
placeholder: i18n.t("code.name"),
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",
@ -128,6 +141,12 @@ export default {
name: "search",
color: "primary",
},
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
],
};
},
@ -142,9 +161,9 @@ export default {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.listQuery.code = null;
this.listQuery.name = null;
this.listQuery.eightDisciplineStatus = null;
this.listQuery.code = val.code;
this.listQuery.name = val.name;
this.listQuery.eightDisciplineStatus = val.eightDisciplineStatus;
this.getDataList();
break;
case "add":

View File

@ -1,11 +1,7 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<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>
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
@ -28,7 +24,7 @@
@pagination="getDataList"
/>
<!-- 弹窗, 条件搜索-->
<base-dialog
<!-- <base-dialog
:dialogTitle="searchsTitle"
:dialogVisible="searchsVisible"
@cancel="searchsCancel"
@ -36,7 +32,7 @@
:before-close="searchsCancel"
>
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog>
</base-dialog> -->
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
@ -54,7 +50,7 @@
<script>
import AddOrUpdate from "./components/eightDisciplineList-detail";
import Searchs from "./components/searchs1";
// import Searchs from "./components/searchs1";
import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter";
@ -104,7 +100,37 @@ export default {
tableProps,
tableBtn,
tableData: [],
optionArrUrl: ["/basic/qmsProduct/page","/code/problemType/page"],
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",
btnName: "搜索",
@ -116,9 +142,30 @@ export default {
},
components: {
AddOrUpdate,
Searchs,
// Searchs,
},
created() {
this.getArr();
},
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() {
this.dataListLoading = true;
@ -146,15 +193,14 @@ export default {
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery = {};
this.listQuery.page = 1;
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();
break;
case "export":
this.exportHandle("工厂管理");
break;
default:
console.log(val);
}

View File

@ -83,7 +83,7 @@ export default {
series: [],
};
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) {
option.series[i].data.push(this.eType?item.problemTypeNumber:item.productTypeNumber);
} else {
@ -104,7 +104,6 @@ export default {
option.series.push(obj);
}
})
console.log(option.series)
this.lineChart = echarts.init(document.getElementById("lineChart"))
this.lineChart.setOption(option);
window.addEventListener("resize", () => {
@ -117,10 +116,10 @@ export default {
<style lang="scss">
.mod-demo-echarts {
> .el-row {
.el-col {
}
}
// > .el-row {
// .el-col {
// }
// }
.chart-box {
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>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<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>
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<base-table
:table-props="tableProps"
:page="listQuery.page"
@ -28,7 +28,7 @@
@pagination="getDataList"
/>
<!-- 弹窗, 条件搜索-->
<base-dialog
<!-- <base-dialog
:dialogTitle="searchsTitle"
:dialogVisible="searchsVisible"
@cancel="searchsCancel"
@ -36,7 +36,7 @@
:before-close="searchsCancel"
>
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog>
</base-dialog> -->
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
@ -44,7 +44,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width=80%
width="80%"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
@ -54,7 +54,7 @@
<script>
import AddOrUpdate from "./components/eightDisciplineList-detail";
import Searchs from "./components/searchs";
// import Searchs from "./components/searchs";
import basicPage from "@/mixins/basic-page";
import codeFilter 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 {
mixins: [basicPage],
data() {
@ -122,8 +160,52 @@ export default {
},
tableProps,
tableBtn,
eightDisciplineStatusArr,
tableData: [],
optionArrUrl: ["/basic/qmsCustomer/page", "/basic/qmsProduct/page"],
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",
btnName: "搜索",
@ -135,9 +217,30 @@ export default {
},
components: {
AddOrUpdate,
Searchs,
// Searchs,
},
created() {
this.getArr();
},
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() {
this.dataListLoading = true;
@ -165,15 +268,15 @@ export default {
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery = {};
this.listQuery.page = 1;
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();
break;
case "export":
this.exportHandle("工厂管理");
break;
default:
console.log(val);
}

View File

@ -1,11 +1,7 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<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>
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
@ -28,7 +24,7 @@
@pagination="getDataList"
/>
<!-- 弹窗, 条件搜索-->
<base-dialog
<!-- <base-dialog
:dialogTitle="searchsTitle"
:dialogVisible="searchsVisible"
@cancel="searchsCancel"
@ -36,7 +32,7 @@
:before-close="searchsCancel"
>
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog>
</base-dialog> -->
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
@ -44,7 +40,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width=80%
width="80%"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
@ -54,7 +50,8 @@
<script>
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 codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter";
@ -85,42 +82,58 @@ const tableProps = [
{
prop: "D1",
label: "D1",
num: 1,
align: "center",
subcomponent: processStatus,
},
{
prop: "D2",
label: "D2",
num: 2,
align: "center",
subcomponent: processStatus,
},
{
prop: "D3",
label: "D3",
num: 3,
align: "center",
subcomponent: processStatus,
},
{
prop: "D4",
label: "D4",
num: 4,
align: "center",
subcomponent: processStatus,
},
{
prop: "D5",
label: "D5",
num: 5,
align: "center",
subcomponent: processStatus,
},
{
prop: "D6",
label: "D6",
num: 6,
align: "center",
subcomponent: processStatus,
},
{
prop: "D7",
label: "D7",
num: 7,
align: "center",
subcomponent: processStatus,
},
{
prop: "D8",
label: "D8",
num: 8,
align: "center",
subcomponent: processStatus,
},
];
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 {
mixins: [basicPage],
data() {
@ -140,8 +191,52 @@ export default {
},
tableProps,
tableBtn,
eightDisciplineStatusArr,
tableData: [],
optionArrUrl: ["/basic/qmsCustomer/page", "/basic/qmsProduct/page"],
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",
btnName: "搜索",
@ -153,9 +248,31 @@ export default {
},
components: {
AddOrUpdate,
Searchs,
processStatus,
// Searchs,
},
created() {
this.getArr();
},
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() {
this.dataListLoading = true;
@ -183,15 +300,15 @@ export default {
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery = {};
this.listQuery.page = 1;
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();
break;
case "export":
this.exportHandle("工厂管理");
break;
default:
console.log(val);
}

View File

@ -1,11 +1,12 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<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>
<search-bar
:isFold="true"
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<base-table
:table-props="tableProps"
:page="listQuery.page"
@ -28,7 +29,7 @@
@pagination="getDataList"
/>
<!-- 弹窗, 条件搜索-->
<base-dialog
<!-- <base-dialog
:dialogTitle="searchsTitle"
:dialogVisible="searchsVisible"
@cancel="searchsCancel"
@ -36,7 +37,7 @@
:before-close="searchsCancel"
>
<searchs ref="searchsRef" :show-obj=showObj @refreshDataList="searchsSubmit"></searchs>
</base-dialog>
</base-dialog> -->
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
@ -44,7 +45,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width=80%
width="80%"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
@ -54,7 +55,7 @@
<script>
import AddOrUpdate from "./components/eightDisciplineList-detail";
import Searchs from "./components/searchs";
// import Searchs from "./components/searchs";
import basicPage from "@/mixins/basic-page";
import codeFilter 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 {
mixins: [basicPage],
data() {
@ -109,11 +166,65 @@ export default {
},
tableProps,
tableBtn,
eightDisciplineStatusArr,
roleArr,
tableData: [],
showObj: {
role: true
},
optionArrUrl: ["/basic/qmsCustomer/page", "/basic/qmsProduct/page"],
// showObj: {
// role: true
// },
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",
btnName: "搜索",
@ -125,9 +236,30 @@ export default {
},
components: {
AddOrUpdate,
Searchs,
// Searchs,
},
created() {
this.getArr();
},
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() {
this.dataListLoading = true;
@ -155,15 +287,16 @@ export default {
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery = {};
this.listQuery.page = 1;
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();
break;
case "export":
this.exportHandle("工厂管理");
break;
default:
console.log(val);
}

View File

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

View File

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