Compare commits

...

6 Commits

Author SHA1 Message Date
helloDy
9f485a35e9 Merge branch 'master' into dy 2023-08-25 14:46:33 +08:00
helloDy
b1749486fe 提交 2023-08-25 11:11:34 +08:00
zhp
2859ec78c4 Merge pull request 'zhp' (#30) from zhp into master
Reviewed-on: #30
2023-07-21 17:04:29 +08:00
‘937886381’
a17d258934 Merge branch 'master' into zhp 2023-07-21 17:03:56 +08:00
‘937886381’
837991ee91 表格计算新增 2023-07-21 17:03:25 +08:00
258b9f1256 Merge pull request 'dy' (#29) from dy into master
Reviewed-on: #29
2023-07-21 16:47:13 +08:00
18 changed files with 1141 additions and 389 deletions

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-22 14:57:50 * @Date: 2022-08-22 14:57:50
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2023-07-21 16:45:57 * @LastEditTime: 2023-08-01 14:42:59
* @Description: * @Description:
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -40,6 +40,7 @@
<script> <script>
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.76:8080/ym-pass'; // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.76:8080/ym-pass';
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.23:8080/'; window.SITE_CONFIG['apiURL'] = 'http://192.168.1.23:8080/';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.0.31:8080/';
</script> </script>
<% } %> <% } %>
<!-- 集成测试环境 --> <!-- 集成测试环境 -->

View File

@ -13,6 +13,7 @@ t.brand.mini = 'qms'
t.public = {} t.public = {}
t.public.operation = '操作' t.public.operation = '操作'
t.public.activate = '启动'
t.add = '新增' t.add = '新增'
t.delete = '删除' t.delete = '删除'
@ -45,7 +46,10 @@ t.parameter = '台差参数'
t.configuration = '配置' t.configuration = '配置'
t.uploadFile = '上传' t.uploadFile = '上传'
t.detail = '查看详情' t.detail = '查看详情'
t.preview = '预览'
t.edit = '编辑'
t.finished = '已完成'
t.implementation = '实施中'
@ -53,9 +57,11 @@ t.detail = '查看详情'
t.prompt = {} t.prompt = {}
t.prompt.title = '提示' t.prompt.title = '提示'
t.prompt.info = '确定进行[{handle}]操作?' t.prompt.info = '确定进行[{handle}]操作?'
t.prompt.delete = '是否对[{object}]进行删除操作?'
t.prompt.success = '操作成功' t.prompt.success = '操作成功'
t.prompt.failed = '操作失败' t.prompt.failed = '操作失败'
t.prompt.deleteBatch = '请选择删除项' t.prompt.deleteBatch = '请选择删除项'
t.prompt.chooseGroup = '请选择要求分组'
t.validate = {} t.validate = {}
t.validate.required = '必填项不能为空' t.validate.required = '必填项不能为空'
@ -346,7 +352,7 @@ t.quality.judgmentMark = '判断标识'
t.quality.disposalMethodStatus = '状态' t.quality.disposalMethodStatus = '状态'
t.quality.inspectionPositionNumber = '序号' t.quality.inspectionPositionNumber = '序号'
t.quality.productName = '检验产品' t.quality.productName = '检验产品'
t.quality.supplierName = '供应商名称' t.quality.suppliername = '供应商名称'
t.quality.transferOutName = '转出' t.quality.transferOutName = '转出'
t.quality.transferInName = '转入' t.quality.transferInName = '转入'
t.quality.dataSources = '数据来源' t.quality.dataSources = '数据来源'
@ -354,6 +360,8 @@ t.quality.remark = '备注'
t.quality.userName = '创建人' t.quality.userName = '创建人'
t.quality.inspectionStage = '检验阶段' t.quality.inspectionStage = '检验阶段'
t.quality.supplierName = '供应商' t.quality.supplierName = '供应商'
t.quality.supplierList = '供应商列表'
t.quality.principal = '负责人列表'
t.quality.normalToRelaxed = '正常转放宽' t.quality.normalToRelaxed = '正常转放宽'
t.quality.normalToTightened = '正常转加严' t.quality.normalToTightened = '正常转加严'
t.quality.relaxedToNormal = '放宽转正常' t.quality.relaxedToNormal = '放宽转正常'
@ -469,13 +477,17 @@ t.supplier.projectName = '评估项目'
t.supplier.projectTypeName = '类别' t.supplier.projectTypeName = '类别'
t.supplier.requirement = '要求' t.supplier.requirement = '要求'
t.supplier.statisticalValue = '是否统计值' t.supplier.statisticalValue = '是否统计值'
t.supplier.evaluationTemplateName = '评估模板'
t.supplier.lastStartTime = '上次启动时间段' t.supplier.lastStartTime = '上次启动时间段'
t.supplier.lastStartEvaluationPeriod = '上次启动评估时间段' t.supplier.lastStartEvaluationPeriod = '上次启动评估时间段'
t.supplier.estimatedNextStartTime = '预计下次启动时间' t.supplier.estimatedNextStartTime = '预计下次启动时间'
t.supplier.offline = '下限' t.supplier.offline = '下限'
t.supplier.online = '上限' t.supplier.online = '上限'
t.supplier.supplierStatus = '供应商状态' t.supplier.supplierStatus = '供应商状态'
t.supplier.year = '年度'
t.supplier.quarter = '季度'
t.supplier.month = '月度'
t.supplier.materiel = '物料'
t.supplier.requiredGrouping = '要求分组'
@ -575,6 +587,7 @@ t.gage.repeatabilityAndReproducibility = '重复性和再现性(R&R)'
t.gage.partVariation = '零件变差(TV)' t.gage.partVariation = '零件变差(TV)'
t.gage.decide = '综合判定' t.gage.decide = '综合判定'
t.gage.tabularComputations = '表格计算' t.gage.tabularComputations = '表格计算'
t.gage.tabularComputationsAdd = '表格计算新增'
t.gage.fabrication = '制作' t.gage.fabrication = '制作'
@ -700,7 +713,6 @@ t.researchquality.registrationDate = '登记日期'
t.researchquality.changeSource = '变更来源' t.researchquality.changeSource = '变更来源'
t.researchquality.owner = '所有者' t.researchquality.owner = '所有者'
t.researchquality.category = 'Category' t.researchquality.category = 'Category'
t.researchquality.title = '标题'
t.researchquality.currentStage = '当前阶段' t.researchquality.currentStage = '当前阶段'
t.researchquality.productName = '产品名称' t.researchquality.productName = '产品名称'
t.researchquality.qualityChangeStatus = '状态' t.researchquality.qualityChangeStatus = '状态'

View File

