cuikaidong
2025-08-08 c495c1ae53473d54af136ea00da84bf51c50d521
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-baa7c02a","chunk-6a813aee"],{1511:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"table-page-search-wrapper"},[a("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchQuery(t)}}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{md:6,sm:12}},[a("a-form-item",{attrs:{label:"中文名"}},[a("j-input",{attrs:{placeholder:"请输入中文名"},model:{value:e.queryParam.chineseName,callback:function(t){e.$set(e.queryParam,"chineseName",t)},expression:"queryParam.chineseName"}})],1)],1),a("a-col",{attrs:{md:6,sm:8}},[a("a-form-item",{attrs:{label:"英文名"}},[a("j-input",{attrs:{placeholder:"请输入英文名"},model:{value:e.queryParam.englishName,callback:function(t){e.$set(e.queryParam,"englishName",t)},expression:"queryParam.englishName"}})],1)],1),a("a-col",{attrs:{md:6,sm:8}},[a("a-form-item",{attrs:{label:"驱动类型"}},[a("a-auto-complete",{attrs:{"data-source":e.driveTypeList,placeholder:"请选择控制系统类型","filter-option":e.filterOption,allowClear:!0},model:{value:e.queryParam.controlSystemType,callback:function(t){e.$set(e.queryParam,"controlSystemType",t)},expression:"queryParam.controlSystemType"}})],1)],1),a("a-col",{attrs:{md:6,sm:8}},[a("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchQuery}},[e._v("查询")]),a("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")])],1)],1)],1)],1),a("div",{staticClass:"table-operator",staticStyle:{"border-top":"5px"}},[a("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("添加参数阈值")]),e.selectedRowKeys.length>0?a("a-dropdown",[a("a-menu",{attrs:{slot:"overlay"},on:{click:e.handleMenuClick},slot:"overlay"},[a("a-menu-item",{key:"1"},[a("a-icon",{attrs:{type:"delete"},on:{click:e.batchDel}}),e._v("\n          删除\n        ")],1)],1),a("a-button",{staticStyle:{"margin-left":"8px"}},[e._v("\n        批量操作\n        "),a("a-icon",{attrs:{type:"down"}})],1)],1):e._e()],1),a("div",[a("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[a("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v("已选择 "),a("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项  \n      "),a("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),a("a-table",{ref:"table",attrs:{bordered:"",size:"middle",rowKey:"id",scroll:{x:"max-content",y:600},columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"avatarslot",fn:function(t,n,o){return[a("div",{staticClass:"anty-img-wrap"},[a("a-avatar",{attrs:{shape:"square",src:e.getAvatarView(n.avatar),icon:"user"}})],1)]}},{key:"action",fn:function(t,n){return a("span",{},[a("a",{on:{click:function(t){return e.handleEdit(n)}}},[e._v("编辑")]),a("a-divider",{attrs:{type:"vertical"}}),a("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return e.handleDelete(n.id)}}},[a("a",[e._v("删除")])])],1)}}])})],1),a("ParamThresholdModal",{ref:"modalForm",attrs:{driveTypeList:e.driveTypeList},on:{ok:e.modalFormOk}})],1)},o=[],r=a("b65a"),i=a("bfa6"),s=a("d739"),l={name:"EquipmentList",mixins:[r["a"]],components:{ParamThresholdModal:s["default"]},data:function(){return{name:"DeviceParamThresholdManagement",description:"这是设备参数阈值管理页面",queryParam:{},ipagination:{current:1,pageSize:30,pageSizeOptions:["30","50","100"],showTotal:function(e,t){return t[0]+"-"+t[1]+" 共"+e+"条"},showQuickJumper:!0,showSizeChanger:!0,total:0},columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(e,t,a){return parseInt(a)+1}},{title:"中文名",align:"center",dataIndex:"chineseName",width:350},{title:"英文名",align:"center",width:350,dataIndex:"englishName"},{title:"驱动类型",align:"center",width:350,dataIndex:"controlSystemType"},{title:"阈值上限",align:"center",width:270,dataIndex:"maxThreshold"},{title:"阈值下限",align:"center",width:270,dataIndex:"minThreshold"},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"},align:"center",fixed:"right",width:150}],driveTypeList:[],url:{list:"/mdc/mdcEquipmentThreshold/list",delete:"/mdc/mdcEquipmentThreshold/delete",deleteBatch:"/mdc/mdcEquipmentThreshold/deleteBatch"}}},created:function(){this.getDriveTypeByApi()},methods:{handleEdit:function(e){this.$refs.modalForm.edit(e),this.$refs.modalForm.title="编辑",this.$refs.modalForm.removeValidate()},handleAdd:function(){this.$refs.modalForm.add(),this.$refs.modalForm.title="新增",this.$refs.modalForm.removeValidate()},handleMenuClick:function(e){1==e.key?this.batchDel():2==e.key?this.batchFrozen(2):3==e.key&&this.batchFrozen(1)},getDriveTypeByApi:function(){var e=this;i["a"].getDriveTypeApi().then((function(t){e.driveTypeList=t.result.map((function(e){return e.value}))}))},filterOption:function(e,t){return t.componentOptions.children[0].text.toUpperCase().indexOf(e.toUpperCase())>=0}}},c=l,d=(a("f03b"),a("2877")),m=Object(d["a"])(c,n,o,!1,null,"e5ba0e82",null);t["default"]=m.exports},"1ff9":function(e,t,a){},bfa6:function(e,t,a){"use strict";var n=a("0fea");t["a"]={getDriveTypeApi:function(){return Object(n["c"])("/mdc/mdcDriveTypeParamConfig/getDriveParamOptions")},getWorkshopListInHomePageApi:function(){return Object(n["c"])("/mdc/mdcWorkshopInfo/getWorkshopList")},getDeviceListByWorkshopIdApi:function(e){return Object(n["c"])("/mdc/mdcWorkshopInfo/workshopEquipmentList",e)},getWorkshopDetailByWorkshopIdApi:function(e){return Object(n["c"])("/mdc/mdcWorkshopInfo/queryById",{id:e})},getDeviceListInWorkshopSignagePageApi:function(e){return Object(n["c"])("/mdc/mdcWorkshopInfo/getBigScreenInfo",{workshopId:e})},saveDevicePositionAndSizeApi:function(e){return Object(n["j"])("/mdc/mdcWorkshopInfo/saveEquipmentCoordinate",e)},getWorkshopListApi:function(e){return Object(n["c"])("/mdc/mdcWorkshopInfo/list",e)},addWorkshopApi:function(e){return Object(n["i"])("/mdc/mdcWorkshopInfo/add",e)},editWorkshopApi:function(e){return Object(n["j"])("/mdc/mdcWorkshopInfo/edit",e)},deleteSingleWorkshopApi:function(e){return Object(n["a"])("/mdc/mdcWorkshopInfo/delete",{id:e})},deleteBatchWorkshopApi:function(e){return Object(n["a"])("/mdc/mdcWorkshopInfo/deleteBatch",{ids:e})},addDeviceInWorkshopApi:function(e){return Object(n["i"])("/mdc/mdcWorkshopInfo/addWorkshopEquipment",e)},deleteSingleDeviceInWorkshopApi:function(e){return Object(n["a"])("/mdc/mdcWorkshopInfo/deleteWorkshopEquipment",e)},deleteBatchDeviceInWorkshopApi:function(e){return Object(n["a"])("/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch",e)},getParamListByDriveTypeApi:function(e){return Object(n["c"])("/mdc/mdcDriveTypeParamConfig/getDriveParamOptionsByType?controlSystemType=".concat(e))},addParamThresholdApi:function(e){return Object(n["i"])("/mdc/mdcEquipmentThreshold/add",e)},editParamThresholdApi:function(e){return Object(n["i"])("/mdc/mdcEquipmentThreshold/edit",e)},deleteParamThresholdApi:function(e){return Object(n["a"])("/mdc/mdcEquipmentThreshold/delete",{id:e})},deleteBatchParamThresholdApi:function(e){return Object(n["a"])("/mdc/mdcEquipmentThreshold/deleteBatch",{ids:e})}}},d739:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{title:e.title,maskClosable:!0,width:e.modalWidth,visible:e.visible},on:{cancel:function(t){e.visible=!1}}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form-model",{ref:"form",attrs:{form:e.form,model:e.model,rules:e.validatorRules,labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{prop:"controlSystemType",label:"驱动类型"}},[a("a-select",{attrs:{placeholder:"请选择驱动类型"},on:{change:e.handleDriveTypeChange},model:{value:e.model.controlSystemType,callback:function(t){e.$set(e.model,"controlSystemType",t)},expression:"model.controlSystemType"}},e._l(e.driveTypeList,(function(t,n){return a("a-select-option",{key:n,attrs:{value:t}},[e._v("\n                "+e._s(t)+"\n              ")])})),1)],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{prop:"chineseName",label:"参数"}},[a("a-select",{attrs:{placeholder:"请选择参数"},model:{value:e.model.chineseName,callback:function(t){e.$set(e.model,"chineseName",t)},expression:"model.chineseName"}},e._l(e.paramList,(function(t){return a("a-select-option",{key:t.value,attrs:{value:t.value}},[e._v("\n                "+e._s(t.label)+"\n              ")])})),1)],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{prop:"maxThreshold",label:"阈值上限"}},[a("a-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入阈值上限"},model:{value:e.model.maxThreshold,callback:function(t){e.$set(e.model,"maxThreshold",t)},expression:"model.maxThreshold"}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{prop:"minThreshold",label:"阈值下限"}},[a("a-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入阈值下限"},model:{value:e.model.minThreshold,callback:function(t){e.$set(e.model,"minThreshold",t)},expression:"model.minThreshold"}})],1)],1)],1)],1)],1),a("template",{slot:"footer"},[a("a-popconfirm",{attrs:{title:"确定放弃操作?",okText:"确定",cancelText:"取消"},on:{confirm:function(t){e.visible=!1}}},[a("a-button",{staticStyle:{"margin-right":".8rem"}},[e._v("取消")])],1),a("a-button",{attrs:{type:"primary",loading:e.confirmLoading},on:{click:e.handleSubmit}},[e._v("提交")])],1)],2)},o=[],r=a("88bc"),i=a.n(r),s=a("bfa6"),l={name:"ParamThresholdModal",components:{},props:{driveTypeList:{type:Array}},data:function(){return{modalWidth:700,form:this.$form.createForm(this),validatorRules:{controlSystemType:[{required:!0,message:"请选择驱动类型"}],chineseName:[{required:!0,message:"请选择参数"}],minThreshold:[{required:!0,message:"请输入阈值上限"},{pattern:/^[0-9]+$/,message:"请输入阿拉伯数字"}],maxThreshold:[{required:!0,message:"请输入阈值下限"},{pattern:/^[0-9]+$/,message:"请输入阿拉伯数字"}]},title:"操作",visible:!1,model:{controlSystemType:"",chineseName:"",minThreshold:"",maxThreshold:""},labelCol:{xs:{span:24},sm:{span:6}},wrapperCol:{xs:{span:24},sm:{span:15}},confirmLoading:!1,url:{userId:"/sys/user/generateUserId"},paramList:[]}},created:function(){},methods:{add:function(){var e=this;this.visible=!0,this.model={controlSystemType:this.driveTypeList[0],chineseName:"",minThreshold:"",maxThreshold:""},this.handleDriveTypeChange(this.driveTypeList[0]),this.$nextTick((function(){e.form.setFieldsValue(i()(e.model,"controlSystemType","chineseName","minThreshold","maxThreshold"))}))},edit:function(e){var t=this;this.visible=!0,this.model=Object.assign({},e),s["a"].getParamListByDriveTypeApi(e.controlSystemType).then((function(e){e.success&&(t.paramList=e.result)})),this.model.chineseName="".concat(e.englishName,"(").concat(e.chineseName,")"),this.$nextTick((function(){t.form.setFieldsValue(i()(t.model,"controlSystemType","chineseName","minThreshold","maxThreshold"))}))},handleSubmit:function(){var e=this,t=this;this.$refs.form.validate((function(a){if(!a)return!1;var n;e.model.maxThreshold>e.model.minThreshold?(t.confirmLoading=!0,n="新增"==e.title?s["a"].addParamThresholdApi(e.model):s["a"].editParamThresholdApi(e.model),n.then((function(e){e.success?(t.$notification.success({message:"消息",description:e.message}),t.$emit("ok")):t.$notification.warning({message:"消息",description:e.message})})).finally((function(){t.confirmLoading=!1,e.visible=!1}))):e.$notification.warning({message:"消息",description:"阈值上限不能小于等于阈值下限"})}))},filterOption:function(e,t){return t.componentOptions.children[0].text.toUpperCase().indexOf(e.toUpperCase())>=0},handleDriveTypeChange:function(e){var t=this;s["a"].getParamListByDriveTypeApi(e).then((function(e){e.success&&(t.paramList=e.result,t.model.chineseName=e.result.length?e.result[0].value:void 0,t.model.chineseName&&t.$refs.form.clearValidate("chineseName"))}))},removeValidate:function(){this.$refs.form&&this.$refs.form.clearValidate()}}},c=l,d=a("2877"),m=Object(d["a"])(c,n,o,!1,null,"6899af87",null);t["default"]=m.exports},f03b:function(e,t,a){"use strict";var n=a("1ff9"),o=a.n(n);o.a}}]);