1234567 |
- /*!
- * build: vue-admin-better
- * vue-admin-beautiful.com
- * https://gitee.com/chu1204505056/vue-admin-better
- * time: 2022-6-10 15:26:20
- */
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22fe7c72"],{"04be":function(t,e,a){"use strict";a("6c66")},1342:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"table-container"},[a("vab-query-form",[a("vab-query-form-left-panel",[a("el-form",{ref:"searchForm",attrs:{model:t.searchForm,inline:!0},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"场站名称"},model:{value:t.searchForm.name,callback:function(e){t.$set(t.searchForm,"name",e)},expression:"searchForm.name"}})],1),a("el-form-item",[a("el-input",{attrs:{placeholder:"场站编码"},model:{value:t.searchForm.stationCode,callback:function(e){t.$set(t.searchForm,"stationCode",e)},expression:"searchForm.stationCode"}})],1),a("el-form-item",[a("el-select",{attrs:{clearable:"",placeholder:"公司"},model:{value:t.searchForm.inCode,callback:function(e){t.$set(t.searchForm,"inCode","string"===typeof e?e.trim():e)},expression:"searchForm.inCode"}},t._l(t.companys,(function(t){return a("el-option",{key:t.code,attrs:{label:t.name,value:t.code}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{icon:"el-icon-search",type:"primary","native-type":"submit"},on:{click:t.handleQuery}},[t._v(" 查询 ")]),a("el-button",{attrs:{icon:"el-icon-plus",type:"primary"},on:{click:t.handleAdd}},[t._v(" 添加 ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"tableSort",attrs:{data:t.tableData,"element-loading-text":t.elementLoadingText,height:t.height,"header-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"}}},[t._v(" > "),a("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"用户名:"}},[a("span",[t._v(t._s(e.row.username))])]),a("el-form-item",{attrs:{label:"密码:"}},[a("span",[t._v(t._s(e.row.password))])]),a("el-form-item",{attrs:{label:"通讯秘钥:"}},[a("span",[t._v(t._s(e.row.comKey))])]),a("el-form-item",{attrs:{label:"秘钥过期时间:"}},[a("span",[t._v(t._s(e.row.keyTime))])])],1)]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"序号",width:"95"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.$index+1)+" ")]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"name",label:"场站名称"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"场站编码",prop:"stationCode"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"场站标识",prop:"signCode"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"场站类型",prop:"type",formatter:t.formatType}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"一体化公司",prop:"inCode",formatter:t.formatCompany}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"状态",prop:"state"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:" 推送天数",prop:"days"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"操作",width:"180px"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(e){return t.handleEdit(o)}}},[a("el-tag",{attrs:{type:"success"}},[t._v("编辑")])],1),a("el-button",{attrs:{type:"text"},on:{click:function(e){return t.handleDelete(o)}}},[a("el-tag",{attrs:{type:"danger"}},[t._v("删除")])],1)]}}])})],1),a("el-pagination",{attrs:{background:t.background,"current-page":t.page.currentPage,layout:t.layout,"page-size":t.page.pageSize,total:t.page.total},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}}),a("el-dialog",{attrs:{title:t.title,visible:t.dialogFormVisible,width:"500px"},on:{"update:visible":function(e){t.dialogFormVisible=e},close:t.close}},[a("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"场站名称",prop:"name"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"场站编码",prop:"stationCode"}},[a("el-input",{attrs:{disabled:t.isEdit,autocomplete:"off"},model:{value:t.form.stationCode,callback:function(e){t.$set(t.form,"stationCode","string"===typeof e?e.trim():e)},expression:"form.stationCode"}})],1),a("el-form-item",{attrs:{label:"场站标识",prop:"signCode"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.signCode,callback:function(e){t.$set(t.form,"signCode","string"===typeof e?e.trim():e)},expression:"form.signCode"}})],1),a("el-form-item",{attrs:{label:"场站类型",prop:"type"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type","string"===typeof e?e.trim():e)},expression:"form.type"}},t._l(t.elType,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"公司",prop:"inCode"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.form.inCode,callback:function(e){t.$set(t.form,"inCode","string"===typeof e?e.trim():e)},expression:"form.inCode"}},t._l(t.companys,(function(t){return a("el-option",{key:t.code,attrs:{label:t.name,value:t.code}})})),1)],1),a("el-form-item",{attrs:{label:"用户名",prop:"username"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.username,callback:function(e){t.$set(t.form,"username","string"===typeof e?e.trim():e)},expression:"form.username"}})],1),a("el-form-item",{attrs:{label:"密码",prop:"password"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password","string"===typeof e?e.trim():e)},expression:"form.password"}})],1),a("el-form-item",{attrs:{label:"推送天数",prop:"days"}},[a("el-input-number",{attrs:{min:1,max:15,label:"推送天数"},model:{value:t.form.days,callback:function(e){t.$set(t.form,"days","string"===typeof e?e.trim():e)},expression:"form.days"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.close}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.saveOrUpdate()}}},[t._v("确 定")])],1)],1)],1)},n=[],r=a("c7eb"),l=a("1da1"),i=(a("d9e2"),a("b0c0"),a("e9c4"),a("b30e")),s=a("d3e4"),c={name:"Station",data:function(){var t=this,e=function(e,a,o){if(!a)return o(new Error("请输入场站编码"));Object(i["getObj"])(t.form.stationCode,a).then((function(e){"edit"===t.dialogType&&o();var a=e.data;null!==a?o(new Error("场站编码已存在")):o()}))};return{isEdit:!1,dialogFormVisible:!1,dialogType:"",title:"",tableData:[],companys:[],elType:[{label:"光电",value:"E1"},{label:"风电",value:"E2"}],searchForm:{stationCode:null},form:{},imgShow:!0,list:[],imageList:[],listLoading:!0,layout:"total, sizes, prev, pager, next, jumper",total:0,background:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,currentPage:1,pageSize:20},rules:{name:[{required:!0,trigger:"blur",message:"请输入标题"}],type:[{required:!0,trigger:"blur",message:"请输入作者"}],stationCode:[{required:!0,trigger:"blur",validator:e}]}}},computed:{height:function(){return this.$baseTableHeight()}},created:function(){this.getCompany()},methods:{getCompany:function(){var t=this;Object(s["getCompanyAll"])().then((function(e){t.companys=e.data,t.fetchData(),t.listLoading=!1})).catch((function(){t.listLoading=!1}))},fetchData:function(){var t=this;return Object(l["a"])(Object(r["a"])().mark((function e(){return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.listLoading=!0,Object(i["fetchList"])(Object.assign({current:t.page.currentPage,size:t.page.pageSize},t.searchForm)).then((function(e){t.tableData=e.data.records,t.page.total=e.data.total,t.listLoading=!1})).catch((function(){t.listLoading=!1}));case 2:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.page.pageSize=t,this.page.currentPage=1,this.fetchData()},handleCurrentChange:function(t){this.page.currentPage=t,this.fetchData()},handleQuery:function(){for(var t in this.searchForm)""==this.searchForm[t]&&delete this.searchForm[t];this.page.currentPage=1,this.fetchData()},formatType:function(t,e){for(var a=0;a<this.elType.length;a++)if(t.type==this.elType[a].value)return this.elType[a].label},formatCompany:function(t,e){for(var a=0;a<this.companys.length;a++)if(t.inCode==this.companys[a].code)return this.companys[a].name},close:function(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.$emit("fetch-data")},handleAdd:function(){this.isEdit=!1,this.form={},this.title="新增",this.dialogType="add",this.dialogFormVisible=!0},handleEdit:function(t){this.isEdit=!0;var e=JSON.parse(JSON.stringify(t));this.form=e,this.title="修改",this.dialogType="edit",this.dialogFormVisible=!0},handleDelete:function(t){var e=this;this.$baseConfirm("你确定要删除当前项吗",null,Object(l["a"])(Object(r["a"])().mark((function a(){var o,n;return Object(r["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(i["delObj"])(t.id);case 2:o=a.sent,n=o.msg,e.$baseMessage(n,"success"),e.fetchData();case 6:case"end":return a.stop()}}),a)}))))},saveOrUpdate:function(){"add"==this.dialogType?this.save():this.update()},save:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;t.listLoading=!0,Object(i["addObj"])(t.form).then((function(e){t.dialogFormVisible=!1,t.fetchData(),t.listLoading=!1})).catch((function(){t.listLoading=!1}))}))},update:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;t.listLoading=!0,Object(i["putObj"])(t.form).then((function(e){t.dialogFormVisible=!1,t.fetchData(),t.listLoading=!1})).catch((function(){t.listLoading=!1}))}))}}},u=c,f=(a("04be"),a("2877")),d=Object(f["a"])(u,o,n,!1,null,null,null);e["default"]=d.exports},"6c66":function(t,e,a){},b30e:function(t,e,a){"use strict";a.r(e),a.d(e,"fetchList",(function(){return n})),a.d(e,"addObj",(function(){return r})),a.d(e,"getObj",(function(){return l})),a.d(e,"getStationAll",(function(){return i})),a.d(e,"delObj",(function(){return s})),a.d(e,"putObj",(function(){return c}));var o=a("b775");function n(t){return Object(o["default"])({url:"/station/page",method:"get",params:t})}function r(t){return Object(o["default"])({url:"/station",method:"post",data:t})}function l(t){return Object(o["default"])({url:"/station/"+t,method:"get"})}function i(){return Object(o["default"])({url:"/station/all",method:"get"})}function s(t){return Object(o["default"])({url:"/station/"+t,method:"delete"})}function c(t){return Object(o["default"])({url:"/station",method:"put",data:t})}},d3e4:function(t,e,a){"use strict";a.r(e),a.d(e,"fetchList",(function(){return n})),a.d(e,"addObj",(function(){return r})),a.d(e,"getObj",(function(){return l})),a.d(e,"getCompanyAll",(function(){return i})),a.d(e,"delObj",(function(){return s})),a.d(e,"putObj",(function(){return c}));var o=a("b775");function n(t){return Object(o["default"])({url:"/integrationCompany/page",method:"get",params:t})}function r(t){return Object(o["default"])({url:"/integrationCompany",method:"post",data:t})}function l(t){return Object(o["default"])({url:"/integrationCompany/"+t,method:"get"})}function i(){return Object(o["default"])({url:"/integrationCompany/all",method:"get"})}function s(t){return Object(o["default"])({url:"/integrationCompany/"+t,method:"delete"})}function c(t){return Object(o["default"])({url:"/integrationCompany",method:"put",data:t})}}}]);
|