更新8D处理中心和管理中心
Dieser Commit ist enthalten in:
Ursprung
251345fad8
Commit
8d2f26293e
@ -2,14 +2,14 @@
|
||||
/*
|
||||
* @Date: 2020-12-29 16:49:28
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-01-05 15:49:17
|
||||
* @LastEditTime: 2023-07-03 10:40:31
|
||||
* @FilePath: \basic-admin\src\filters\basicData\index.js
|
||||
* @Description:
|
||||
*/
|
||||
import moment from 'moment'
|
||||
|
||||
const table = {
|
||||
eightDisciplineType: {
|
||||
eightDisciplineType: {
|
||||
1: '客诉问题',
|
||||
2: '重大质量问题',
|
||||
0: '重复发生问题',
|
||||
@ -17,7 +17,34 @@ const table = {
|
||||
examineStatus: {
|
||||
1: '需要审批',
|
||||
0: '不需要审批',
|
||||
}
|
||||
},
|
||||
step: {
|
||||
0: 'D0',
|
||||
1: 'D1',
|
||||
2: 'D2',
|
||||
3: 'D3',
|
||||
4: 'D4',
|
||||
5: 'D5',
|
||||
6: 'D6',
|
||||
7: 'D7',
|
||||
8: 'D8',
|
||||
},
|
||||
containmentLocaleName:
|
||||
{
|
||||
1: "装配线",
|
||||
2: "生产线",
|
||||
3: "实验室",
|
||||
4: "成品在途",
|
||||
5: "第三方中间商",
|
||||
},
|
||||
developCountermeasuresName:
|
||||
{
|
||||
1: "让步接收",
|
||||
2: "分选返工",
|
||||
3: "隔离",
|
||||
4: "退换货",
|
||||
5: "通知供应商",
|
||||
},
|
||||
}
|
||||
|
||||
export function timeFormatter(timeObj) {
|
||||
@ -28,8 +55,8 @@ export function timeFormatter(timeObj) {
|
||||
}
|
||||
}
|
||||
|
||||
export default function(dictTable) {
|
||||
return function(val) {
|
||||
export default function (dictTable) {
|
||||
return function (val) {
|
||||
return table?.[dictTable]?.[val]
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-29 10:54:23
|
||||
* @LastEditTime: 2023-07-03 16:24:52
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
@ -183,6 +183,34 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="custom" label="客户">
|
||||
<el-select v-model="dataForm.custom" @change="changeCustom" filterable clearable placeholder="请选择客户">
|
||||
<el-option
|
||||
v-for="item in urlOptions.optionArr.arr0"
|
||||
:key="item.id"
|
||||
:label="item.customerName"
|
||||
:value="item.id+'+'+item.customerName"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="product" label="产品">
|
||||
<el-select v-model="dataForm.product" @change="changeProduct" filterable clearable placeholder="请选择产品">
|
||||
<el-option
|
||||
v-for="item in urlOptions.optionArr.arr1"
|
||||
:key="item.id"
|
||||
:label="item.productName"
|
||||
:value="item.id+'+'+item.productName"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="description" :label="$t('code.description')">
|
||||
<el-input v-model="dataForm.description" :placeholder="$t('code.description')"></el-input>
|
||||
@ -200,18 +228,22 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getOption: true,
|
||||
submitURL: "/code/startEightDiscipline",
|
||||
infoURL: "/code/startEightDiscipline/{id}",
|
||||
getDictURL: "/sys/dict/data/page",
|
||||
customerListURL: "/basic/qmsCustomer/page",
|
||||
productListURL: "/basic/qmsProduct/page",
|
||||
teamListURL: "/basic/qmsTeam/page",
|
||||
optionArrUrl: ["/basic/qmsCustomer/page", "/basic/qmsProduct/page"],
|
||||
},
|
||||
defectList: [],
|
||||
teamList: [],
|
||||
customerList: [],
|
||||
productList: [],
|
||||
dutyList: [],
|
||||
productList: [],
|
||||
customList: [],
|
||||
examineStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
@ -256,6 +288,8 @@ export default {
|
||||
batchNumber: null,
|
||||
code: null,
|
||||
customId: null,
|
||||
custom: null,
|
||||
customName: null,
|
||||
defectSourceId: null,
|
||||
description: null,
|
||||
eightDisciplineId: null,
|
||||
@ -267,6 +301,8 @@ export default {
|
||||
occurrenceDate: null,
|
||||
orderNo: null,
|
||||
productId: null,
|
||||
product: null,
|
||||
productName: null,
|
||||
productTypeId: null,
|
||||
teamList: undefined,
|
||||
requestResponseCycle: null,
|
||||
@ -314,6 +350,9 @@ export default {
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr()
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
@ -383,6 +422,22 @@ export default {
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
changeCustom(){
|
||||
this.dataForm.customId = this.dataForm.custom
|
||||
? this.dataForm.custom.split("+")[0]
|
||||
: "";
|
||||
this.dataForm.customName = this.dataForm.custom
|
||||
? this.dataForm.custom.split("+")[1]
|
||||
: "";
|
||||
},
|
||||
changeProduct(){
|
||||
this.dataForm.productId = this.dataForm.product
|
||||
? this.dataForm.product.split("+")[0]
|
||||
: "";
|
||||
this.dataForm.productName = this.dataForm.product
|
||||
? this.dataForm.product.split("+")[1]
|
||||
: "";
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-28 16:06:37
|
||||
* @LastEditTime: 2023-06-30 11:16:43
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
@ -9,7 +9,7 @@
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="1" class="item">
|
||||
<el-badge :value="3" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
|
169
src/views/modules/managementCenter/bestPractices.vue
Normale Datei
169
src/views/modules/managementCenter/bestPractices.vue
Normale Datei
@ -0,0 +1,169 @@
|
||||
<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>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.page"
|
||||
:limit="listQuery.limit"
|
||||
:table-data="tableData"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="70"
|
||||
:label="$t('handle')"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.limit"
|
||||
:page.sync="listQuery.page"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<!-- 弹窗, 条件搜索-->
|
||||
<base-dialog
|
||||
:dialogTitle="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"
|
||||
width=80%
|
||||
>
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from "./components/eightDisciplineList-detail";
|
||||
import Searchs from "./components/searchs1";
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import codeFilter from "@/filters/code-filter";
|
||||
import { timeFormatter } from "@/filters/code-filter";
|
||||
import i18n from "@/i18n";
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "title",
|
||||
label: i18n.t("code.title"),
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: "产品",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "defectName",
|
||||
label: "缺陷",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "description",
|
||||
label: "关键字",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "associationNumber",
|
||||
label: "关联次数",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "detail",
|
||||
btnName: "详情",
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/best/practice",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
Searchs,
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
//search-bar点击
|
||||
searchsClick() {
|
||||
this.searchsTitle = "条件搜索";
|
||||
this.searchsHandle();
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.listQuery = {};
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.limit = 10;
|
||||
this.listQuery.total = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
this.exportHandle("工厂管理");
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
this.addOrEditTitle = "详情";
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle(val.data.id);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -2,18 +2,24 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-06-30 16:23:19
|
||||
* @LastEditTime: 2023-07-03 09:02:50
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-descriptions title="">
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="标题">{{ dataInfo.title }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品">{{ dataInfo.productName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发生日期">{{ dataInfo.occurrenceDate | timeFormatter }}</el-descriptions-item>
|
||||
<el-descriptions-item label="配套产品/系统">{{ dataInfo.supportProducts }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发生日期">{{
|
||||
dataInfo.occurrenceDate | timeFormatter
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="配套产品/系统">{{
|
||||
dataInfo.supportProducts
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="启动人">{{ dataInfo.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="8D类型">{{ eightDisciplineType[dataInfo.eightDisciplineType] }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions-item label="8D类型">{{
|
||||
eightDisciplineType[dataInfo.eightDisciplineType]
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -22,32 +28,30 @@ import { timeFormatter } from "@/filters/code-filter";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: '',
|
||||
eightDisciplineType: {
|
||||
1: '客诉问题',
|
||||
2: '重大质量问题',
|
||||
0: '重复发生问题',
|
||||
},
|
||||
}
|
||||
dataInfo: "",
|
||||
eightDisciplineType: {
|
||||
1: "客诉问题",
|
||||
2: "重大质量问题",
|
||||
0: "重复发生问题",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
console.log(codeFilter('eightDisciplineType'))
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get(`/code/startEightDiscipline/${id}`)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataInfo = '';
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataInfo = res.data;
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(`/code/startEightDiscipline/${id}`)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataInfo = "";
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataInfo = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -0,0 +1,46 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 10:01:55
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="描述">{{ dataInfo }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
const param = {
|
||||
startEightDisciplineId: id,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get("/code/startEightDisciplinePreliminaryAnalysis/page", {
|
||||
params: param,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataInfo = "";
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataInfo = res.data.list[0]?.description;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,76 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 10:26:10
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table border :table-props="tableProps" :table-data="tableData" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from "@/i18n";
|
||||
import codeFilter from "@/filters/code-filter";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "step",
|
||||
label: i18n.t("disqualification.step"),
|
||||
align: "center",
|
||||
filter: codeFilter('step'),
|
||||
},
|
||||
{
|
||||
prop: "memberName",
|
||||
label: "成员",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "time",
|
||||
label: "时间(小时)",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "approverName",
|
||||
label: "审批人",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "terminationApproverName",
|
||||
label: "终止审批人",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: "",
|
||||
tableProps,
|
||||
tableData:[]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
const param = {
|
||||
startEightDisciplineId: id,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get("/code/startEightDisciplineCreateTeam/page", {
|
||||
params: param,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,89 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 10:38:52
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table border :table-props="tableProps" :table-data="tableData" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from "@/i18n";
|
||||
import codeFilter from "@/filters/code-filter";
|
||||
import { timeFormatter } from "@/filters/code-filter";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "containmentLocale",
|
||||
label: "遏制区域设置",
|
||||
align: "center",
|
||||
filter: codeFilter('containmentLocaleName'),
|
||||
},
|
||||
{
|
||||
prop: "developCountermeasures",
|
||||
label: "拟定对策",
|
||||
align: "center",
|
||||
filter: codeFilter('developCountermeasuresName'),
|
||||
},
|
||||
{
|
||||
prop: "controlleQuantity",
|
||||
label: "应受控数量",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "actualQuantity",
|
||||
label: "实际数量",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "defectQuantity",
|
||||
label: "不良数量",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "userName",
|
||||
label: "负责人",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "completionDate",
|
||||
label: "完成日期",
|
||||
align: "center",
|
||||
filter: timeFormatter,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: "",
|
||||
tableProps,
|
||||
tableData:[]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
const param = {
|
||||
startEightDisciplineId: id,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get("/code/startEightDisciplineTemporaryTreatmentMeasures/page", {
|
||||
params: param,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,46 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 10:41:50
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="问题类型">{{ dataInfo }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
const param = {
|
||||
startEightDisciplineId: id,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get("/code/startEightDisciplineRootCauseAnalysis/page", {
|
||||
params: param,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataInfo = "";
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataInfo = res.data.list[0]?.problemType;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,46 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 10:43:27
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="描述">{{ dataInfo }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
const param = {
|
||||
startEightDisciplineId: id,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get("/code/startEightDisciplineDescriptionCorrectiveAction/page", {
|
||||
params: param,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataInfo = "";
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataInfo = res.data.list[0]?.description;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,46 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 10:44:13
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="描述">{{ dataInfo }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
const param = {
|
||||
startEightDisciplineId: id,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get("/code/startEightDisciplineValidation/page", {
|
||||
params: param,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataInfo = "";
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataInfo = res.data.list[0]?.description;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,46 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 10:45:12
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="描述">{{ dataInfo }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
const param = {
|
||||
startEightDisciplineId: id,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get("/code/startEightDisciplinePreventRecurrence/page", {
|
||||
params: param,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataInfo = "";
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataInfo = res.data.list[0]?.description;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,46 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 10:45:56
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-descriptions title="">
|
||||
<el-descriptions-item label="描述">{{ dataInfo }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataInfo: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
const param = {
|
||||
startEightDisciplineId: id,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$http
|
||||
.get("/code/startEightDisciplineSummaryExperience/page", {
|
||||
params: param,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataInfo = "";
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataInfo = res.data.list[0]?.description;
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -105,6 +105,7 @@ export default {
|
||||
methods: {
|
||||
init(id) {
|
||||
this.id = id
|
||||
this.activeName = 'D0'
|
||||
this.visible = true;
|
||||
this.D0Visible = true
|
||||
this.oldTab = 'D0Visible'
|
||||
|
125
src/views/modules/managementCenter/components/line-chart.vue
Normale Datei
125
src/views/modules/managementCenter/components/line-chart.vue
Normale Datei
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="mod-demo-echarts">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-card>
|
||||
<div id="lineChart" class="chart-box"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
},
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//testdata
|
||||
lineChart: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initChartLine();
|
||||
},
|
||||
activated() {
|
||||
// 由于给echart添加了resize事件, 在组件激活时需要重新resize绘画一次, 否则出现空白bug
|
||||
if (this.lineChart) {
|
||||
this.lineChart.resize();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 折线图
|
||||
initChartLine() {
|
||||
var option = {
|
||||
title: {
|
||||
text: this.title,
|
||||
left: "left",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
// Use axis to trigger tooltip
|
||||
type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
top: "6%",
|
||||
},
|
||||
grid: {
|
||||
left: "3%",
|
||||
right: "4%",
|
||||
bottom: "3%",
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
data: [
|
||||
...new Set(
|
||||
this.dataList?.map((item) => {
|
||||
return item.month;
|
||||
})
|
||||
),
|
||||
],
|
||||
},
|
||||
yAxis: {
|
||||
type: "value",
|
||||
},
|
||||
series: [],
|
||||
};
|
||||
this.dataList.forEach((item) => {
|
||||
const i = option.series.findIndex((c) => c.id === item.productTypeId);
|
||||
if (i >= 0) {
|
||||
option.series[i].data.push(item.productTypeNumber);
|
||||
} else {
|
||||
console.log(item.productTypeName)
|
||||
const obj = {
|
||||
name: item.productTypeName,
|
||||
id: item.productTypeId,
|
||||
type: "bar",
|
||||
stack: "total",
|
||||
label: {
|
||||
show: true,
|
||||
},
|
||||
emphasis: {
|
||||
focus: "series",
|
||||
},
|
||||
data: [],
|
||||
};
|
||||
obj.data.push(item.productTypeNumber);
|
||||
option.series.push(obj);
|
||||
}
|
||||
})
|
||||
console.log(option.series)
|
||||
this.lineChart = echarts.init(document.getElementById("lineChart"))
|
||||
this.lineChart.setOption(option);
|
||||
window.addEventListener("resize", () => {
|
||||
this.lineChart.resize();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mod-demo-echarts {
|
||||
> .el-row {
|
||||
.el-col {
|
||||
}
|
||||
}
|
||||
.chart-box {
|
||||
min-height: 400px;
|
||||
}
|
||||
}
|
||||
</style>
|
100
src/views/modules/managementCenter/components/pie-chart.vue
Normale Datei
100
src/views/modules/managementCenter/components/pie-chart.vue
Normale Datei
@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<div class="mod-demo-echarts">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-card>
|
||||
<div id="pieChart" class="chart-box"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
},
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//testdata
|
||||
pieChart: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initChartLine();
|
||||
},
|
||||
activated() {
|
||||
// 由于给echart添加了resize事件, 在组件激活时需要重新resize绘画一次, 否则出现空白bug
|
||||
if (this.pieChart) {
|
||||
this.pieChart.resize();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 折线图
|
||||
initChartLine() {
|
||||
var option = {
|
||||
title: {
|
||||
text: this.title,
|
||||
left: "left",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
formatter: "{b} : {c} ({d}%)",
|
||||
},
|
||||
legend: {
|
||||
orient: "vertical",
|
||||
left: "left",
|
||||
top: "6%",
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: "pie",
|
||||
radius: "50%",
|
||||
data: this.dataList?.map((item) => {
|
||||
const obj = {
|
||||
value: item.productTypeNumber,
|
||||
name: item.productTypeName,
|
||||
};
|
||||
return obj;
|
||||
}),
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: "rgba(0, 0, 0, 0.5)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
this.pieChart = echarts.init(document.getElementById("pieChart"));
|
||||
this.pieChart.setOption(option);
|
||||
window.addEventListener("resize", () => {
|
||||
this.pieChart.resize();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mod-demo-echarts {
|
||||
> .el-row {
|
||||
.el-col {
|
||||
}
|
||||
}
|
||||
.chart-box {
|
||||
min-height: 400px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-06-30 14:53:49
|
||||
* @LastEditTime: 2023-07-03 16:13:18
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -13,7 +13,7 @@
|
||||
<el-form-item prop="customId" label="客户">
|
||||
<el-select v-model="dataForm.customId" filterable clearable placeholder="请选择客户">
|
||||
<el-option
|
||||
v-for="item in this.urlOptions.optionArr.arr0"
|
||||
v-for="item in urlOptions.optionArr.arr0"
|
||||
:key="item.id"
|
||||
:label="item.customerName"
|
||||
:value="item.id"
|
||||
@ -24,7 +24,7 @@
|
||||
<el-form-item prop="productId" label="产品">
|
||||
<el-select v-model="dataForm.productId" filterable clearable placeholder="请选择产品">
|
||||
<el-option
|
||||
v-for="item in this.urlOptions.optionArr.arr1"
|
||||
v-for="item in urlOptions.optionArr.arr1"
|
||||
:key="item.id"
|
||||
:label="item.productName"
|
||||
:value="item.id"
|
||||
@ -48,6 +48,14 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="role" label="角色" v-if="showObj.role">
|
||||
<el-radio-group v-model="dataForm.role">
|
||||
<el-radio :label="1">启动人</el-radio>
|
||||
<el-radio :label="2">分析人</el-radio>
|
||||
<el-radio :label="3">负责人</el-radio>
|
||||
<el-radio :label="4">处理人</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="occurrenceDate" label="发生时间">
|
||||
<el-date-picker
|
||||
v-model="dataForm.occurrenceDate"
|
||||
@ -105,6 +113,12 @@ const eightDisciplineStatusArr = [
|
||||
];
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
props: {
|
||||
showObj: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@ -114,6 +128,7 @@ export default {
|
||||
eightDisciplineStatusArr,
|
||||
dataForm: {
|
||||
title: "",
|
||||
role: "",
|
||||
eightDisciplineStatus: "",
|
||||
occurrenceDate: "",
|
||||
customId: "",
|
||||
|
86
src/views/modules/managementCenter/components/searchs1.vue
Normale Datei
86
src/views/modules/managementCenter/components/searchs1.vue
Normale Datei
@ -0,0 +1,86 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-03 15:10:57
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" label-width="120px">
|
||||
<el-form-item prop="title" :label="$t('code.title')">
|
||||
<el-input v-model="dataForm.title" :placeholder="$t('code.title')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" label="产品">
|
||||
<el-select v-model="dataForm.productId" filterable clearable placeholder="请选择产品">
|
||||
<el-option
|
||||
v-for="item in this.urlOptions.optionArr.arr0"
|
||||
:key="item.id"
|
||||
:label="item.productName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="defectId" label="缺陷">
|
||||
<el-select v-model="dataForm.defectId" filterable clearable placeholder="请选择缺陷">
|
||||
<el-option
|
||||
v-for="item in this.urlOptions.optionArr.arr1"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="description" label="关键字">
|
||||
<el-input v-model="dataForm.description" placeholder="关键字" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
optionArrUrl: ["/basic/qmsProduct/page","/basic/qmsProduct/page"],
|
||||
},
|
||||
visible: false,
|
||||
dataForm: {
|
||||
title: "",
|
||||
productId: "",
|
||||
defectId: '',
|
||||
description: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
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>
|
@ -15,7 +15,7 @@
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="100"
|
||||
:width="70"
|
||||
:label="$t('handle')"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
@ -66,11 +66,6 @@ const tableProps = [
|
||||
label: i18n.t("code.title"),
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "code",
|
||||
label: i18n.t("code.code"),
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "eightDisciplineType",
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
@ -83,23 +78,34 @@ const tableProps = [
|
||||
align: "center",
|
||||
filter: timeFormatter,
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: "产品",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "customName",
|
||||
label: "客户",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "description",
|
||||
label: i18n.t("code.description"),
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "examineStatus",
|
||||
label: i18n.t("code.examineStatus"),
|
||||
prop: "userName",
|
||||
label: "启动人",
|
||||
align: "center",
|
||||
filter: codeFilter("examineStatus"),
|
||||
},
|
||||
{
|
||||
prop: "eightDisciplineStatus",
|
||||
label: "步骤",
|
||||
align: "center",
|
||||
filter: codeFilter("step"),
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t("delete"),
|
||||
},
|
||||
{
|
||||
type: "detail",
|
||||
btnName: "详情",
|
||||
@ -124,13 +130,6 @@ export default {
|
||||
name: "search",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t("export"),
|
||||
name: "export",
|
||||
color: "primary",
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
|
206
src/views/modules/managementCenter/eightDisciplineProgressStatus.vue
Normale Datei
206
src/views/modules/managementCenter/eightDisciplineProgressStatus.vue
Normale Datei
@ -0,0 +1,206 @@
|
||||
<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>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.page"
|
||||
:limit="listQuery.limit"
|
||||
:table-data="tableData"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="70"
|
||||
:label="$t('handle')"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.limit"
|
||||
:page.sync="listQuery.page"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<!-- 弹窗, 条件搜索-->
|
||||
<base-dialog
|
||||
:dialogTitle="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"
|
||||
width=80%
|
||||
>
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from "./components/eightDisciplineList-detail";
|
||||
import Searchs from "./components/searchs";
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import codeFilter from "@/filters/code-filter";
|
||||
import { timeFormatter } from "@/filters/code-filter";
|
||||
import i18n from "@/i18n";
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "title",
|
||||
label: i18n.t("code.title"),
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: "产品",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "customName",
|
||||
label: "客户",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "occurrenceDate",
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: "center",
|
||||
filter: timeFormatter,
|
||||
},
|
||||
{
|
||||
prop: "D1",
|
||||
label: "D1",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "D2",
|
||||
label: "D2",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "D3",
|
||||
label: "D3",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "D4",
|
||||
label: "D4",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "D5",
|
||||
label: "D5",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "D6",
|
||||
label: "D6",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "D7",
|
||||
label: "D7",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "D8",
|
||||
label: "D8",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "detail",
|
||||
btnName: "详情",
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/eight/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
Searchs,
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
//search-bar点击
|
||||
searchsClick() {
|
||||
this.searchsTitle = "条件搜索";
|
||||
this.searchsHandle();
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.listQuery = {};
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.limit = 10;
|
||||
this.listQuery.total = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
this.exportHandle("工厂管理");
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
this.addOrEditTitle = "详情";
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle(val.data.id);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
178
src/views/modules/managementCenter/joinEightDiscipline.vue
Normale Datei
178
src/views/modules/managementCenter/joinEightDiscipline.vue
Normale Datei
@ -0,0 +1,178 @@
|
||||
<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>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.page"
|
||||
:limit="listQuery.limit"
|
||||
:table-data="tableData"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="70"
|
||||
:label="$t('handle')"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.limit"
|
||||
:page.sync="listQuery.page"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<!-- 弹窗, 条件搜索-->
|
||||
<base-dialog
|
||||
:dialogTitle="searchsTitle"
|
||||
:dialogVisible="searchsVisible"
|
||||
@cancel="searchsCancel"
|
||||
@confirm="searchsConfirm"
|
||||
:before-close="searchsCancel"
|
||||
>
|
||||
<searchs ref="searchsRef" :show-obj=showObj @refreshDataList="searchsSubmit"></searchs>
|
||||
</base-dialog>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width=80%
|
||||
>
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from "./components/eightDisciplineList-detail";
|
||||
import Searchs from "./components/searchs";
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import codeFilter from "@/filters/code-filter";
|
||||
import { timeFormatter } from "@/filters/code-filter";
|
||||
import i18n from "@/i18n";
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "title",
|
||||
label: i18n.t("code.title"),
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "occurrenceDate",
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: "center",
|
||||
filter: timeFormatter,
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: "产品",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "customName",
|
||||
label: "客户",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "description",
|
||||
label: i18n.t("code.description"),
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
prop: "userName",
|
||||
label: "启动人",
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "detail",
|
||||
btnName: "详情",
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/participate/eight/page",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
tableData: [],
|
||||
showObj: {
|
||||
role: true
|
||||
},
|
||||
formConfig: [
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
Searchs,
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
//search-bar点击
|
||||
searchsClick() {
|
||||
this.searchsTitle = "条件搜索";
|
||||
this.searchsHandle();
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.listQuery = {};
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.limit = 10;
|
||||
this.listQuery.total = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
this.exportHandle("工厂管理");
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
this.addOrEditTitle = "详情";
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle(val.data.id);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
191
src/views/modules/managementCenter/productDistribution.vue
Normale Datei
191
src/views/modules/managementCenter/productDistribution.vue
Normale Datei
@ -0,0 +1,191 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-07-03 15:21:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-07-04 08:53:10
|
||||
* @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"
|
||||
: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"
|
||||
: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/product/distribution",
|
||||
lineURL: "/code/startEightDiscipline/product/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>
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren