Compare commits

...

6 Commits

Author SHA1 Message Date
‘937886381’
ae1a9c1883 Merge branch 'master' into zhp 2023-06-28 14:22:20 +08:00
‘937886381’
460cca785b 更新代码 2023-06-28 14:21:52 +08:00
zhp
34c54e7633 Merge pull request 'dy' (#5) from dy into master
Reviewed-on: #5
2023-06-28 14:18:36 +08:00
helloDy
063c2da768 merge 2023-06-28 14:05:58 +08:00
helloDy
80796fd241 project 2023-06-28 13:58:24 +08:00
09a7392e49 Merge pull request 'zhp' (#4) from zhp into master
Reviewed-on: #4
2023-06-21 17:10:01 +08:00
21 changed files with 2287 additions and 246 deletions

13
package-lock.json generated
View File

@ -15086,6 +15086,11 @@
"is-plain-obj": "^1.0.0"
}
},
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-list-map": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
@ -16999,6 +17004,14 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true
},
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"requires": {
"sortablejs": "1.10.2"
}
},
"vuex": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",

View File

@ -33,6 +33,7 @@
"vue-cron": "^1.0.9",
"vue-i18n": "^8.18.2",
"vue-router": "3.0.7",
"vuedraggable": "^2.24.3",
"vuex": "^3.5.1"
},
"devDependencies": {

View File

@ -293,6 +293,15 @@ t.basic.InspectionPlan = '检验计划'
t.basic.customerTypeName = '客户类型'
t.basic.productTypeName = '产品类型名称'
t.basic.client = '服务对象'
t.basic.stock = '进货检验'
t.basic.finishedProduct = '成品检验'
t.basic.course = '过程检验'
t.basic.shipment = '出货检验'
t.basic.userName = '用户名'
t.basic.departName = '部门名'
t.quality = {}
@ -418,7 +427,10 @@ t.supplier.description = '说明'
t.supplier.evaluationPeriod = '评估时间段'
t.supplier.evaluationType = '评估类型'
t.supplier.reminder = '提醒人'
t.supplier.title = '标题'
t.supplier.title = '标题'
t.supplier.projectType = '评估项类型'
t.supplier.weight = '权重'
t.supplier.projectName = '评估项目'
t.supplier.projectTypeName = '类别'
t.supplier.requirement = '要求'
t.supplier.statisticalValue = '是否统计值'
@ -429,16 +441,6 @@ t.supplier.estimatedNextStartTime = '预计下次启动时间'
t.supplier.offline = '下限'
t.supplier.online = '上限'
t.gage = {}
t.gage.name = '名称'
t.gage.code = '编号'
@ -524,16 +526,17 @@ t.gage.outsideVerify = '外部校验'
t.gage.verificationFee = '校验费用'
t.gage.report = '量具重复性及再现性分析报告'
t.gage.model = '型号'
t.gage.meanRange = '极差均值'
t.gage.meanDifference = '均值差'
t.gage.partAverageMean = 'Rp 零件均值极差'
t.gage.measuringUnit = '测量单元分析'
t.gage.totalVariation = '%总变查(TV)'
t.gage.reproducibility = '再现性-实验人员变差(AV)'
t.gage.repeatability = '重复性-设备变差(EV)'
t.gage.repeatabilityAndReproducibility = '重复性和再现性(R&R)'
t.gage.partVariation = '零件变差(TV)'
t.gage.decide = '综合判定'
t.gage.tabularComputations = '表格计算'

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-03-29 09:09:20
* @LastEditTime: 2023-06-26 09:44:09
* @LastEditors: zhp
* @Description:
-->
@ -16,14 +16,21 @@
<el-form-item prop="specification" :label="$t('basic.specification')">
<el-input v-model="dataForm.specification" :placeholder="$t('basic.specification')"></el-input>
</el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
<el-form-item prop="incomingInspection" :label="$t('basic.stock')">
<el-switch v-model="dataForm.incomingInspection" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
<el-form-item prop="finishInspection" :label="$t('basic.stock')">
<el-switch v-model="dataForm.finishInspection" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
<el-form-item prop="outInspection" :label="$t('basic.shipment')">
<el-switch v-model="dataForm.outInspection" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="processInspection" :label="$t('basic.course')">
<el-switch v-model="dataForm.processInspection" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
@ -59,7 +66,11 @@ export default {
id: "",
controlCode:null,
controlName:null,
customerTypeStatus:null
customerTypeStatus: null,
finishInspection: null,
incomingInspection: null,
outInspection: null,
processInspection: null,
},
};
},

View File

@ -7,16 +7,10 @@
-->
<template>
<span>
<el-radio v-model="injectData.incomingInspection" :label="1"
>进货检验</el-radio
>
<el-radio v-model="injectData.processInspection" :label="1"
>过程检验</el-radio
>
<el-radio v-model="injectData.finishInspection" :label="1"
>成品检验</el-radio
>
<el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
<el-radio v-model="injectData.incomingInspection" :label="1">{{ $t('basic.stock') }}</el-radio>
<el-radio v-model="injectData.processInspection" :label="1">{{ $t('basic.course') }}</el-radio>
<el-radio v-model="injectData.finishInspection" :label="1">{{ $t('basic.finishedProduct') }}</el-radio>
<el-radio v-model="injectData.outInspection" :label="1">{{ $t('basic.shipment') }}</el-radio>
</span>
</template>

View File

@ -0,0 +1,218 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-26 15:01:44
* @LastEditors: zhp
* @Description:
-->
<template>
<el-transfer v-model="chooseData" :titles="['用户列表', '团队成员']" :data="notChooseData"></el-transfer>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
// const generateData = _ => {
// const data = [];
// const cities = ['', '', '广', '', '', '西', ''];
// const pinyin = ['shanghai', 'beijing', 'guangzhou', 'shenzhen', 'nanjing', 'xian', 'chengdu'];
// cities.forEach((city, index) => {
// data.push({
// label: city,
// key: index,
// pinyin: pinyin[index]
// });
// });
// return data;
// }
return {
notChooseData:[],
chooseData: [],
urlOptions: {
submitURL: "/basic/qmsCustomer",
getCustomerPageListURL: "/basic/qmsCustomerType/page",
infoURL: "/basic/qmsCustomer/{id}",
getCodeURL: '/basic/qmsCustomer/getCode',
getTeamMemberURL: '/basic/qmsTeamMember/page',
getUserListURL: '/sys/user/page',
editTeamMemberListURL: '/basic/qmsTeamMember'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
listQuery: {
limit: 999,
page:1
},
visible: false,
customerTypeList: {},
teamId: null,
};
},
computed: {
dataRule() {
return {
// dictLabel: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// dictValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
methods: {
init(id,) {
this.teamId = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.$http
.get(this.urlOptions.getTeamMemberURL, {
params: {
limit: 999,
page: 1,
teamId: id
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
if (res.data.list.length > 0) {
var data = res.data.list
for (let i = 0; i < data.length; i++) {
this.chooseData.push(data[i].userId)
}
}
}
})
this.$http
.get(this.urlOptions.getUserListURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.notChooseData = res.data.list.map((item) => {
return {
key: item.id,
label: item.username
}
})
}
})
this.visible = true;
// this.$nextTick(() => {
// // this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// // console.log(1111);
// this.getInfo();
// } else {
// this.getCode()
// }
// });
},
// getCode() {
// // console.log(111111);
// this.$http
// .post(this.urlOptions.getCodeURL)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res);
// this.dataForm.customerCode = res.data
// }
// })
// .catch(() => {
// });
// },
//
// getInfo() {
// this.$http
// .get(`/basic/qmsCustomer/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => { });
// },
//
dataFormSubmit() {
let ids = this.chooseData
ids.unshift(this.teamId)
this.$http.put(this.urlOptions.editTeamMemberListURL,ids)
.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.visible = false
this.$emit("refreshDataList")
},
});
})
.catch(() => { })
},
// dataFormSubmitHandle: debounce(
// function () {
// 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.visible = false;
// console.log(1111);
// this.$emit("successSubmit");
// },
// });
// })
// .catch(() => { });
// });
// },
// 1000,
// { leading: true, trailing: false }
// ),
},
};
</script>