@ -1,14 +1,14 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-07-14 13:44:46 * @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-18 16:53:52 * @LastEditTime: 2023-07-21 09:34:55
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<div> <div>
<el-drawer close-on-press-escape:title="$t('add')" :append-to-body="true" :before-close="handleClose" <el-drawer close-on-press-escape :title="!dataForm.id ? $t('add') : $t('add')" :append-to-body="true"
:visible.sync="innerDrawer"> @closed="handleClose" :visible.sync="innerDrawer">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"> label-width="120px">
<el-form-item prop="requirementListId" :label="$t('customerquality.requirementListName')"> <el-form-item prop="requirementListId" :label="$t('customerquality.requirementListName')">
@ -101,7 +101,7 @@ export default {
}) })
}, },
handleClose() { handleClose() {
this.innerDrawer = true this.innerDrawer = false
this.$refs.dataForm.resetFields() this.$refs.dataForm.resetFields()
}, },
getInfo() { getInfo() {

View File

@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-19 16:17:25 * @LastEditTime: 2023-07-21 10:07:47
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer close-on-press-escape title="提示" :visible.sync="visible" size="50%" :before-close="handleClose()"> <el-drawer close-on-press-escape title="项目清单" :visible.sync="visible" size="50%" :before-close="handleClose()">
<el-tabs @tab-click="handleClickTab" v-model="title" tab-position="left" style="margin-bottom: 30px;"> <el-tabs @tab-click="handleClickTab" v-model="title" tab-position="left" style="margin-bottom: 30px;">
<el-tab-pane label="项目概述" name="first"> <el-tab-pane label="项目概述" name="first">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-08 14:29:46 * @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-19 16:58:37 * @LastEditTime: 2023-07-21 14:03:20
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -137,7 +137,9 @@ export default {
urlOptions: { urlOptions: {
getDataListURL: "/customerquality/qmsCustomerQualityProjectList/page", getDataListURL: "/customerquality/qmsCustomerQualityProjectList/page",
deleteURL: "/customerquality/qmsCustomerQualityProjectList", deleteURL: "/customerquality/qmsCustomerQualityProjectList",
exportURL: '/customerquality/qmsCustomerQualityProjectList/export' exportURL: '/customerquality/qmsCustomerQualityProjectList/export',
getProductURL: '/basic/qmsProduct/page',
getCustomerURL: '/basic/qmsCustomer/page'
}, },
tableData:[], tableData:[],
productData: {}, productData: {},
@ -156,6 +158,56 @@ export default {
productOrUpdateVisible: false, productOrUpdateVisible: false,
qualityProjectListShow:false, qualityProjectListShow:false,
formConfig: [ formConfig: [
{
type: 'select',
label: i18n.t('basic.productName'),
placeholder: i18n.t('basic.productName'),
selectOptions: [],
param: 'productId'
},
{
type: 'select',
label: i18n.t('customerquality.customerName'),
placeholder: i18n.t('customerquality.customerName'),
selectOptions: [],
param: 'customerId'
},
{
type: 'select',
label: i18n.t('customerquality.status'),
placeholder: i18n.t('customerquality.status'),
selectOptions: [
{
id: '0',
name: '待审核'
},
{
id: '1',
name: '已完成'
},
{
id: '2',
name: '交付退回'
},
{
id: '3',
name: '审核拒绝'
}
],
param: 'status'
},
{
type: 'datePicker',
label: i18n.t('time'),
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeSlot',
width: 350
},
{ {
type: "button", type: "button",
btnName: i18n.t('search'), btnName: i18n.t('search'),
@ -179,7 +231,8 @@ export default {
// baseConfig // baseConfig
}, },
mounted () { mounted () {
this.getDataList(); this.getDataList()
this.getDict()
}, },
methods: { methods: {
//search-bar //search-bar
@ -203,6 +256,42 @@ export default {
this.dataListLoading = false; this.dataListLoading = false;
}) })
}, },
getDict() {
this.$http
.get(this.urlOptions.getProductURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.formConfig[0].selectOptions = res.data.list.map((item) => {
return {
id: item.id,
name:item.productName
}
})
}
})
this.$http
.get(this.urlOptions.getCustomerURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
this.formConfig[1].selectOptions = res.data.list.map((item) => {
return {
id: item.id,
name: item.customerName
}
})
})
},
handleProductCancel() { handleProductCancel() {
this.productOrUpdateVisible = false; this.productOrUpdateVisible = false;
this.productOrEditTitle = ""; this.productOrEditTitle = "";
@ -318,6 +407,11 @@ export default {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
// console.log(i18n); // console.log(i18n);
this.listQuery.status = val.status ? val.status : null
this.listQuery.productId = val.productId ? val.productId : null
this.listQuery.customerId = val.customerId ? val.customerId : null
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : null
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : null
this.listQuery.page = 1 this.listQuery.page = 1
this.getDataList() this.getDataList()
break; break;

View File

@ -1,13 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-13 09:42:39 * @LastEditTime: 2023-07-21 16:35:04
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" <el-drawer :title="dataForm.id ? $t('edit') : $t('add')" :visible.sync="drawer" size="50%">
label-width="150px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" label-width="150px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="partName" :label="$t('gage.partName')"> <el-form-item prop="partName" :label="$t('gage.partName')">
@ -126,14 +126,34 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button> <el-row>
<base-table :table-props="tableProps" :table-data="tableData" /> <el-form-item style="float: right;margin-right: 30px;">
<el-button @click="handleClose()">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }} </el-button>
</el-form-item>
</el-row>
</el-form> </el-form>
<div v-if="dataForm.id? true :false" style='margin-left: 30px;'>
<el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button>
<el-button @click="tabularComputationsAdd()" type="primary">{{ $t('gage.tabularComputationsAdd') }}</el-button>
<base-table :span-method="objectSpanMethod" :table-props="tableProps" :table-data="tableData" />
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</div>
<tabularComputations-add ref="tabularComputationsAddOrUpdate" v-if="tabularComputationsAddShow"
@refreshDataList="getTableData">
</tabularComputations-add>
</el-drawer>
</template> </template>
<script> <script>
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add"; import basicAdd from "@/mixins/basic-add";
import InnerTable from "./innerTable"
import tabularComputationsAdd from "./tabularComputations-add"
import available from "./available"; import available from "./available";
// const tableProps = [ // const tableProps = [
// { // {
@ -201,29 +221,14 @@ import available from "./available";
// // ] // // ]
// // } // // }
// ] // ]
const tableProps = [
{
prop: 'testUserName',
label: '人员',
align: 'center'
},
{
prop: 'orderNumber',
label: '序号',
align:'center'
},
{
prop: 'test',
label: '零件',
align: 'center',
children: [
]
}
]
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
components: {
tabularComputationsAdd,
},
data() { data() {
return { return {
tabularComputationsAddShow:false,
urlOptions: { urlOptions: {
submitURL: "/gage/qmsGageGrr", submitURL: "/gage/qmsGageGrr",
infoURL: "/gage/qmsGageGrr/{ id }", infoURL: "/gage/qmsGageGrr/{ id }",
@ -234,10 +239,11 @@ export default {
getCustomerListURL: '/basic/qmsCustomer/page', getCustomerListURL: '/basic/qmsCustomer/page',
getTabularComputationsURL: '/gage/qmsGageGrrTester/table' getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
}, },
drawer:false,
trueTableProps: [], trueTableProps: [],
gageList: [], gageList: [],
userList: [], userList: [],
tableProps, tableProps:[],
customerList: [], customerList: [],
tableData:[], tableData:[],
gageTypeList:[], gageTypeList:[],
@ -304,7 +310,30 @@ export default {
name: '自校报告' name: '自校报告'
} }
], ],
column1Arr:[],
column1Index: 0,
column2Arr: {},
column2Index: 0,
visible: false, visible: false,
data: [],
headers: [
{
prop: 'meanRange',
label: '极差均值',
},
{
prop: 'meanDifference',
label: '均值差',
},
{
prop: 'upperControlLimit',
label: '控制上限',
},
{
prop: 'lowerControlLimit',
label: '控制下限',
},
],
// tableProp2, // tableProp2,
chartDataArr: [], chartDataArr: [],
dataForm: { dataForm: {
@ -332,6 +361,14 @@ export default {
}; };
}, },
computed: { computed: {
getHeaders() {
return this.data.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.data.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
},
dataRule() { dataRule() {
return { return {
publicErrand: [ publicErrand: [
@ -373,7 +410,62 @@ export default {
this.tableProps = [] this.tableProps = []
}, },
methods: { methods: {
tabularComputationsAdd() {
this.tabularComputationsAddShow = true
this.$nextTick(() => {
this.$refs.tabularComputationsAddOrUpdate.init(this.dataForm.id)
})
},
setrowspans() {
// v.rowspan = 1
this.tableData.forEach(v => {
v.rowspan = 1;
v.rangeAverageRowspan = 1;
});
//
for (let i = 0; i < this.tableData.length; i++) {
// v.rowspan = 1
//
// idid
// v.rowspan + 1
// v.rowspan - 1
for (let j = i + 1; j < this.tableData.length; j++) {
//id
if (this.tableData[i].finalAverage === this.tableData[j].finalAverage) {
this.tableData[i].rowspan++;
this.tableData[j].rowspan--;
}
if (this.tableData[i].rangeAverage === this.tableData[j].rangeAverage) {
this.tableData[i].rangeAverageRowspan++;
this.tableData[j].rangeAverageRowspan--;
}
}
//
i = i + this.tableData[i].rowspan - 1;
}
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(column)
if (columnIndex === 0) {
return {
rowspan: row.rowspan,
colspan: 1
};
} else if (column.label === '最终均值') {
return {
rowspan: row.rowspan,
colspan: 1
};
}
if (column.label === '极差均值') {
return {
rowspan: row.rangeAverageRowspan,
colspan: 1
};
}
},
getTableData() { getTableData() {
this.tableData = []
this.$http.get(this.urlOptions.getTabularComputationsURL, { this.$http.get(this.urlOptions.getTabularComputationsURL, {
params: { params: {
gageGrrId:this.dataForm.id gageGrrId:this.dataForm.id
@ -407,42 +499,117 @@ export default {
// // ] // // ]
// // }, // // },
// ] // ]
for (let i = 0; i < result.data.qmsGageGrrTesterDTOList.length; i++){ let propsData = [
// console.log(result.data.qmsGageGrrTesterDTOList[i].orderMapList) {
Object.keys(result.data.qmsGageGrrTesterDTOList[i].partMapList).forEach((item) => { prop: 'testUserName',
this.tableProps[2].children.push({ label: '人员',
align: 'center',
subcomponent: InnerTable
},
{
prop: 'orderNumber',
label: '序号',
align: 'center',
},
{
prop: 'test',
label: '零件',
align: 'center',
children: [
{
prop: 'orderAverage',
label: '序号均值',
align: 'center',
},
]
},
{
prop: 'finalAverage',
label: '最终均值',
align: 'center'
},
{
prop: 'rangeAverage',
label: '极差均值',
align: 'center'
},
{
prop: 'partAverageMean',
label: 'Rp零件均值极差',
align: 'center'
}
]
Object.keys(result.data.finalPartMapList).forEach((item) => {
propsData[2].children.push({
label: String(item), label: String(item),
prop: 'measuredData' + String(item), prop: 'measuredData' + String(item),
align: 'center' align: 'center'
}) })
}) })
this.tableProps = propsData
let orderAverageArr = []
let rangeArr = []
for (let i = 0; i < result.data.qmsGageGrrTesterDTOList.length; i++){
// console.log(result.data.qmsGageGrrTesterDTOLis[i])
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderAverage).forEach((item) => {
orderAverageArr.push(result.data.qmsGageGrrTesterDTOList[i].orderAverage[item])
})
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => { Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => {
console.log(item)
let measuredDataProp = 'measuredData' + String(item) let measuredDataProp = 'measuredData' + String(item)
this.tableData.push({ arr.push({
testUserName: result.data.qmsGageGrrTesterDTOList[i].testUserName, testUserName: result.data.qmsGageGrrTesterDTOList[i].testUserName,
orderNumber: item, orderNumber: item,
finalAverage: '',
gageGrrId: result.data.qmsGageGrrTesterDTOList[i].gageGrrId,
partAverageMean: '',
[measuredDataProp]: '', [measuredDataProp]: '',
}) })
}) })
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => { Object.keys(result.data.qmsGageGrrTesterDTOList[i].range).forEach((item) => {
result.data.qmsGageGrrTesterDTOList[i].orderMapList[item].forEach((ele, index, arr) => { rangeArr.push(result.data.qmsGageGrrTesterDTOList[i].range[item])
let measuredData = 'measuredData' + String(index + 1)
console.log(item)
// console.log(arr)
// console.log(ele)
// console.log(this.tableProps[2].children.prop);
// console.log(this.tableProps[2].children[item - 1].prop)
console.log(index)
console.log(measuredData)
console.log(ele)
// console.log(this.tableData[index + 1])
this.tableData[item-1][measuredData] = ele
// console.log(this.tableData[item - 1])
})
}) })
} }
this.tableData = arr
// console.log(Object.keys(result.data.finalPartMapList))
Object.keys(result.data.finalPartMapList).forEach((item) => {
// console.log(item)
let measuredData = 'measuredData' + String(item)
console.log(result.data.finalPartMapList[item])
result.data.finalPartMapList[item].forEach((ele, index) => {
this.tableData[index][measuredData] = ele
})
})
orderAverageArr.forEach((ele, index) => {
this.tableData[index]['orderAverage'] = ele
})
this.tableData.forEach((ele, index) => {
ele.partAverageMean = result.data.partAverageMean
result.data.qmsGageGrrTesterDTOList.forEach((item, i) => {
// console.log(item.finalAverage)
if (this.tableData[index].testUserName === result.data.qmsGageGrrTesterDTOList[i].testUserName) {
ele.finalAverage = item.finalAverage
ele.rangeAverage = item.rangeAverage
}
})
})
// rangeArr.forEach((ele, index) => {
// this.data.push({
// range:ele
// })
// })
// console.log()
let dataDetail = []
dataDetail.push({
meanRange: result.data.meanRange,
lowerControlLimit: result.data.lowerControlLimit,
meanDifference: result.data.meanDifference,
upperControlLimit: result.data.upperControlLimit,
})
this.data = dataDetail
console.log(this.tableProps) console.log(this.tableProps)
console.log(this.tableData) console.log(this.tableData)
this.setrowspans()
// console.log(this.table) // console.log(this.table)
// console.log(moreData,'1111') // console.log(moreData,'1111')
// for (let i = 0; i < 30; i++) { // for (let i = 0; i < 30; i++) {
@ -540,7 +707,7 @@ export default {
this.dataForm.id = id || "" this.dataForm.id = id || ""
// console.log(11111) // console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || ""; // this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true this.drawer = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
@ -571,16 +738,16 @@ export default {
}) })
.catch(() => { .catch(() => {
}) })
this.$http // this.$http
.get(this.urlOptions.getUserList, this.listQuery) // .get(this.urlOptions.getUserList, this.listQuery)
.then(({ data: res }) => { // .then(({ data: res }) => {
if (res.code === 0) { // if (res.code === 0) {
console.log(res.data); // console.log(res.data);
this.userList = res.data.list // this.userList = res.data.list
} // }
}) // })
.catch(() => { // .catch(() => {
}) // })
}, },
// getCode() { // getCode() {
// this.$http.post(this.urlOptions.getCodeURL) // this.$http.post(this.urlOptions.getCodeURL)
@ -608,6 +775,34 @@ export default {
}) })
.catch(() => { }) .catch(() => { })
}, },
handleClose() {
this.drawer = false
this.$refs.dataForm.resetFields()
},
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.drawer = false
this.$refs.dataForm.resetFields()
this.$emit("refreshDataList")
},
});
})
.catch(() => { });
});
},
// //
dataFormSubmitHandle: debounce( dataFormSubmitHandle: debounce(
function () { function () {

View File

@ -0,0 +1,113 @@
<!--
* @Author: zhp
* @Date: 2023-04-18 09:19:02
* @LastEditTime: 2023-07-20 16:34:04
* @LastEditors: zhp
* @Description:
-->
<template>
<el-popover placement="right" width="400" trigger="click">
<base-table id="palletTable" :table-props="tableProps" ref="palletTable1" :table-data="tableData">
</base-table>
<!-- <i slot="reference" class="el-icon-plus" @click="showInnerTable(injectData.id)" /> -->
<span slot="reference" @click="showInnerTable(injectData.id)">{{ injectData.testUserName}} </span>
</el-popover>
</template>
<script>
import i18n from "@/i18n"
import { timeFormatter } from '@/filters'
const tableProps = [
{
prop: "partAverage",
label: '零件均值',
},
{
prop: "range",
label:'零件极差',
// filter: timeFormatter
},
];
export default {
name: 'InnerTable',
props: {
injectData: {
type: Object,
default: () => ({})
},
itemProp: {
type: String
}
},
data() {
return {
tableProps,
list: this.injectData,
tableData: [],
urlOptions: {
getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
},
}
},
methods: {
showInnerTable() {
this.tableData = []
this.$http.get(this.urlOptions.getTabularComputationsURL, {
params: {
gageGrrId: this.injectData.gageGrrId
},
})
.then(({ data: result }) => {
if (result.code === 0) {
console.log(result)
let partAverageArr = []
let rangeArr = []
// let aa = []
// let moreData = [
// // {
// // testUserName: null,
// // data: [
// // {
// // orderNumber: result.data.qmsGageGrrTesterDTOList[i].list[j].orderNumber,
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // }
// // ]
// // },
// ]
for (let i = 0; i < result.data.qmsGageGrrTesterDTOList.length; i++) {
if (this.injectData.testUserName === result.data.qmsGageGrrTesterDTOList[i].testUserName) {
Object.keys(result.data.qmsGageGrrTesterDTOList[i].partAverage).forEach((item) => {
partAverageArr.push({
partAverage:result.data.qmsGageGrrTesterDTOList[i].partAverage[item]
})
})
Object.keys(result.data.qmsGageGrrTesterDTOList[i].range).forEach((item) => {
rangeArr.push(result.data.qmsGageGrrTesterDTOList[i].range[item])
})
}
}
this.tableData = partAverageArr
rangeArr.forEach((item,index) => {
this.tableData[index]['range'] = item
})
}
})
.catch(() => {
})
}
}
}
</script>

View File

@ -0,0 +1,291 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-21 17:02:05
* @LastEditors: zhp
* @Description:
-->
<template>
<el-drawer :append-to-body="true" title="" :visible.sync="drawer" size="50%">
<el-form :model="form" ref="dataForm" :rules="dataRule" label-width="80px">
<!--省略,其他表单项-->
<el-row class="row" v-for="(item,index) in form.list" :key="index">
<!--设置动态标签,只在部门第一行显示-->
<el-col :span="5">
<el-form-item label="检测人员" :prop="'list.' + index +'.gageGrrTesterId'" :rules="{
required: true, message: '请选择部门', trigger: 'blur'
}">
<el-select class="input" v-model="item.gageGrrTesterId">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="序号" :prop="'list.' + index +'.orderNumber'" :rules="{
required: true, message: '请输入人数', trigger: 'blur'
}">
<el-input @change="getOrderNumber" class="input" v-model="item.orderNumber" placeholder="人数"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="零件" :prop="'list.' + index +'.part'">
<el-input @change="getPart" class="input" v-model="item.part" placeholder="备注"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="测量值" :prop="'list.' + index +'.measuredData'">
<el-input class="input" v-model="item.bz" placeholder="备注"></el-input>
</el-form-item>
</el-col>
<el-col :span="1">
<div> <i class="el-icon-circle-plus" @click="addDept"></i></div>
<div>
<i v-if="form.list.length>1" class="el-icon-remove-outline" @click="delDept(index)"></i>
</div>
</el-col>
</el-row>
<el-form-item style="float: right;margin-right: 30px;">
<el-button @click="handleClose()">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }} </el-button>
</el-form-item>
</el-form>
</el-drawer>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
// import InnerTable from "./innerTable"
// import available from "./available";
// const tableProps = [
// {
// prop: 'equipmentName',
// label: ''
// },
// // {
// // prop: 'lineA',
// // label: '(h)',
// // children: [
// // {
// // prop: 'workTime',
// // label: ''
// // },
// // {
// // prop: 'workTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineB',
// // label: '(h)',
// // children: [
// // {
// // prop: 'downTime',
// // label: ''
// // },
// // {
// // prop: 'downTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineC',
// // label: '',
// // children: [
// // {
// // prop: 'faultTime',
// // label: ''
// // },
// // {
// // prop: 'faultTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineD',
// // label: '',
// // children: [
// // {
// // prop: 'actualProcessingSpeed',
// // label: ''
// // },
// // {
// // prop: 'theoreticalProcessingSpeed',
// // label: ''
// // },
// // {
// // prop: 'speedActuationRate',
// // label: ''
// // }
// // ]
// // }
// ]
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/gage/qmsGageGrrTester",
// infoURL: "/gage/qmsGageGrr/{ id }",
// dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page',
// getGageTypeList: '/gage/qmsGageType/page',
// getGageList: '/gage/qmsGage/page',
// getCustomerListURL: '/basic/qmsCustomer/page',
// getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
},
userList:[],
drawer: false,
form: {
gageGrrId:null,
list: [
{ gageGrrTesterId: null, orderNumber: null, part: null, measuredData: null },
{ gageGrrTesterId: null, orderNumber: null, part: null, measuredData: null }
],//
}
};
},
computed: {
dataRule() {
return {
publicErrand: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
gageId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
measurementNumber: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
partNumber: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
};
},
},
mounted () {
this.getData()
},
methods: {
init(id, ) {
this.form.gageGrrId = id || ""
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.drawer = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields()
// if (this.dataForm.id) {
// // this.getInfo()
// } else {
// // this.getCode()
// }
});
},
getPart(val) {
let arr = []
this.form.list.forEach(ele => {
arr.push(item.orderNumber)
})
const uniqueArr = [...new Set(arr)]
sortArr = uniqueArr.sort()
const maxValue = sortArr[sortArr.length - 1]
this.$message({
message: '当前零件最大值为' + maxValue + '请保持其他测量人员零件最大值一致',
type: 'warning'
});
},
getOrderNumber(val) {
let arr = []
this.form.list.forEach(ele => {
arr.push(item.orderNumber)
})
const uniqueArr = [...new Set(arr)]
sortArr = uniqueArr.sort()
const maxValue = sortArr[sortArr.length - 1]
this.$message({
message: '当前序号最大值为'+maxValue+'请保持其他测量人员序号最大值一致',
type: 'warning'
});
},
addDept() {
this.form.list.push({ bm: "", bmrs: "", bz: "" });
},
delDept(index) {
this.form.list.splice(index, 1);
},
getData() {
this.$http
.get(this.urlOptions.getUserList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.userList = res.data.list
}
})
.catch(() => {
})
},
// getCode() {
// this.$http.post(this.urlOptions.getCodeURL)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res);
// this.dataForm.customSamplingCode = res.data
// }
// })
// .catch(() => {
// });
// },
//
handleClose() {
this.drawer = false
this.$refs.dataForm.resetFields()
},
dataFormSubmit() {
console.log(this.form)
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http.post(this.urlOptions.submitURL, this.form)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.drawer = false
this.$refs.dataForm.resetFields()
this.$emit("refreshDataList")
},
});
})
.catch(() => { });
})
},
//
},
};
</script>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-13 09:31:24 * @LastEditTime: 2023-07-21 15:39:23
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -20,11 +20,11 @@
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" /> @pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <!-- <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel"> @confirm="handleConfirm" :before-close="handleCancel">
<gapeGrs-add ref="addOrUpdate" @refreshDataList="successSubmit"> <gapeGrs-add ref="addOrUpdate" @refreshDataList="successSubmit">
</gapeGrs-add> </gapeGrs-add>
</base-dialog> </base-dialog> -->
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-search> <gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-search>
@ -42,6 +42,8 @@
</el-row> </el-row>
</base-dialog> </base-dialog>
<report-show ref="reportOrUpdate" v-if="reportShow"></report-show> <report-show ref="reportOrUpdate" v-if="reportShow"></report-show>
<gapeGrs-add ref="gapeGrsAddOrUpdate" v-if="gapeGrsAddShow" @refreshDataList="getDataList">
</gapeGrs-add>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -52,6 +54,7 @@ import gapeGrsAdd from "./components/gageGrs-add"
import reportShow from "./components/report-show" import reportShow from "./components/report-show"
import gageSearch from "./components/gageSearch" import gageSearch from "./components/gageSearch"
import basicSearch from "@/mixins/basic-search" import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from '@/filters' import { timeFormatter } from '@/filters'
import i18n from "@/i18n" import i18n from "@/i18n"
const tableProps = [ const tableProps = [
@ -160,6 +163,7 @@ export default {
deleteURL: "/gage/qmsGageGrr", deleteURL: "/gage/qmsGageGrr",
exportUrl: '/gage/qmsGageGrr/export' exportUrl: '/gage/qmsGageGrr/export'
}, },
gapeGrsAddShow:false,
grrReportData:{}, grrReportData:{},
dialogTableVisible:false, dialogTableVisible:false,
tableProps, tableProps,
@ -295,11 +299,11 @@ export default {
}) })
.catch(() => { }); .catch(() => { });
} else if (val.type === 'edit') { } else if (val.type === 'edit') {
this.addOrUpdateVisible = true this.gapeGrsAddShow = true
this.addOrEditTitle = this.$t('edit') // this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.gapeGrsAddOrUpdate.init(val.data.id);
}); })
} else if (val.type === 'parameter') { } else if (val.type === 'parameter') {
this.$router.push({ this.$router.push({
name: 'gage-qmsGageTypeDifferenceParameter', name: 'gage-qmsGageTypeDifferenceParameter',
@ -332,9 +336,11 @@ export default {
this.exportHandle(); this.exportHandle();
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.gapeGrsAddShow = true
this.addOrUpdateVisible = true; // this.addOrEditTitle = this.$t('edit')
this.addOrUpdateHandle() this.$nextTick(() => {
this.$refs.gapeGrsAddOrUpdate.init()
})
break; break;
default: default:
console.log(val) console.log(val)

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-04-17 14:23:17 * @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-17 14:33:44 * @LastEditTime: 2023-07-21 14:21:04
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -9,9 +9,9 @@
<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="5" class="item"> <!-- <el-badge :value="5" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button> <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> </el-badge> -->
</SearchBar> </SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
:limit="listQuery.limit" :table-data="tableData"> :limit="listQuery.limit" :table-data="tableData">
@ -27,32 +27,14 @@
</qualityChange-add> </qualityChange-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<qualityChange-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</qualityChange-search>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
$t("reset")
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page" import basicPage from "@/mixins/basic-page"
import basicSearch from "@/mixins/basic-search" // import basicSearch from "@/mixins/basic-search"
import qualityChangeSearch from "./components/qualityChangeSearch.vue" // import qualityChangeSearch from "./components/qualityChangeSearch.vue"
import qualityChangeAdd from "./components/qualityChange-add.vue" import qualityChangeAdd from "./components/qualityChange-add.vue"
import InnerTable from "./components/innerTable" import InnerTable from "./components/innerTable"
import { timeFormatter, handleProcess, handleProductType } from '@/filters' import { timeFormatter, handleProcess, handleProductType } from '@/filters'
@ -127,7 +109,7 @@ const tableBtn = [
} }
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -156,15 +138,85 @@ export default {
addOrUpdateVisible: false, addOrUpdateVisible: false,
productOrUpdateVisible: false, productOrUpdateVisible: false,
formConfig: [ formConfig: [
// { {
// type: "", type: 'select',
// label: i18n.t("params.paramCode"), label: i18n.t('researchquality.changeSource'),
// placeholder: i18n.t("params.paramCode"), placeholder: i18n.t('researchquality.changeSource'),
// param: "paramCode", selectOptions: [
// }, {
// { id: '0',
// type: "separate", name: '工程变更'
// }, },
{
id: '1',
name: '设计变更'
},
{
id: '2',
name: 'CCB'
}
],
param: 'changeSource'
},
{
type: 'select',
label: i18n.t('researchquality.phase'),
placeholder: i18n.t('researchquality.phase'),
selectOptions: [
{
id: '0',
name: '设计'
},
{
id: '1',
name: '计划'
},
{
id: '2',
name: '验证'
},
{
id: '3',
name: '发布'
}
],
param: 'phase'
},
{
type: 'select',
label: i18n.t('researchquality.qualityChangeStatus'),
placeholder: i18n.t('researchquality.qualityChangeStatus'),
selectOptions: [],
param: 'status'
},
{
type: 'select',
label: i18n.t('researchquality.temporaryChange'),
placeholder: i18n.t('researchquality.temporaryChange'),
selectOptions: [
{
id: '0',
name: '是'
},
{
id: '1',
name: '否'
}
],
param: 'temporaryChange'
},
{
type: 'datePicker',
label: i18n.t('time'),
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeSlot',
width: 350
},
{ {
type: "button", type: "button",
btnName: i18n.t('search'), btnName: i18n.t('search'),
@ -190,7 +242,7 @@ export default {
}; };
}, },
components: { components: {
qualityChangeSearch, // qualityChangeSearch,
// supplierProduct, // supplierProduct,
qualityChangeAdd qualityChangeAdd
}, },
@ -279,10 +331,11 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined this.listQuery.changeSource = val.changeSource ? val.changeSource : undefined
this.listQuery.supplierStatus = val.supplierStatus ? val.supplierStatus : undefined this.listQuery.qualityChangeStatus = val.qualityChangeStatus ? val.qualityChangeStatus : undefined
this.listQuery.supplierTypeId = val.supplierTypeId ? val.supplierTypeId : undefined this.listQuery.qualityChangeStatus = val.qualityChangeStatus ? val.qualityChangeStatus : undefined
this.listQuery.ment = this.ment ? this.ment : undefined this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : null
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : null
// console.log(i18n); // console.log(i18n);
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-04-17 14:23:17 * @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-17 15:26:25 * @LastEditTime: 2023-08-24 09:28:35
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -13,7 +13,7 @@
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
</SearchBar> </SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" :limit="listQuery.limit" :table-data="tableData"> <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" :label="$t('handle')" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@ -173,7 +173,7 @@ export default {
// this.searchOrUpdateVisible = false; // this.searchOrUpdateVisible = false;
// }, // },
conditionSearch() { conditionSearch() {
this.searchOrEditTitle = "搜索"; this.searchOrEditTitle = this.$t('search');
this.searchOrUpdateVisible = true; this.searchOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.searchOrUpdate.init(); this.$refs.searchOrUpdate.init();
@ -226,16 +226,19 @@ export default {
}, },
handleClick(val) { handleClick(val) {
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", { this.$confirm(
confirmButtonText: "确定", this.$t("prompt.delete", { object: val.data.customerTypeName }),
cancelButtonText: "取消", this.$t("prompt.title"),
type: "warning", {
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning"
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => { this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: this.$t("prompt.success"),
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
@ -282,7 +285,7 @@ export default {
this.getDataList(); this.getDataList();
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true this.addOrUpdateVisible = true
this.addOrUpdateHandle() this.addOrUpdateHandle()
break; break;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-04-17 14:23:17 * @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-12 14:17:24 * @LastEditTime: 2023-08-17 15:06:48
* @LastEditors: DY * @LastEditors: DY
* @Description: 标签设定 * @Description: 标签设定
--> -->
@ -114,19 +114,20 @@ export default {
}, },
editHandle(label) { editHandle(label) {
label.disabled = false label.disabled = false
console.log('nihc', label)
}, },
handleClose(tag) { handleClose(tag) {
console.log('你好', tag) this.$confirm(
this.$confirm(`确定对[名称=${tag.name}]进行删除操作?`, "提示", { this.$t("prompt.delete", { object: tag.name }),
confirmButtonText: "确定", this.$t("prompt.title"),
cancelButtonText: "取消", {
type: "warning", confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning"
}).then(()=> { }).then(()=> {
this.$http.delete(this.urlOptions.deleteLabelInfoURL, { data: [tag.id] }).then(({ data }) => { this.$http.delete(this.urlOptions.deleteLabelInfoURL, { data: [tag.id] }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: this.$t("prompt.success"),
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
@ -149,16 +150,19 @@ export default {
// }); // });
// }, // },
deleteHandle(id, name) { deleteHandle(id, name) {
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", { this.$confirm(
confirmButtonText: "确定", this.$t("prompt.delete", { object: name }),
cancelButtonText: "取消", this.$t("prompt.title"),
type: "warning", {
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning"
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => { this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: this.$t("prompt.success"),
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
@ -279,38 +283,6 @@ export default {
// console.log(11111); // console.log(11111);
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrEditTitle = '修改'
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
}
},
buttonClick(val) { buttonClick(val) {
console.log(val) console.log(val)
switch (val.btnName) { switch (val.btnName) {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-06-20 11:16:51 * @Date: 2023-06-20 11:16:51
* @LastEditTime: 2023-07-14 16:31:39 * @LastEditTime: 2023-08-22 11:00:34
* @LastEditors: DY * @LastEditors: DY
* @Description: 评估计划 * @Description: 评估计划
--> -->
@ -9,11 +9,11 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div> <div>
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="供应商名称"> <el-form-item :label="$t('quality.suppliername')">
<el-input v-model="formInline.supplierName" placeholder="供应商"></el-input> <el-input v-model="formInline.supplierName" :placeholder="$t('quality.suppliername')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="评估模板"> <el-form-item :label="$t('supplier.evaluationTemplateName')">
<el-select v-model="formInline.evaluationTemplateId" filterable clearable placeholder="评估模板"> <el-select v-model="formInline.evaluationTemplateId" filterable clearable :placeholder="$t('supplier.evaluationTemplateName')">
<el-option <el-option
v-for="item in modalOptions" v-for="item in modalOptions"
:key="item.id" :key="item.id"
@ -22,8 +22,8 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="评估类型"> <el-form-item :label="$t('supplier.evaluationType')">
<el-select v-model="formInline.evaluationType" clearable placeholder="评估类型"> <el-select v-model="formInline.evaluationType" clearable :placeholder="$t('supplier.evaluationType')">
<el-option <el-option
v-for="item in typeOptions" v-for="item in typeOptions"
:key="item.id" :key="item.id"
@ -33,7 +33,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button> <el-button type="primary" @click="onSubmit">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -45,60 +45,60 @@
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand"> <el-form label-position="left" inline class="demo-table-expand">
<el-form-item label="供应商列表"> <el-form-item :label="$t('quality.supplierList')">
<el-tag type="success" v-for="(item, index) in props.row.list" :key="index">{{ item.supplierName }}</el-tag> <el-tag type="success" v-for="(item, index) in props.row.list" :key="index">{{ item.supplierName }}</el-tag>
</el-form-item> </el-form-item>
<br> <br>
<el-form-item label="负责人列表"> <el-form-item :label="$t('quality.principal')">
<el-tag>{{ props.row.evaluatorName }}</el-tag> <el-tag>{{ props.row.evaluatorName }}</el-tag>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="评估类型" :label="$t('supplier.evaluationType')"
prop="evaluationType"> prop="evaluationType">
<template slot-scope="slot"> <template slot-scope="slot">
<el-tag :type="slot.row.evaluationType === 0 ? 'info' : slot.row.evaluationType === 1 ? 'success' : ''" effect="dark">{{ slot.row.evaluationType === 0 ? '年度' : slot.row.evaluationType === 1 ? '季度' : '月度' }}</el-tag> <el-tag :type="slot.row.evaluationType === 0 ? 'info' : slot.row.evaluationType === 1 ? 'success' : ''" effect="dark">{{ slot.row.evaluationType === 0 ? $t('supplier.year') : slot.row.evaluationType === 1 ? $t('supplier.quarter') : $t('supplier.month') }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="标题" :label="$t('quality.title')"
prop="title"> prop="title">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="评估模板" :label="$t('supplier.evaluationTemplateName')"
prop="evaluationTemplateName"> prop="evaluationTemplateName">
<template slot-scope="slot"> <template slot-scope="slot">
<el-tag type="danger" effect="plain">{{ slot.row.evaluationTemplateName }}</el-tag> <el-tag type="danger" effect="plain">{{ slot.row.evaluationTemplateName }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="说明" :label="$t('supplier.description')"
prop="description"> prop="description">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="上次启动时间" :label="$t('supplier.lastStartTime')"
prop="lastStartTime"> prop="lastStartTime">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="上次启动评估时间段" :label="$t('supplier.lastStartEvaluationPeriod')"
prop="lastStartEvaluationPeriod"> prop="lastStartEvaluationPeriod">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="预计下次启动时间" :label="$t('supplier.estimatedNextStartTime')"
prop="estimatedNextStartTime"> prop="estimatedNextStartTime">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="提醒人" :label="$t('supplier.reminder')"
prop="reminder"> prop="reminder">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" :label="$t('public.operation')"
width="160" width="160"
prop="desc"> prop="desc">
<template slot-scope="slot"> <template slot-scope="slot">
<el-button type="text" @click="start(slot.row)">启动</el-button> <el-button type="text" @click="start(slot.row)">{{ $('public.activate') }}</el-button>
<el-button type="text" @click="editPlan(slot.row)">edit</el-button> <el-button type="text" @click="editPlan(slot.row)">edit</el-button>
<el-button type="text" @click="deletePlan(slot.row)" style="color: red">delete</el-button> <el-button type="text" @click="deletePlan(slot.row)" style="color: red">delete</el-button>
</template> </template>
@ -118,6 +118,7 @@
<script> <script>
import addPlan from './components/addPlan.vue' import addPlan from './components/addPlan.vue'
import startPlan from './components/startPlan.vue' import startPlan from './components/startPlan.vue'
import i18n from "@/i18n"
export default { export default {
components: { addPlan, startPlan }, components: { addPlan, startPlan },
@ -132,15 +133,15 @@ export default {
addtModelVisible: false, addtModelVisible: false,
typeOptions: [ typeOptions: [
{ {
name: '年度', name: i18n.t('supplier.year'),
id: 0 id: 0
}, },
{ {
name: '季度', name: i18n.t('supplier.quarter'),
id: 1 id: 1
}, },
{ {
name: '月度', name: i18n.t('supplier.month'),
id: 2 id: 2
} }
], ],
@ -187,16 +188,19 @@ export default {
}); });
}, },
deletePlan(val) { deletePlan(val) {
this.$confirm(`确定对[名称=${val.title}]进行删除操作?`, "提示", { this.$confirm(
confirmButtonText: "确定", this.$t("prompt.delete", { object: val.title }),
cancelButtonText: "取消", this.$t("prompt.title"),
type: "warning", {
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning"
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.id] }).then(({ data }) => { this.$http.delete(this.urlOptions.deleteURL, { data: [val.id] }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: this.$t("prompt.success"),
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-06-19 10:38:41 * @Date: 2023-06-19 10:38:41
* @LastEditTime: 2023-07-20 16:14:02 * @LastEditTime: 2023-08-21 15:26:45
* @LastEditors: DY * @LastEditors: DY
* @Description: 评估模板 * @Description: 评估模板
--> -->
@ -21,21 +21,21 @@
<div :class="item.current === 1 ? 'activeCard' : 'normalCard'" @mouseenter="enterDiv(item)" @mouseleave="leaveDiv(item)" @click="seeeValuationList(item.id)"> <div :class="item.current === 1 ? 'activeCard' : 'normalCard'" @mouseenter="enterDiv(item)" @mouseleave="leaveDiv(item)" @click="seeeValuationList(item.id)">
<svg v-if="item.current" class="icon-svg" aria-hidden="true"><use xlink:href="#icon-look"></use></svg> <svg v-if="item.current" class="icon-svg" aria-hidden="true"><use xlink:href="#icon-look"></use></svg>
<svg v-else class="icon-svg" aria-hidden="true"><use xlink:href="#icon-look1"></use></svg> <svg v-else class="icon-svg" aria-hidden="true"><use xlink:href="#icon-look1"></use></svg>
<p style="font-size: 14px">预览</p> <p style="font-size: 14px">{{ $t("preview") }}</p>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div :class="item.current === 1 ? 'activeCard' : 'normalCard'" @mouseenter="enterDiv(item)" @mouseleave="leaveDiv(item)" @click="editEvaluation(item)"> <div :class="item.current === 1 ? 'activeCard' : 'normalCard'" @mouseenter="enterDiv(item)" @mouseleave="leaveDiv(item)" @click="editEvaluation(item)">
<svg v-if="item.current" class="icon-svg" aria-hidden="true"><use xlink:href="#icon-edit0"></use></svg> <svg v-if="item.current" class="icon-svg" aria-hidden="true"><use xlink:href="#icon-edit0"></use></svg>
<svg v-else class="icon-svg" aria-hidden="true"><use xlink:href="#icon-edit1"></use></svg> <svg v-else class="icon-svg" aria-hidden="true"><use xlink:href="#icon-edit1"></use></svg>
<p style="font-size: 14px">编辑</p> <p style="font-size: 14px">{{ $t("edit") }}</p>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div :class="item.current === 1 ? 'activeDelCard' : 'normalCard'" @mouseenter="enterDiv(item)" @mouseleave="leaveDiv(item)" @click="deleteEvaluation(item.id, item.name)"> <div :class="item.current === 1 ? 'activeDelCard' : 'normalCard'" @mouseenter="enterDiv(item)" @mouseleave="leaveDiv(item)" @click="deleteEvaluation(item.id, item.name)">
<svg v-if="item.current" class="icon-svg" aria-hidden="true"><use xlink:href="#icon-del1"></use></svg> <svg v-if="item.current" class="icon-svg" aria-hidden="true"><use xlink:href="#icon-del1"></use></svg>
<svg v-else class="icon-svg" aria-hidden="true"><use xlink:href="#icon-del"></use></svg> <svg v-else class="icon-svg" aria-hidden="true"><use xlink:href="#icon-del"></use></svg>
<p style="font-size: 14px">删除</p> <p style="font-size: 14px">{{ $t("delete") }}</p>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -50,7 +50,7 @@
<evaluation-template-add @refreshDataList="getDataList" :show="editModelVisible" @info="getInfo"></evaluation-template-add> <evaluation-template-add @refreshDataList="getDataList" :show="editModelVisible" @info="getInfo"></evaluation-template-add>
</div> --> </div> -->
<el-dialog <el-dialog
title="新增模板" :title="$t('add')"
:visible.sync="editModelVisible" :visible.sync="editModelVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="70%" width="70%"
@ -58,7 +58,7 @@
<evaluation-template-add ref="addTemplate" @refreshDataList="getDataList" :show="editModelVisible" @info="getInfo"></evaluation-template-add> <evaluation-template-add ref="addTemplate" @refreshDataList="getDataList" :show="editModelVisible" @info="getInfo"></evaluation-template-add>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="预览" :title="$t('preview')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="40%" width="40%"
@ -104,7 +104,6 @@ export default ({
}, },
tableProps, tableProps,
projectsList: [], projectsList: [],
addOrEditTitle: '新增模板',
current: 0, current: 0,
addTemplateVisible: false, addTemplateVisible: false,
activeStep: 0, activeStep: 0,
@ -119,7 +118,6 @@ export default ({
}, },
methods: { methods: {
editEvaluation(obj) { editEvaluation(obj) {
console.log('编辑', obj.id)
this.templateId = obj.id this.templateId = obj.id
this.editModelVisible = true this.editModelVisible = true
this.$nextTick(() => { this.$nextTick(() => {
@ -133,16 +131,19 @@ export default ({
obj.current = 1 obj.current = 1
}, },
deleteEvaluation(id, name) { deleteEvaluation(id, name) {
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", { this.$confirm(
confirmButtonText: "确定", this.$t("prompt.delete", { object: name }),
cancelButtonText: "取消", this.$t("prompt.title"),
type: "warning", {
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning"
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => { this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: this.$t("prompt.success"),
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
@ -160,14 +161,13 @@ export default ({
this.editModelVisible = value this.editModelVisible = value
}, },
handleClose(done) { handleClose(done) {
this.$confirm('确认关闭?') this.$confirm(this.$t('prompt.info', { 'handle': this.$t('close') }))
.then(_ => { .then(_ => {
done(); done();
}) })
.catch(_ => {}); .catch(_ => {});
}, },
seeeValuationList(id) { seeeValuationList(id) {
console.log('啊啊啊啊', id)
this.dialogVisible = true this.dialogVisible = true
this.$http this.$http
.get(this.urlOptions.getProjectTypeURL, { .get(this.urlOptions.getProjectTypeURL, {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-04-17 14:23:17 * @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-14 15:56:32 * @LastEditTime: 2023-08-22 15:05:00
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -18,7 +18,7 @@
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
@emitFun="inputChange" :limit="listQuery.limit" @emitFun="inputChange" :limit="listQuery.limit"
:table-data="tableData" > :table-data="tableData" >
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" :label="$t('public.operation')" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@ -296,16 +296,19 @@ export default {
}, },
handleClick(val) { handleClick(val) {
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", { this.$confirm(
confirmButtonText: "确定", this.$t("prompt.delete", { object: val.data.customerTypeName }),
cancelButtonText: "取消", this.$t("prompt.title"),
type: "warning", {
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning"
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => { this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: this.$t("prompt.success"),
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-06-20 11:16:51 * @Date: 2023-06-20 11:16:51
* @LastEditTime: 2023-07-21 16:37:22 * @LastEditTime: 2023-08-23 15:10:48
* @LastEditors: DY * @LastEditors: DY
* @Description: 项目清单 * @Description: 项目清单
--> -->
@ -9,11 +9,11 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div> <div>
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="标题"> <el-form-item :label="$t('supplier.title')">
<el-input v-model="formInline.title" placeholder="标题"></el-input> <el-input v-model="formInline.title" :placeholder="$t('supplier.title')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="物料"> <el-form-item :label="$t('supplier.materiel')">
<el-select v-model="formInline.productId" filterable clearable placeholder="物料"> <el-select v-model="formInline.productId" filterable clearable :placeholder="$t('supplier.materiel')">
<el-option <el-option
v-for="item in productList" v-for="item in productList"
:key="item.id" :key="item.id"
@ -22,8 +22,8 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="供应商"> <el-form-item :label="$t('quality.supplierName')">
<el-select v-model="formInline.supplierId" filterable clearable placeholder="供应商"> <el-select v-model="formInline.supplierId" filterable clearable :placeholder="$t('quality.supplierName')">
<el-option <el-option
v-for="item in supplierList" v-for="item in supplierList"
:key="item.id" :key="item.id"
@ -32,25 +32,25 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item :label="$t('supplier.status')">
<el-radio-group v-model="formInline.status"> <el-radio-group v-model="formInline.status">
<el-radio-button :label="2">全部</el-radio-button> <el-radio-button :label="2">{{ $t('all') }}</el-radio-button>
<el-radio-button :label="1">已完成</el-radio-button> <el-radio-button :label="1">{{ $t('finished') }}</el-radio-button>
<el-radio-button :label="0">实施中</el-radio-button> <el-radio-button :label="0">{{ $t('implementation') }}</el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="时间"> <el-form-item :label="$t('time')">
<el-date-picker <el-date-picker
v-model="timeSlot" v-model="timeSlot"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
range-separator="" :range-separator="$t('gage.to')"
start-placeholder="开始日期" :start-placeholder="$t('gage.startTime')"
end-placeholder="结束日期"> :end-placeholder="$t('gage.endTime')">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button> <el-button type="primary" @click="onSubmit">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -63,8 +63,8 @@
</div> </div>
<div class="buttonDiv"> <div class="buttonDiv">
<el-row :gutter="0"> <el-row :gutter="0">
<el-col :span="12"><div class="bottom" @click="editProject(project)">编辑</div></el-col> <el-col :span="12"><div class="bottom" @click="editProject(project)">{{ $t('edit') }}</div></el-col>
<el-col :span="12"><div class="bottom" @click="deletePro(project)">删除</div></el-col> <el-col :span="12"><div class="bottom" @click="deletePro(project)">{{ $t('delete') }}</div></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
@ -116,16 +116,19 @@ export default {
}, },
methods: { methods: {
deletePro(val) { deletePro(val) {
this.$confirm(`确定对[名称=${val.title}]进行删除操作?`, "提示", { this.$confirm(
confirmButtonText: "确定", this.$t("prompt.delete", { object: val.title }),
cancelButtonText: "取消", this.$t("prompt.title"),
type: "warning", {
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning"
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.id] }).then(({ data }) => { this.$http.delete(this.urlOptions.deleteURL, { data: [val.id] }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: this.$t("prompt.success"),
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-06-20 11:16:51 * @Date: 2023-06-20 11:16:51
* @LastEditTime: 2023-07-21 15:18:23 * @LastEditTime: 2023-08-24 10:58:10
* @LastEditors: DY * @LastEditors: DY
* @Description: 要求清单 * @Description: 要求清单
--> -->
@ -10,7 +10,7 @@
<div style="padding: 20px 30px"> <div style="padding: 20px 30px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<h2>要求分组</h2> <h2>{{ $t('supplier.requiredGrouping') }}</h2>
<div v-for="(item, index) in groupList" :key="index"> <div v-for="(item, index) in groupList" :key="index">
<div :class="item.actived ? 'activedDiv' : 'group'" @click="searchByGroup(item)">{{ item.name }}</div> <div :class="item.actived ? 'activedDiv' : 'group'" @click="searchByGroup(item)">{{ item.name }}</div>
</div> </div>
@ -18,10 +18,10 @@
<el-col :span="18"> <el-col :span="18">
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-input v-model="formInline.requirementName" placeholder="标题"></el-input> <el-input v-model="formInline.requirementName" :placeholder="$t('supplier.title')"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button> <el-button type="primary" @click="onSubmit">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="bigDiv"> <div class="bigDiv">
@ -45,14 +45,14 @@
<div v-if="addtModelVisible" style="height: 400px; width: 40%; margin: 20px auto; border: 1px solid grey; padding: 20px"> <div v-if="addtModelVisible" style="height: 400px; width: 40%; margin: 20px auto; border: 1px solid grey; padding: 20px">
<h2>要求编辑</h2> <h2>要求编辑</h2>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
<el-form-item label="标题" prop="title"> <el-form-item :label="$t('supplier.title')" prop="title">
<el-input v-model="ruleForm.title"></el-input> <el-input v-model="ruleForm.title"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="描述" prop="description"> <el-form-item :label="$t('gage.description')" prop="description">
<el-input type="textarea" v-model="ruleForm.description"></el-input> <el-input type="textarea" v-model="ruleForm.description"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属分组" prop="requirementListGroupId"> <el-form-item :label="$t('researchquality.requirementListGroupId')" prop="requirementListGroupId">
<el-select v-model="ruleForm.requirementListGroupId" placeholder="请选择"> <el-select v-model="ruleForm.requirementListGroupId" :placeholder="$t('choose')">
<el-option <el-option
v-for="item in groupList" v-for="item in groupList"
:key="item.id" :key="item.id"
@ -63,8 +63,8 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> --> <!-- <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> -->
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="saveRequirement"> </el-button> <el-button type="primary" @click="saveRequirement">{{ $t('save') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -114,16 +114,19 @@ export default {
this.addtModelVisible = true this.addtModelVisible = true
}, },
deleteRequire(id, name) { deleteRequire(id, name) {
this.$confirm(`确定对[标题=${name}]进行删除操作?`, "提示", { this.$confirm(
confirmButtonText: "确定", this.$t("prompt.delete", { object: name }),
cancelButtonText: "取消", this.$t("prompt.title"),
type: "warning", {
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning"
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => { this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: this.$t("prompt.success"),
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
@ -164,7 +167,6 @@ export default {
}); });
}, },
searchByGroup(group) { searchByGroup(group) {
console.log('查询', group)
// this.formInline.groupId = group.id // this.formInline.groupId = group.id
group.actived = !group.actived group.actived = !group.actived
if (group.actived === true) { if (group.actived === true) {
@ -207,7 +209,7 @@ export default {
onSubmit() { onSubmit() {
console.log('submit!'); console.log('submit!');
if (this.formInline.groupId === '') { if (this.formInline.groupId === '') {
this.$message.error('请选择要求分组') this.$message.error(this.$t("prompt.chooseGroup"))
} else { } else {
this.$http this.$http
.get(this.urlOptions.getRequirementListURL, { .get(this.urlOptions.getRequirementListURL, {

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zwq * @LastEditors: DY
* @LastEditTime: 2023-01-05 14:32:59 * @LastEditTime: 2023-08-01 15:14:29
* @Description: * @Description:
--> -->
<template> <template>