admin
2025-04-14 7ae97766f9776fe320b6ebe0f149301c0fd572c5
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-43aed866"],{"34a4":function(e,a,t){},"44d0":function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"app-container"},[t("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[t("el-form-item",{attrs:{"label-width":"120",label:"总成序列号",prop:"sfcCode"}},[t("el-input",{attrs:{placeholder:"请输入总成序列号",clearable:""},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.handleQuery(a)}},model:{value:e.queryParams.sfcCode,callback:function(a){e.$set(e.queryParams,"sfcCode",a)},expression:"queryParams.sfcCode"}})],1),t("el-form-item",{attrs:{"label-width":"120",label:"采集时间",prop:"timeQuery"}},[t("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","value-format":"yyyy-MM-dd HH:mm:ss","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.queryParams.timeQuery,callback:function(a){e.$set(e.queryParams,"timeQuery",a)},expression:"queryParams.timeQuery"}})],1),t("el-form-item",{staticStyle:{float:"right"}},[t("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),t("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")]),t("el-button",{attrs:{icon:"el-icon-setting",size:"mini"},on:{click:e.toggleAdvancedSearch}},[e._v("高级查询")])],1),t("transition",{attrs:{name:"fade"}},[e.advancedSearchVisible?t("div",{staticClass:"advanced-search"},[t("el-form-item",{attrs:{label:"工位编码",prop:"locationCode"}},[t("el-input",{attrs:{placeholder:"请输入工位编码",clearable:""},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.handleQuery(a)}},model:{value:e.queryParams.locationCode,callback:function(a){e.$set(e.queryParams,"locationCode",a)},expression:"queryParams.locationCode"}})],1),t("el-form-item",{attrs:{label:"参数编码",prop:"paramCode"}},[t("el-input",{attrs:{placeholder:"请输入参数编码",clearable:""},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.handleQuery(a)}},model:{value:e.queryParams.paramCode,callback:function(a){e.$set(e.queryParams,"paramCode",a)},expression:"queryParams.paramCode"}})],1),t("el-form-item",{attrs:{label:"参数名称",prop:"paramName"}},[t("el-input",{attrs:{placeholder:"请输入参数名称",clearable:""},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.handleQuery(a)}},model:{value:e.queryParams.paramName,callback:function(a){e.$set(e.queryParams,"paramName",a)},expression:"queryParams.paramName"}})],1),t("el-row",[t("el-col",{staticStyle:{"text-align":"right"},attrs:{span:24}},[t("el-button",{attrs:{type:"primary",icon:"el-icon-close",size:"mini"},on:{click:e.toggleAdvancedSearch}},[e._v("关闭")])],1)],1)],1):e._e()])],1),t("el-row",{staticClass:"mb8",attrs:{gutter:10}},[t("el-col",{attrs:{span:1.5}},[t("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["da:paramCollection:export"],expression:"['da:paramCollection:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),t("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(a){e.showSearch=a},"update:show-search":function(a){e.showSearch=a},queryTable:e.getList}})],1),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.paramCollectionList},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t("el-table-column",{attrs:{label:"总成序列号",align:"center",prop:"sfcCode"}}),t("el-table-column",{attrs:{label:"工位编码",align:"center",prop:"locationCode"}}),t("el-table-column",{attrs:{label:"参数编码",align:"center",prop:"paramCode"}}),t("el-table-column",{attrs:{label:"参数名称",align:"center",prop:"paramName"}}),t("el-table-column",{attrs:{label:"参数值",align:"center",prop:"paramValue"}}),t("el-table-column",{attrs:{label:"采集时间",align:"center",prop:"collectTime",width:"180"}})],1),t("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(a){return e.$set(e.queryParams,"pageNum",a)},"update:limit":function(a){return e.$set(e.queryParams,"pageSize",a)},pagination:e.getList}}),t("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px","append-to-body":""},on:{"update:visible":function(a){e.open=a}}},[t("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"95px"}},[t("el-form-item",{attrs:{label:"总成序列号",prop:"sfcCode"}},[t("el-input",{attrs:{placeholder:"请输入总成序列号"},model:{value:e.form.sfcCode,callback:function(a){e.$set(e.form,"sfcCode",a)},expression:"form.sfcCode"}})],1),t("el-form-item",{attrs:{label:"工位编码",prop:"locationCode"}},[t("el-input",{attrs:{placeholder:"请输入工位编码"},model:{value:e.form.locationCode,callback:function(a){e.$set(e.form,"locationCode",a)},expression:"form.locationCode"}})],1),t("el-form-item",{attrs:{label:"参数编码",prop:"paramCode"}},[t("el-input",{attrs:{placeholder:"请输入参数编码"},model:{value:e.form.paramCode,callback:function(a){e.$set(e.form,"paramCode",a)},expression:"form.paramCode"}})],1),t("el-form-item",{attrs:{label:"参数名称",prop:"paramName"}},[t("el-input",{attrs:{placeholder:"请输入参数名称"},model:{value:e.form.paramName,callback:function(a){e.$set(e.form,"paramName",a)},expression:"form.paramName"}})],1),t("el-form-item",{attrs:{label:"参数值",prop:"paramValue"}},[t("el-input",{attrs:{placeholder:"请输入参数值"},model:{value:e.form.paramValue,callback:function(a){e.$set(e.form,"paramValue",a)},expression:"form.paramValue"}})],1)],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),t("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},l=[],o=(t("0643"),t("a573"),t("b775"));function i(e){return Object(o["a"])({url:"/da/paramCollection/list",method:"get",params:e})}function n(e){return Object(o["a"])({url:"/da/paramCollection/"+e,method:"get"})}function s(e){return Object(o["a"])({url:"/da/paramCollection",method:"post",data:e})}function m(e){return Object(o["a"])({url:"/da/paramCollection",method:"put",data:e})}function c(e){return Object(o["a"])({url:"/da/paramCollection/"+e,method:"delete"})}var u={name:"ParamCollection",data(){return{value1:"",advancedSearchVisible:!1,loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,paramCollectionList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,sfcCode:null,locationCode:null,paramCode:null,paramName:null,timeQuery:[]},form:{},rules:{sfcCode:[{required:!0,message:"总成序列号不能为空",trigger:"blur"},{pattern:/^[a-zA-Z0-9]*$/,message:"总成序列号不能包含中文字符",trigger:"blur"}],locationCode:[{required:!0,message:"工位编码不能为空",trigger:"blur"},{pattern:/^[a-zA-Z0-9]*$/,message:"总成序列号不能包含中文字符",trigger:"blur"}],paramCode:[{required:!0,message:"参数编码不能为空",trigger:"blur"},{pattern:/^[a-zA-Z0-9]*$/,message:"总成序列号不能包含中文字符",trigger:"blur"}],paramValue:[{required:!0,message:"参数值不能为空",trigger:"blur"},{pattern:/^[a-zA-Z0-9]*$/,message:"总成序列号不能包含中文字符",trigger:"blur"}]}}},created(){this.getList()},methods:{toggleAdvancedSearch(){this.advancedSearchVisible=!this.advancedSearchVisible},getList(){this.loading=!0,i(this.queryParams).then(e=>{this.paramCollectionList=e.rows,this.total=e.total,this.loading=!1})},cancel(){this.open=!1,this.reset()},reset(){this.form={id:null,sfcCode:null,locationCode:null,paramCode:null,paramName:null,paramValue:null,collectTime:null},this.resetForm("form")},handleQuery(){this.queryParams.pageNum=1,this.getList(),this.advancedSearchVisible=!1},resetQuery(){this.clearQueryParams(),this.resetForm("queryForm"),this.handleQuery()},clearQueryParams(){this.queryParams.paramName=null,this.queryParams.locationCode=null,this.queryParams.paramCode=null},handleSelectionChange(e){this.ids=e.map(e=>e.id),this.single=1!==e.length,this.multiple=!e.length},handleAdd(){this.reset(),this.open=!0,this.title="添加参数采集"},handleUpdate(e){this.reset();const a=e.id||this.ids;n(a).then(e=>{this.form=e.data,this.open=!0,this.title="修改参数采集"})},submitForm(){this.$refs["form"].validate(e=>{e&&(null!=this.form.id?m(this.form).then(e=>{this.$modal.msgSuccess("修改成功"),this.open=!1,this.getList()}):s(this.form).then(e=>{this.$modal.msgSuccess("新增成功"),this.open=!1,this.getList()}))})},handleDelete(e){const a=e.id||this.ids;this.$modal.confirm('是否确认删除参数采集编号为"'+a+'"的数据项?').then((function(){return c(a)})).then(()=>{this.getList(),this.$modal.msgSuccess("删除成功")}).catch(()=>{})},handleExport(){this.download("da/paramCollection/export",{...this.queryParams},`paramCollection_${(new Date).getTime()}.xlsx`)}}},d=u,p=(t("eb4b"),t("2877")),h=Object(p["a"])(d,r,l,!1,null,"5530c9b8",null);a["default"]=h.exports},eb4b:function(e,a,t){"use strict";t("34a4")}}]);