View File

@ -223,7 +223,7 @@ export default {
})
.catch(() => { });
} else if (val.type === 'edit') {
this.addOrUpdateVisible = true
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);

View File

@ -16,7 +16,7 @@
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<customer-type-add ref="addOrUpdate" @successSubmit="successSubmit"></customer-type-add>
<customer-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-type-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-06-20 15:37:17
* @LastEditTime: 2023-06-26 15:32:36
* @LastEditors: zhp
* @Description:
-->
@ -15,8 +15,8 @@
<el-button type="primary" size="small" @click="conditionSearch">{{ $t("conditionSearch")}}}</el-button>
</el-badge>
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
:limit="listQuery.limit" :table-data="tableData">
<base-table highlight-current-row id="palletTable" :table-props="tableProps" :page="listQuery.page"
@current-change="handleCurrentChange" ref="palletTable1" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
@ -49,23 +49,18 @@
</el-col>
<el-col :span="10">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfigMember" ref="ruleForm" @headBtnClick="buttonClick">
<SearchBar :formConfigs="formConfigMember" ref="ruleForm" @headBtnClick="teamMemberButtonClick">
</SearchBar>
<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"
@clickBtn="handleClick" />
<base-table id="palletTable" :table-props="depProps" ref="palletTable1" :table-data="teamMemberData">
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-add>
<base-dialog :dialogTitle="teamMemberOrEditTitle" :dialogVisible="teamMemberOrUpdateVisible"
@cancel="handleTeamMemberCancel" @confirm="handleTeamMemberConfirm" :before-close="handleTeamMemberCancel">
<teamMember-add ref="teamMemberOrUpdate" @refreshDataList="successTeamMemberSubmit"></teamMember-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
</div>
</el-col>""
</el-col>""
</el-row>
</el-card>
</template>
@ -74,12 +69,12 @@
import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search";
import teamAdd from "./components/team-add";
import teamMemberAdd from './components/teamMember-add'
import teamSearch from "./components/teamSearch.vue";
import Cookies from 'js-cookie'
import qs from 'qs'
// import radio from "./components/radio.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "teamCode",
@ -98,6 +93,16 @@ const tableProps = [
label: i18n.t('basic.remark')
},
];
const depProps = [
{
prop: "departName",
label: i18n.t('basic.departName')
},
{
prop: "userName",
label: i18n.t('basic.userName')
}
];
const tableBtn = [
{
type: "edit",
@ -116,11 +121,17 @@ export default {
getDataListURL: "/basic/qmsTeam/page",
deleteURL: "/basic/qmsTeam",
exportURL: "/basic/qmsTeam/export",
teamMemberURL: '/basic/qmsTeamMember/page'
},
tableProps,
depProps,
teamId:null,
teamMemberData: [],
teamMemberOrEditTitle:'',
tableBtn,
productData: {},
addOrUpdateVisible: false,
teamMemberOrUpdateVisible:false,
searchOrEditTitle: "",
addOrEditTitle: '',
searchOrUpdateVisible: false,
@ -156,7 +167,14 @@ export default {
name: i18n.t('export'),
color: "primary",
// plain: true,
}
},
{
type: "button",
btnName: "取消选中",
name: "cancel",
color: "primary",
// plain: true,
},
],
formConfigMember: [
// {
@ -180,14 +198,37 @@ export default {
},
components: {
teamAdd,
teamMemberAdd,
teamSearch
},
// mounted() {
// this.getDepData()
// },
methods: {
//search-bar
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
},
setCurrent(index) {
this.$refs.palletTable1.setCurrent("palletTable", index)
console.log(index)
},
handleCurrentChange(val) {
this.teamId = val.newVal.id
this.$http.get(this.urlOptions.teamMemberURL, {
params: {
limit: 999,
page: 1,
teamId:val.newVal.id
}
}).then(({ data: res } ) => {
console.log(res)
if (res && res.code === 0) {
this.teamMemberData = res.data.list
}
})
},
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
@ -268,7 +309,7 @@ export default {
} else {
this.$message.error(data.msg);
}
});
})
})
.catch(() => { });
} else if (val.type === 'edit') {
@ -279,6 +320,41 @@ export default {
});
}
},
successTeamMemberSubmit() {
this.handleTeamMemberCancel()
this.$http.get(this.urlOptions.teamMemberURL, {
params: {
limit: 999,
page: 1,
teamId: this.teamId
}
}).then(({ data: res } ) => {
if (res && res.code === 0) {
this.teamMemberData = res.data.list
}
});
},
handleTeamMemberCancel() {
this.teamMemberOrUpdateVisible = false
this.teamMemberOrEditTitle = ''
},
teamMemberButtonClick(val) {
console.log(val);
switch (val.btnName) {
case "change":
this.teamMemberOrEditTitle = '修改团队成员'
this.teamMemberOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.teamMemberOrUpdate.init(this.teamId)
});
break;
default:
console.log(val);
}
},
handleTeamMemberConfirm() {
this.$refs.teamMemberOrUpdate.dataFormSubmit()
},
buttonClick(val) {
console.log(val);
switch (val.btnName) {
@ -301,6 +377,9 @@ export default {
this.$refs.addOrUpdate.init();
});
break;
case "cancel":
this.$refs.palletTable1.setCurrent("palletTable", -1);
break;
// case "correlation":
// this.productOrEditTitle = "";
// this.productOrUpdateVisible = true;

View File

@ -1,50 +1,26 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-01-12 09:46:23
* @LastEditTime: 2023-06-26 13:39:19
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar
:formConfigs="formConfig"
ref="ruleForm"
@headBtnClick="buttonClick"
>
<el-button type="primary" size="small" plain>导入</el-button>
</SearchBar>
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-button type="primary" size="small" plain>导入</el-button> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<!-- <add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update> -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<teamMember-add ref="addOrUpdate" @successSubmit="successSubmit"></teamMember-add>
</base-dialog>
</div>
</el-card>
@ -52,7 +28,7 @@
<script>
import basicPage from "@/mixins/basic-page";
// import AddOrUpdate from './params-add-or-update'
import teamMemberAdd from './components/teamMember-add'
import i18n from "@/i18n";
const tableProps = [
{
@ -83,7 +59,7 @@ export default {
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsControlMode/page",
getDataListURL: "/basic/qmsTeamMember/page",
deleteURL: "/basic/qmsControlMode",
},
tableProps,
@ -103,14 +79,13 @@ export default {
btnName: "新增",
name: "add",
color: "primary",
plain: true,
},
],
};
},
// components: {
// AddOrUpdate,
// },
components: {
teamMemberAdd,
},
methods:{
//search-bar
buttonClick(val) {

View File

@ -1,84 +1,132 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-12 15:35:59
* @LastEditTime: 2023-06-28 14:15:42
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="partName" :label="$t('gage.partName')">
<el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
</el-input>
</el-form-item>
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="corporation" :label="$t('gage.corporation')">
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
</el-input>
</el-form-item>
<el-form-item prop="itemNo" :label="$t('gage.itemNo')">
<el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
</el-input>
</el-form-item>
<el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
<el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
</el-input>
</el-form-item>
<el-form-item prop="partNumber" :label="$t('gage.partNumber')">
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
</el-input>
</el-form-item>
<el-form-item prop="specification" :label="$t('gage.specification')">
<el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
disabled>
</el-input>
</el-form-item>
<el-form-item prop="process" :label="$t('gage.process')">
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
</el-input>
</el-form-item>
<el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
<el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
<el-form-item prop="fabrication" :label="$t('gage.fabrication')">
<el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
</el-input>
</el-form-item>
<el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
</el-input>
</el-form-item>
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input>
</el-form-item>
<el-form-item prop="tester" :label="$t('gage.tester')">
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
</el-input>
</el-form-item>
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input>
</el-form-item>
<el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
<el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item prop="partName" :label="$t('gage.partName')">
<el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="corporation" :label="$t('gage.corporation')">
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="itemNo" :label="$t('gage.itemNo')">
<el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
<el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="partNumber" :label="$t('gage.partNumber')">
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="specification" :label="$t('gage.specification')">
<el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
disabled>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="process" :label="$t('gage.process')">
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
<el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="fabrication" :label="$t('gage.fabrication')">
<el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="tester" :label="$t('gage.tester')">
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
<el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button>
<base-table :table-props="tableProps" :table-data="tableData" :page="1" :limit="20" />
</el-form>
</template>
@ -90,17 +138,20 @@ export default {
data() {
return {
urlOptions: {
submitURL: "/gage/qmsGage",
infoURL: "/gage/qmsGage/{ id }",
submitURL: "/gage/qmsGageGrr",
infoURL: "/gage/qmsGageGrr/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page',
getGageTypeList: '/gage/qmsGageType/page',
getGageList: '/gage/qmsGage/page',
getCustomerListURL: '/basic/qmsCustomer/page'
getCustomerListURL: '/basic/qmsCustomer/page',
getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
},
gageList: [],
userList: [],
customerList:[],
customerList: [],
tableProps: [],
tableData:[],
gageTypeList:[],
departmentList: [],
processList: [
@ -221,6 +272,152 @@ export default {
this.getData();
},
methods: {
getTableData() {
this.$http.get(this.urlOptions.getTabularComputationsURL, {
params: {
gageGrrId:this.dataForm.id
},
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res)
}
})
.catch(() => {
})
let aa = []
let moreData = [
{
process: '综合',
data: [
{
equipmentName: '上片投入数量',
data: aa
},
{
equipmentName: '机器人投入数',
data: aa
},
{
equipmentName: '良品总投入数',
data: aa
},
{
equipmentName: '工序损耗',
data: aa
}
]
},
{
process: '上片',
data: [
{
equipmentName: '上片损失',
data: aa
}
]
},
{
process: '精切',
data: [
{
equipmentName: '精切损失',
data: aa
},
{
equipmentName: '精切抽检',
data: aa
}
]
}
]
for (let i = 0; i < 30; i++) {
let a = {
time: '2022-11-' + i,
eqCT: 0.01,
eqTT: 0.62,
lineCT: 0.73,
lineTT: 0.45
}
aa.push(a)
}
this.numArr = []
let num = 0
const tableConfig = []
this.chartDataArr = []
const dataArr = moreData.map((item, index) => {
let dataArr = []
if (item.data) {
this.chartDataArr = this.chartDataArr.concat(item.data)
num += item.data.length
this.numArr.push(num)
dataArr = item.data.map((z, idx) => {
const dataArr = {}
z.data.forEach((i) => {
// tableConfig
if (index === 0 && idx === 0) {
tableConfig.push({
label: i.time,
prop: i.time,
children: [
{ prop: i.time + 'eqCT', label: '设备CT' },
{ prop: i.time + 'eqTT', label: '设备TT' },
{ prop: i.time + 'lineCT', label: '产线CT' },
{
prop: i.time + 'lineTT',
label: '产线TT',
subcomponent: demo3Sub
}
]
})
}
//
dataArr[i.time + 'eqCT'] = i.eqCT
dataArr[i.time + 'eqTT'] = i.eqTT
dataArr[i.time + 'lineCT'] = i.lineCT
dataArr[i.time + 'lineTT'] = i.lineTT
dataArr.process = item.process
dataArr.equipmentName = z.equipmentName
})
console.log(dataArr)
return dataArr
})
}
return dataArr
})
console.log(tableConfig)
this.trueTableProps = this.tableProp2.concat(tableConfig)
console.log(this.trueTableProps)
this.tableData = this.flatten(dataArr)
console.log(this.tableData)
},
// tree->[]
flatten(arr) {
var res = []
for (var i = 0; i < arr.length; i++) {
if (Array.isArray(arr[i])) {
res = res.concat(this.flatten(arr[i]))
} else {
res.push(arr[i])
}
}
return res
},
spanMethod({ rowIndex, columnIndex }) {
if (columnIndex === 1) {
if (rowIndex === 0) {
return [this.numArr[0], 1]
} else if (this.numArr.indexOf(rowIndex) >= 0) {
const rowNum =
this.numArr[this.numArr.indexOf(rowIndex) + 1] -
this.numArr[this.numArr.indexOf(rowIndex)]
return [rowNum, 1]
} else {
return [0, 0]
}
}
},
init(id, ) {
this.dataForm.id = id || ""
// console.log(11111)
@ -281,7 +478,7 @@ export default {
//
getInfo() {
this.$http
.get(`/gage/qmsGage/${this.dataForm.id}`)
.get(`/gage/qmsGageGrr/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

View File

@ -0,0 +1,218 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-27 15:38:27
* @LastEditors: zhp
* @Description:
-->
<template>
<el-dialog :title="$t('gage.report')" :visible.sync="dialogTableVisible">
<table align="center" width="800" height="249" style="text-align: center;" border="1" cellspacing="0">
<tbody>
<tr>
<td>{{ $t('gage.partName')}}</td>
<td>{{ this.dataForm.partName }}</td>
<td>{{ $t('gage.gageName') }}</td>
<td>{{ this.dataForm.gageName }}</td>
<td>{{ $t('gage.measurementTime') }}</td>
<td>{{ this.dataForm.measurementTime }}</td>
</tr>
<tr>
<td>{{ $t('gage.itemNo') }}</td>
<td>{{ this.dataForm.itemNo }}</td>
<td>{{ $t('gage.model') }}</td>
<td>{{ this.dataForm.model }}</td>
<td>{{ $t('gage.measurementTime') }}</td>
<td>{{ this.dataForm.measurementTime }}</td>
</tr>
<tr>
<td>{{ $t('gage.measuringToolSpecification') }}</td>
<td>{{ this.dataForm.measuringToolSpecification }}</td>
<td>{{ $t('gage.measuringToolAccuracy') }}</td>
<td>{{ this.dataForm.measuringToolAccuracy }}</td>
<td>{{ $t('gage.process') }}</td>
<td>{{ this.dataForm.process }}</td>
</tr>
<tr>
<td>{{ $t('gage.meanRange') }}</td>
<td>{{ this.grrReportData.meanRange }}</td>
<td>{{ $t('gage.meanDifference') }}</td>
<td>{{ this.grrReportData.meanDifference }}</td>
<td>{{ $t('gage.partAverageMean') }}</td>
<td>{{ this.grrReportData.partAverageMean }}</td>
</tr>
<tr>
<td colspan="5">{{ $t('gage.measuringUnit') }}</td>
<td>{{ $t('gage.totalVariation') }}</td>
</tr>
<tr>
<td colspan="6">{{ $t('gage.repeatability') }}</td>
</tr>
<tr>
<td rowspan="3" colspan="3">{{ this.grrReportData.ev }}</td>
<td>r</td>
<td>k1</td>
<td rowspan="3">{{ this.grrReportData.evpercent }}</td>
</tr>
<tr>
<td>2</td>
<td>{{ this.grrReportData.k1[0] }}</td>
</tr>
<tr>
<td>3</td>
<td>{{ this.grrReportData.k1[1] }}</td>
</tr>
<tr>
<td colspan="6">{{ $t('gage.reproducibility') }}</td>
</tr>
<tr>
<td rowspan="3" colspan="3">{{ this.grrReportData.av }}</td>
<td>测试人员</td>
<td>k2</td>
<td rowspan="3">{{ this.grrReportData.avpercent }}</td>
</tr>
<tr>
<td>2</td>
<td>{{ this.grrReportData.k2[0] }}</td>
</tr>
<tr>
<td>3</td>
<td>{{ this.grrReportData.k2[1] }}</td>
</tr>
<tr>
<td colspan="6">{{ $t('gage.repeatabilityAndReproducibility') }}</td>
</tr>
<tr>
<td rowspan="3" colspan="3">{{ this.grrReportData.grr }}</td>
<td>n</td>
<td>k3</td>
<td rowspan="3">{{ this.grrReportData.grrpercent }}</td>
</tr>
<tr>
<td>2</td>
<td>{{ this.grrReportData.k3[0] }}</td>
</tr>
<tr>
<td>3</td>
<td>{{ this.grrReportData.k3[1] }}</td>
</tr>
<tr>
<td colspan="3">{{ $t('gage.partVariation') }}</td>
<td>4</td>
<td>{{ this.grrReportData.k3[2] }}</td>
<td rowspan="4">{{ this.grrReportData.pvpercent }}</td>
</tr>
<tr>
<td rowspan="3" colspan="3">{{ this.grrReportData.pv }}</td>
<td>5</td>
<td>{{ this.grrReportData.k3[3] }}</td>
</tr>
<tr>
<td>6</td>
<td>{{ this.grrReportData.k3[4] }}</td>
</tr>
<tr>
<td>7</td>
<td>{{ this.grrReportData.k3[5] }}</td>
</tr>
<tr>
<td colspan="3">{{ $t('gage.totalVariation') }}</td>
<td>8</td>
<td>{{ this.grrReportData.k3[6] }}</td>
<td rowspan="4">{{ this.grrReportData.ndc }}</td>
</tr>
<tr>
<td rowspan="3" colspan="3">{{ this.grrReportData.tv }}</td>
<td>9</td>
<td>{{ this.grrReportData.k3[7] }}</td>
</tr>
<tr>
<td>10</td>
<td>{{ this.grrReportData.k3[8] }}</td>
</tr>
<tr>
<td colspan="2">{{ $t('gage.decide') }}</td>
<td>%GRR</td>
<td rowspan="4">{{ this.grrReportData.isAccept }}</td>
<td>reason</td>
<td rowspan="4">{{ this.grrReportData.reason }}</td>
</tr>
</tbody>
</table>
</el-dialog>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/gage/qmsGage",
infoURL: "/gage/qmsGage/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page',
getGageTypeList: '/gage/qmsGageType/page',
reportURL: '/gage/qmsGageGrrTester/reprot'
},
grrReportData: {},
dataForm: {},
k1:[],
dialogTableVisible:false,
};
},
computed: {
dataRule() {
return {
// dictLabel: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// dictValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
mounted () {
},
methods: {
init(data) {
this.dataForm = data
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.$nextTick(() => {
this.$http.get(this.urlOptions.reportURL, {
params: {
gageGrrId:data.id
}
}).then(({ data: res }) => {
console.log(res)
if (res && res.code === 0) {
this.grrReportData = res.data
// console.log(this.k1)
this.dialogTableVisible = true
}
})
})
},
},
};
</script>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-21 16:52:20
* @LastEditTime: 2023-06-27 14:51:34
* @LastEditors: zhp
* @Description:
-->
@ -34,25 +34,14 @@
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
}}</el-button>
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
<el-dialog :title="$t('gage.report')" :visible.sync="dialogTableVisible">
<el-table :show-header="false" :data="data" :span-method="objectSpanMethod" border :cell-style="columnStyle"
style="width: 100%; margin-top: 20px">
<el-table-column width="180" prop="name"></el-table-column>
<el-table-column prop="amount1"></el-table-column>
<el-table-column width="180" prop="amount2"></el-table-column>
<el-table-column prop="amount3"></el-table-column>
<el-table-column prop="amount4"></el-table-column>
<el-table-column prop="amount5"></el-table-column>
</el-table>
</el-dialog>
<report-show ref="reportOrUpdate" v-if="reportShow"></report-show>
</div>
</el-card>
</template>
@ -60,6 +49,7 @@
<script>
import basicPage from "@/mixins/basic-page"
import gapeGrsAdd from "./components/gageGrs-add"
import reportShow from "./components/report-show"
import gageSearch from "./components/gageSearch"
import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from '@/filters'
@ -121,7 +111,8 @@ export default {
mixins: [basicPage, basicSearch],
components: {
gageSearch,
gapeGrsAdd
gapeGrsAdd,
reportShow
},
computed: {
//dataformcomputed
@ -136,7 +127,7 @@ export default {
amount5: this.dataForm.measurementTime
},
{
name: i18n.t("gage.itemNo"),
name: i18n.t("gage.itemNo"),
amount1: this.dataForm.itemNo,
amount2: i18n.t("gage.model"),
amount3: this.dataForm.model,
@ -169,9 +160,11 @@ export default {
deleteURL: "/gage/qmsGageGrr",
exportUrl: '/gage/qmsGageGrr/export'
},
grrReportData:{},
dialogTableVisible:false,
tableProps,
dataForm: {},
reportShow:false,
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -303,9 +296,11 @@ export default {
}
})
} else if (val.type === 'report') {
this.dialogTableVisible = true
this.dataForm = val.data
console.log(val.data)
this.reportShow = true
this.$nextTick(() => {
this.$refs.reportOrUpdate.init(val.data)
})
}
},
buttonClick(val) {
@ -314,7 +309,7 @@ export default {
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1
this.getDataList();
break;
break;
case "export":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1
@ -332,3 +327,34 @@ export default {
}
};
</script>
<style>
td{
width: 400px;
}
table {
border-collapse: collapse;
margin: 0 auto;
text-align: center;
}
table td,
table th {
border: 1px solid #cad9ea;
color: #666;
height: 30px;
}
table thead th {
background-color: #CCE8EB;
width: 100px;
}
table tr:nth-child(odd) {
background: #fff;
}
table tr:nth-child(even) {
background: #F5FAFA;
}
</style>

View File

@ -0,0 +1,474 @@
<!--
* @Author: Do not edit
* @Date: 2023-06-19 14:59:34
* @LastEditTime: 2023-06-27 15:00:33
* @LastEditors: DY
* @Description:
-->
<template>
<div v-if="show">
<h1>模板编辑</h1>
<div class="addDiv">
<div style="width: 300px">
<el-steps direction="vertical" :active="activeStep" space="70px">
<el-step title="定义"></el-step>
<el-step title="项目"></el-step>
<el-step title="排序"></el-step>
<el-step title="权重&公式"></el-step>
<el-step title="完成"></el-step>
</el-steps>
</div>
<div style="width: 80vw">
<el-button v-show="visibleList[0] === false && visibleList[4] !== true" style="margin: -20px 0 10px 0" @click="lastStep">上一步</el-button>
<div v-if="visibleList[0]" style="width: 60%; border: 1px solid grey; padding: 20px">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
<el-form-item label="编码" prop="code">
<el-input v-model="ruleForm.code"></el-input>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">下一步</el-button>
</el-form-item>
</el-form>
</div>
<div v-if="visibleList[1]">
<el-form :inline="true" :model="formInline" class="demo-form-inline" >
<el-form-item>
<el-input v-model="formInline.title" size="small" placeholder="标题"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="formInline.requirement" size="small" placeholder="要求"></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="formInline.projectTypeId" clearable size="small" placeholder="请选择类型">
<el-option v-for="(item, index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getEvaList">查询</el-button>
<el-button type="primary" size="small" @click="saveData">保存</el-button>
</el-form-item>
</el-form>
<el-row :gutter="5">
<el-col :span="18">
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 80%; min-height: 26vh; overflow-y: auto"
@selection-change="handleSelectionChange">
<el-table-column prop="title" label="标题" width="120" />
<el-table-column prop="projectTypeName" label="类型" width="120" />
<el-table-column prop="requirement" label="要求" />
<el-table-column prop="label" label="标签" />
<el-table-column type="selection" label="全选" width="55" />
</el-table>
</el-col>
<el-col :span="6">
<div style="margin-top: -30px">
<p style="font-size: 18px">已选</p>
<div class="chooseDiv">
<div v-for="(item, index) in multipleSelection" :key="index" style="padding: 10px">
<span>{{ item.title }}</span>
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-delete" />
</div>
</div>
</div>
</el-col>
</el-row>
</div>
<div v-if="visibleList[2]">
<div style="min-height: 26vh; overflow: auto">
<draggable v-model="paramsList" group="projectTypeName" animation="1000" @start="onStart" @end="onEnd1">
<transition-group>
<!-- <div v-for="item in paramsList" :key="item.id">
{{ item.projectTypeName }}
</div> -->
<div class="typeDiv" v-for="element in paramsList" :key="element.projectTypeId">
<div slot="header" class="clearfix">
<el-card>
<span>{{ element.projectTypeName }}</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="unfold(element)">子项</el-button>
</el-card>
</div>
<draggable v-show="element.dragVisible" v-model="element.list" group="title" animation="1000" @start="onStart" @end="onEnd2">
<transition-group>
<div v-for="item in element.list" :key="item.id" style="margin: 5px 15px; border-bottom: 1px solid grey">
<p>{{ item.title }}</p>
</div>
</transition-group>
</draggable>
</div>
</transition-group>
</draggable>
</div>
<div>
<el-button type="primary" @click="updateData">更新</el-button>
</div>
</div>
<div v-if="visibleList[3]">
<el-button type="primary" size="small" @click="finishData">完成</el-button>
<div>
<div v-for="(item, index) in paramsList" :key="index" class="projectDiv">
<p style="width: 100px">{{ item.projectTypeName }}</p>
<el-input type="number" style="width: 100px" v-model="item.weight" placeholder="权重"></el-input>
<div class="smallDiv">
<div v-for="(it, keyValue) in item.list" :key="keyValue" class="contentDiv">
<p style="border: 1px solid grey; width: 80px; text-align: center">{{ it.title }}</p>
<el-input type="number" style="width: 100px" v-model="it.benchmarkScore" placeholder="基准分"></el-input>
</div>
</div>
<div>
<el-input style="width: 200px; margin-right: 20px" v-model="item.calculationScoreFormula" placeholder="计算得分公式"></el-input>
<el-button @click="updateButton">更新</el-button>
</div>
</div>
</div>
</div>
<div v-if="visibleList[4]">
<el-result icon="success" title="操作成功">
<template slot="extra">
<el-button type="primary" size="medium" @click="newModel">新模板</el-button>
<el-button size="medium" @click="closeModel">关闭</el-button>
</template>
</el-result>
</div>
</div>
</div>
</div>
</template>
<script>
import draggable from 'vuedraggable'
export default {
components: { draggable },
props: {
show: Boolean
},
data() {
return {
urlOptions: {
addtURL: "/supplier/qmsEvaluationTemplate",
getEvaluationListURL: '/supplier/qmsEvaluationItemList/page',
getTypeListURL: '/supplier/qmsProjectType/page',
saveDataURL: '/supplier/qmsEvaluationTemplateProjectType/saveAll'
},
visibleList: [true, false, false, false, false],
activeStep: 0,
ruleForm: {
code: '',
name: '',
remark: ''
},
tableData: [],
typeList: [],
formInline: {
page: 1,
limit: 100,
title: undefined,
requirement: undefined,
projectTypeId: undefined
},
multipleSelection: [],
paramsList: [],
dragVisible: false,
unfoldId: '',
rules: {
code: [
{ required: true, message: '请输入code', trigger: 'blur' }
],
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
}
}
},
mounted() {
this.ruleForm = {
code: '',
name: '',
remark: ''
}
},
mounted() {
this.getTypeList()
},
methods: {
closeModel() {
this.show = false
this.$emit('info', false)
},
newModel() {
this.activeStep = 0
// this.visibleList[4] = false
// this.visibleList[0] = true
this.$set(this.visibleList, 4, false)
this.$set(this.visibleList, 0, true)
},
updateButton() {
console.log('啦啦啦', this.paramsList)
},
finishData() {
//
this.$http["post"](this.urlOptions.saveDataURL, this.paramsList)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500
})
this.activeStep = 4
// this.visibleList[3] = false
// this.visibleList[4] = true
this.$set(this.visibleList, 3, false)
this.$set(this.visibleList, 4, true)
})
},
lastStep() {
console.log('thi', this.activeStep)
this.paramsList = []
this.activeStep --
for (let i = 0; i < this.visibleList.length; i ++) {
if (i === this.activeStep) {
this.visibleList[i] = true
} else {
this.visibleList[i] = false
}
}
console.log('wokjkj11', this.visibleList)
},
updateData() {
console.log('更新')
this.$set(this.visibleList, 2, false)
this.$set(this.visibleList, 3, true)
console.log('wokjkj', this.visibleList)
},
unfold(item) {
item.dragVisible = !item.dragVisible
this.unfoldId = item.projectTypeId //id
this.paramsList.forEach(it => {
if (it.projectTypeId === this.unfoldId) {
this.$set(it, 'draggable', true)
} else {
this.$set(it, 'draggable', false)
}
})
},
onEnd1(event) {
let oldIndex = event.oldIndex //
let newIndex = event.newIndex //
let diff = Math.abs(newIndex - oldIndex) //
if (eval(oldIndex) > eval(newIndex)) {
for (let i = 0; i < diff; i ++) {
this.paramsList[oldIndex - i].sort = oldIndex - i - 1
}
this.paramsList[newIndex].sort = oldIndex
} else {
for (let i = 0; i < diff; i ++) {
this.paramsList[oldIndex + i].sort = oldIndex + i + 1
}
this.paramsList[newIndex].sort = oldIndex
}
console.log('打印一 下', event)
},
onEnd2(event) {
let oldIndex = event.oldIndex //
let newIndex = event.newIndex //
let diff = Math.abs(newIndex - oldIndex) //
let list = []
this.paramsList.forEach(item => {
if (item.projectTypeId === this.unfoldId) {
list = item.list
}
})
if (eval(oldIndex) > eval(newIndex)) {
for (let i = 0; i < diff; i ++) {
list[oldIndex - i].sort = oldIndex - i - 1
}
list[newIndex].sort = oldIndex
} else {
for (let i = 0; i < diff; i ++) {
list[oldIndex + i].sort = oldIndex + i + 1
}
list[newIndex].sort = oldIndex
}
console.log('打印一 11111下', this.paramsList)
},
onStart() {},
saveData() {
console.log('保存,到步骤三', this.multipleSelection)
if (this.multipleSelection.length === 0) {
this.$message.error('请选择项目!')
} else {
const temp = []
for (let item of this.multipleSelection) {
temp.push(item.projectTypeName)
}
const typeList = Array.from(new Set(temp))
console.log('aaaaaaa', typeList)
for (let type of typeList) {
let obj = {}
obj.projectTypeName = type
obj.dragVisible = false
obj.list = this.multipleSelection.filter(ele => {
if (ele.projectTypeName === type) {
obj.projectTypeId = ele.projectTypeId
return ele
}
})
this.paramsList.push(obj)
}
console.log('kjkj', this.paramsList)
this.activeStep = 2
// this.visibleList[1] = false
// this.visibleList[2] = true
this.$set(this.visibleList, 1, false)
this.$set(this.visibleList, 2, true)
}
},
toggleSelection(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
console.log('你好', this.multipleSelection)
},
getTypeList() {
this.paramsList = []
this.$http
.get(this.urlOptions.getTypeListURL, {
params: {
'limit': 999,
'page': 1
},
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.typeList = [];
return this.$message.error(res.msg);
}
this.typeList = res.data.list;
})
.catch(() => {
this.dataListLoading = false;
});
},
getEvaList() {
this.formInline.title = this.formInline.title=== '' ? undefined : this.formInline.title
this.formInline.requirement = this.formInline.requirement=== '' ? undefined : this.formInline.requirement
this.formInline.projectTypeId = this.formInline.projectTypeId=== '' ? undefined : this.formInline.projectTypeId
this.$http
.get(this.urlOptions.getEvaluationListURL, {
params: this.formInline
})
.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.tableData.map((item) => {
item.label = ''
if (item.list.length !== 0) {
for (it in item.list) {
item.label += it + ' '
}
}
})
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
});
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$http["post"](this.urlOptions.addtURL, this.ruleForm)
.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: () => {
console.log(1111);
this.$emit("refreshDataList");
},
})
this.activeStep ++
// this.visibleList[0] = false
// this.visibleList[1] = true
this.$set(this.visibleList, 0, false)
this.$set(this.visibleList, 1, true)
})
} else {
console.log('error submit!!')
return false;
}
});
}
}
}
</script>
<style scoped>
.addDiv {
display: flex;
justify-content: space-between;
min-height: 20vh;
}
.chooseDiv {
border: 1px solid grey;
font-size: 16px;
/* min-height: 30vh; */
min-height: 100px;
overflow-y: auto;
}
.typeDiv {
width: 40%;
border: 1px solid grey;
padding: 25px;
margin-bottom: 10px;
}
.projectDiv {
display: flex;
justify-content: space-between;
padding: 10px 40px 0 0;
}
.smallDiv {
display: flex;
flex-direction: column;
justify-content: flex-start;
/* text-align: center; */
/* width: 200px; */
}
.contentDiv {
display: flex;
flex-direction: row;
width: 200px;
justify-content: space-between;
margin-left: 20px;
text-align: center;
}
</style>

View File

@ -0,0 +1,340 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-06-19 10:25:26
* @LastEditors: DY
* @Description: 标签设定
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<!-- <div class="mod-sys__user"> -->
<el-input v-model="name" :placeholder="$t('supplier.title')" style="width:300px" @blur="throttle(handleAdd())" @keyup.enter.native="throttle(handleAdd())">
</el-input>
<!-- </div> -->
<el-card v-for="(item, index) in tableData" :key="index" class="box-card" style="width:80%; margin-top: 15px">
<div slot="header" class="clearfix">
<span>{{ item.name }}</span>
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-edit" />
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-delete" @click="deleteHandle(item.id, item.name)" />
</div>
<!-- <span v-for="(item, index) in tableData" :key="index" class="text item">
{{'列表内容'}} {{ item.name}}
</span> -->
<el-tag
:key="keyValue"
v-for="(tag, keyValue) in item.list"
closable
:disable-transitions="false"
@close="handleClose(tag)">
{{ tag.name }}
<!-- <el-input disabled v-model="tag.name"></el-input> -->
</el-tag>
<el-input
class="input-new-tag"
v-model="inputValue[index]"
:ref="'saveTagInput'+index"
size="small"
@keyup.enter.native="handleInputConfirm(index)"
@blur="handleInputConfirm(index)"
>
</el-input>
<!-- <el-button v-else class="button-new-tag" size="small" @click="showInput(index)">+ New Tag</el-button> -->
</el-card>
</el-card>
</template>
<script>
// import basicPage from "@/mixins/basic-page"
// import basicSearch from "@/mixins/basic-search"
// import supplierProductSearch from "./components/supplierProductSearch.vue"
// import evaluationTaskAdd from "./components/evaluationTask-add.vue"
// import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
// import i18n from "@/i18n";
export default {
// mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/supplier/qmsEvaluationItemListLabel/page",
deleteURL: "/supplier/qmsEvaluationItemListLabel",
exportURL: '/supplier/qmsEvaluationTask/export',
getSupplierListURL: '/supplier/qmsSupplier/page',
getTemplateListURL: '/supplier/qmsEvaluationTask/page',
submitURL: '/supplier/qmsEvaluationItemListLabel',
addLabelInfoURL: '/supplier/qmsEvaluationItemListLabelInfo'
},
name: '',
tableData: [],
listQuery: {
limit: 999,
page: 1,
total: 0,
},
dynamicTags: ['标签一', '标签二', '标签三'],
inputVisible: false,
inputValue: [],
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false
};
},
components: {
},
activated() {
this.getDataList()
},
methods: {
//search-bar
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
handleClose(tag) {
console.log('你好', tag)
this.$confirm(`确定对[名称=${tag.name}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(()=> {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
})
},
// showInput(index) {
// this.inputVisible = true;
// const ref = 'saveTagInput' + index
// console.log('nihc ', ref)
// this.$nextTick(_ => {
// this.$refs['saveTagInput' + index].$refs.input.focus();
// });
// },
deleteHandle(id, name) {
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { 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(() => { });
},
handleInputConfirm(index) {
let inputValue = this.inputValue[index];
if (inputValue) {
// this.dynamicTags.push(inputValue);
this.$http["post"](this.urlOptions.addLabelInfoURL, {
'name': inputValue
})
.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.visible = false
// this.$emit("successSubmit")
// },
})
console.log('打印出来结果', res.data)
this.tableData[index].list.push({
'id': res.data,
'name': inputValue
})
})
}
// this.inputVisible = false;
this.inputValue = [];
},
throttle(fun, delay = 10000) {
console.log('sssssssss')
let last, now
return function () {
now = Date.now()
if (last && now - last < delay) {
last = now
} else {
last = now
fun.call(this, ...arguments)
}
}
},
handleAdd() {
const data = {
name: this.name
}
this.$http["post"](this.urlOptions.submitURL, data)
.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.visible = false
this.$emit("successSubmit")
},
})
})
},
conditionSearch() {
this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// --Node.js使iconv-lite
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.supplierName = dataForm.supplierName
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// 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) {
console.log(val)
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
}
},
getDataList() {
this.dataListLoading = true;
this.$http
.get(this.urlOptions.getDataListURL, {
params: 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;
});
}
},
};
</script>
<style>
.el-tag + .el-tag {
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
height: 32px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
</style>

View File

@ -1,40 +1,40 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-06-20 15:39:01
* @LastEditors: zhp
* @LastEditTime: 2023-06-28 14:02:19
* @LastEditors: DY
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<header>评估向列表标签关联表</header>
<!-- <div class="mod-sys__user"> -->
<el-input v-model="name" :placeholder="$t('supplier.title')" style="width:300px" @blur="handleAdd"
@keyup.enter.native="handleAdd">
</el-input>
<!-- <el-input v-model="name" :placeholder="$t('supplier.title')" style="width:300px" @blur="throttle(handleAdd())" @keyup.enter.native="throttle(handleAdd())">
</el-input> -->
<!-- </div> -->
<el-card class="box-card" style="width:600px">
<!-- <el-card v-for="(item, index) in tableData" :key="index" class="box-card" style="width:80%; margin-top: 15px">
<div slot="header" class="clearfix">
<span> </span>
<span>{{ item.name }}</span>
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-edit" />
<el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-delete" />
</div>
<span v-for="o in 4" :key="o" class="text item">
{{'列表内容 ' + o }}
<span v-for="(item, index) in tableData" :key="index" class="text item">
{{'列表内容'}} {{ item.name}}
</span>
</el-card>
</el-card> -->
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import basicSearch from "@/mixins/basic-search"
// import basicPage from "@/mixins/basic-page"
// import basicSearch from "@/mixins/basic-search"
// import supplierProductSearch from "./components/supplierProductSearch.vue"
// import evaluationTaskAdd from "./components/evaluationTask-add.vue"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
// import i18n from "@/i18n";
export default {
mixins: [basicPage, basicSearch],
// mixins: [basicPage],
data() {
return {
urlOptions: {
@ -42,10 +42,16 @@ export default {
deleteURL: "/supplier/qmsEvaluationTask",
exportURL: '/supplier/qmsEvaluationTask/export',
getSupplierListURL: '/supplier/qmsSupplier/page',
getTemplateListURL: '/supplier/qmsEvaluationTask/page'
// submitURL: '/supplier/qmsSupplierType'
getTemplateListURL: '/supplier/qmsEvaluationTask/page',
submitURL: '/supplier/qmsEvaluationItemListLabel'
},
name: '',
tableData: [],
listQuery: {
limit: 10,
page: 1,
total: 1,
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
@ -111,22 +117,38 @@ export default {
color: "primary",
// plain: true,
}
],
]
};
},
components: {
},
activated() {
this.getDataList()
},
methods: {
//search-bar
// handleSearchCancel() {
// this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false;
// },
throttle(fun, delay = 10000) {
console.log('sssssssss')
let last, now
return function () {
now = Date.now()
if (last && now - last < delay) {
last = now
} else {
last = now
fun.call(this, ...arguments)
}
}
},
handleAdd() {
const data = {
name: this.name
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, data)
this.$http["post"](this.urlOptions.submitURL, data)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -241,6 +263,26 @@ export default {
default:
}
},
getDataList() {
this.dataListLoading = true;
this.$http
.get(this.urlOptions.getDataListURL, {
params: 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;
});
}
},
};
</script>

View File

@ -1,9 +1,9 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-06-20 15:38:53
* @LastEditors: zhp
* @Description:
* @LastEditTime: 2023-06-28 14:04:45
* @LastEditors: DY
* @Description: 评估计划
-->
<template>
<el-card shadow="never" class="aui-card--fill">

View File

@ -0,0 +1,201 @@
<!--
* @Author: Do not edit
* @Date: 2023-06-19 10:38:41
* @LastEditTime: 2023-06-26 16:05:18
* @LastEditors: DY
* @Description: 评估模板
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<h1>绩效评估模板</h1>
<div class="bigDiv">
<div v-for="(item, index) in dataList" :key="index" class="smallDiv">
<p style="font-size: 18px">{{ item.name }}</p>
<div style="margin-top: 30px;">
<el-row :gutter="20">
<el-col :span="20">
<span style="font-size: 18px;">综合评估表</span>
</el-col>
<el-col :span="4">
<i class="el-icon-view" @click="seeeValuationList(item.id)"></i>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="4" :offset="20">
<i class="el-icon-delete" @click="deleteEvaluation(item.id, item.name)"></i>
</el-col>
</el-row>
</div>
</div>
</div>
<div>
<el-button class="carcleButton" @click="addTemplate">+</el-button>
</div>
<div v-if="editModelVisible" style="border: 1px solid grey; padding: 10px">
<evaluation-template-add @refreshDataList="getDataList" :show="editModelVisible" @info="getInfo"></evaluation-template-add>
</div>
<el-dialog
title="预览"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
width="40%"
:before-close="handleClose">
<base-table id="palletTable" :table-props="tableProps" :page="1" :limit="listQuery.limit" :table-data="projectsList" />
</el-dialog>
</el-card>
</template>
<script>
import evaluationTemplateAdd from "./components/evaluationTemplate-add.vue"
import i18n from "@/i18n";
const tableProps = [
{
prop: "projectTypeName",
label: i18n.t("supplier.projectTypeName")
},
{
prop: "weight",
label: i18n.t("supplier.weight")
},
{
prop: "name",
label: i18n.t("supplier.projectName")
}
];
export default ({
components: { evaluationTemplateAdd },
data() {
return {
urlOptions: {
getDataListURL: "/supplier/qmsEvaluationTemplate/page",
getProjectTypeURL: '/supplier/qmsEvaluationTemplateProjectType/page',
deleteURL: '/supplier/qmsEvaluationTemplate'
},
dataList: [],
listQuery: {
limit: 999,
page: 1,
total: 0,
},
tableProps,
projectsList: [],
addTemplateVisible: false,
activeStep: 0,
editModelVisible: false,
dataListLoading: false,
dialogVisible: false
}
},
mounted() {
this.getDataList()
},
methods: {
deleteEvaluation(id, name) {
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { 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(() => { });
},
getInfo(value) {
this.editModelVisible = value
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
seeeValuationList(id) {
console.log('啊啊啊啊', id)
this.dialogVisible = true
this.$http
.get(this.urlOptions.getProjectTypeURL, {
params: {
'limit': 999,
'page': 1,
'evaluationTemplateId': id
},
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.projectsList = [];
return this.$message.error(res.msg);
}
this.projectsList = res.data.list;
})
.catch(() => {
this.dataListLoading = false;
});
},
addTemplate() {
this.editModelVisible = true
},
getDataList() {
// this.dataListLoading = true;
this.$http
.get(this.urlOptions.getDataListURL, {
params: 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.dataList = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
});
}
}
})
</script>
<style scoped>
.bigDiv {
border: 1px solid grey;
padding: 20px 5vw;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.smallDiv {
border: 1px solid grey;
padding: 0px 20px;
width: 40%;
height: 150px;
margin: 10px;
}
.carcleButton {
border-radius: 50%;
width: 50px;
height: 50px;
margin: 5px;
background-color: rgb(196, 193, 193);
}
</style>

View File

@ -0,0 +1,30 @@
<!--
* @Author: Do not edit
* @Date: 2023-06-20 11:16:51
* @LastEditTime: 2023-06-26 16:30:07
* @LastEditors: DY
* @Description: 项目清单
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="标题">
<el-input v-model="formInline.title" placeholder="标题"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,239 @@
<!--
* @Author: Do not edit
* @Date: 2023-06-20 11:16:51
* @LastEditTime: 2023-06-27 14:46:10
* @LastEditors: DY
* @Description: 要求清单
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div style="padding: 20px 30px">
<el-row :gutter="20">
<el-col :span="6">
<h2>要求分组</h2>
<div v-for="(item, index) in groupList" :key="index">
<el-button style="width: 100px; text-align: left" @click="searchByGroup(item)">{{ item.name }}</el-button>
</div>
</el-col>
<el-col :span="18">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item>
<el-input v-model="formInline.requirementName" placeholder="标题"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
<div class="bigDiv">
<div class="detailDiv" v-for="(item, index) in dataList" :key="index">
<p>{{ item.title }}</p>
<el-row :gutter="20">
<el-col :span="4" :offset="20">
<i class="el-icon-delete" @click="deleteRequire(item.id, item.title)"></i>
</el-col>
</el-row>
</div>
</div>
<div>
<el-button class="carcleButton" @click="addRequire">+</el-button>
</div>
</el-col>
</el-row>
<div v-if="addtModelVisible" style="height: 400px; width: 40%; margin: 20px auto; border: 1px solid grey; padding: 20px">
<h2>要求编辑</h2>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
<el-form-item label="标题" prop="title">
<el-input v-model="ruleForm.title"></el-input>
</el-form-item>
<el-form-item label="描述" prop="description">
<el-input type="textarea" v-model="ruleForm.description"></el-input>
</el-form-item>
<el-form-item label="所属分组" prop="requirementListGroupId">
<el-select v-model="ruleForm.requirementListGroupId" placeholder="请选择">
<el-option
v-for="item in groupList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<!-- <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> -->
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="saveRequirement"> </el-button>
</el-form-item>
</el-form>
</div>
</div>
</el-card>
</template>
<script>
export default {
data() {
return {
urlOptions: {
addtURL: "/supplier/qmsSupplierRequirementList",
getGourpListRUL: '/supplier/qmsSupplierRequirementListGroup/page',
getRequirementListURL: '/supplier/qmsSupplierRequirementList/page',
deleteURL: 'supplier/qmsSupplierRequirementList'
},
formInline: {
groupId: '',
limit: 999,
page: 1,
requirementName: ''
},
addtModelVisible: false,
dataListLoading: false,
dataList: [],
ruleForm: {
title: '',
description: '',
requirementListGroupId: ''
},
options: [],
groupList: [],
rules: {
title: [
{ required: true, message: '请输入code', trigger: 'blur' }
]
}
}
},
mounted() {
this.getGroup()
},
methods: {
deleteRequire(id, name) {
this.$confirm(`确定对[标题=${name}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.onSubmit();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
},
saveRequirement() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.$http["post"](this.urlOptions.addtURL, this.ruleForm)
.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: () => {
console.log(1111);
this.formInline.groupId = this.ruleForm.requirementListGroupId
this.addtModelVisible = false
this.onSubmit()
},
})
})
} else {
console.log('error submit!!')
return false;
}
});
},
searchByGroup(group) {
console.log('查询', group)
this.formInline.groupId = group.id
},
getGroup() {
this.$http
.get(this.urlOptions.getGourpListRUL, {
params: {
limit: 999,
page: 1
}
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.groupList = [];
return this.$message.error(res.msg);
}
this.groupList = res.data.list;
})
.catch(() => {
this.dataListLoading = false;
});
},
addRequire() {
this.addtModelVisible = true
this.ruleForm = {
title: '',
description: '',
requirementListGroupId: ''
}
},
onSubmit() {
console.log('submit!');
if (this.formInline.groupId === '') {
this.$message.error('请选择要求分组')
} else {
this.$http
.get(this.urlOptions.getRequirementListURL, {
params: this.formInline
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.dataList = [];
return this.$message.error(res.msg);
}
this.dataList = res.data.list;
})
.catch(() => {
this.dataListLoading = false;
});
}
}
}
}
</script>
<style lang="scss" scoped>
.bigDiv {
border: 1px solid grey;
padding: 20px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.detailDiv {
border: 1px solid grey;
padding: 30px;
width: 40%;
height: 120px;
margin-bottom: 10px;
}
.carcleButton {
border-radius: 50%;
width: 50px;
height: 50px;
margin: 5px;
background-color: rgb(196, 193, 193);
}
</style>

View File

@ -2,36 +2,16 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>