1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-837a30c4"],{"135d":function(t,e,n){},"42f7":function(t,e,n){"use strict";n.r(e);var r=n("9e47"),u={data:function(){return{tableData:[],dialogTitle:"",dialogVisible:!1,dialogdata:{eventType:"",detectionDate:"",status:""},rules:{},fileList:[],current:1,size:10,total:0}},created:function(){this.getData()},methods:{getStatus:function(t){return 1===t?"合格":"不合格"},getData:function(){var t=this;Object(r.T)({projectSn:this.$store.state.projectSn,size:this.size,current:this.current}).then((function(e){t.tableData=e.result.records,t.total=e.result.total}))},addForm:function(){this.dialogVisible=!0,this.dialogTitle="新增材料检测报告",this.dialogdata={eventType:"",detectionDate:"",status:""}},editData:function(t){this.dialogVisible=!0,this.dialogTitle="编辑材料检测报告",this.dialogdata=JSON.parse(JSON.stringify(t))},deleteData:function(t){var e=this;this.$confirm("此操作将永久删除, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r.u)({id:t.id}).then((function(t){e.$message({type:"success",message:"删除成功!"}),e.getData()}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))},submitForm:function(){var t=this,e=JSON.parse(JSON.stringify(this.dialogdata));e.projectSn=this.$store.state.projectSn,this.$refs.form.validate((function(n){n&&("新增材料检测报告"==t.dialogTitle?Object(r.o)(e).then((function(e){t.$message.success("新增成功"),t.dialogVisible=!1,t.getData()})):"编辑材料检测报告"==t.dialogTitle&&Object(r.rb)(e).then((function(e){t.$message.success("编辑成功"),t.dialogVisible=!1,t.getData()})))}))},handleSizeChange:function(t){this.size=t,this.getData()},handleCurrentChange:function(t){this.current=t,this.getData()}}},i=(n("62f3"),n("2877")),o=Object(i.a)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"panoramaPlan"},[n("div",{staticClass:"header-box"},[n("el-button",{attrs:{type:"primary"},on:{click:t.addForm}},[t._v(" 新增 ")])],1),n("div",{staticClass:"table-box"},[n("el-table",{staticClass:"tables",attrs:{data:t.tableData}},[n("el-table-column",{attrs:{prop:"eventType",label:"事件类型",align:"center"}}),n("el-table-column",{attrs:{prop:"detectionDate",label:"检测时间",align:"center"}}),n("el-table-column",{attrs:{prop:"status",label:"检测结果",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.getStatus(e.row.status))+" ")]}}])}),n("el-table-column",{attrs:{label:"操作",width:"220"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text",icon:"el-icon-edit-outline"},on:{click:function(n){return t.editData(e.row)}}},[t._v(" 编辑 ")]),n("el-button",{staticClass:"delete-btn",attrs:{type:"text",icon:"el-icon-delete"},on:{click:function(n){return t.deleteData(e.row)}}},[t._v(" 删除 ")])]}}])})],1),n("el-pagination",{staticClass:"pagerBox",attrs:{"current-page":t.current,"page-sizes":t.$store.state.PAGESIZRS,"page-size":t.size,layout:"total, sizes, prev, pager, next",total:Number(t.total),background:""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),n("el-dialog",{staticClass:"dialog",attrs:{title:t.dialogTitle,"modal-append-to-body":!1,visible:t.dialogVisible,width:"667px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{staticClass:"dialog-content"},[n("vue-scroll",[n("el-form",{ref:"form",staticClass:"dialogFormBox",attrs:{model:t.dialogdata,rules:t.rules,"label-width":"155px",size:"medium"}},[n("el-form-item",{attrs:{label:"事件类型",prop:"eventType"}},[n("el-input",{attrs:{placeholder:"请输入"},model:{value:t.dialogdata.eventType,callback:function(e){t.$set(t.dialogdata,"eventType",e)},expression:"dialogdata.eventType"}})],1),n("el-form-item",{attrs:{label:"检测结果",prop:"status"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:t.dialogdata.status,callback:function(e){t.$set(t.dialogdata,"status",e)},expression
|