浏览代码

Merge remote-tracking branch 'origin/master'

wyh 1 年之前
父节点
当前提交
ad5f052277

+ 18 - 0
src/mixins/JeecgListMixin.js

@@ -262,6 +262,24 @@ export const JeecgListMixin = {
       this.$refs.modalForm.title="详情";
       this.$refs.modalForm.disableSubmit = true;
     },
+    handleDrawerDetail:function(record){
+      this.$refs.drawerDetail.detail(record);
+    },
+    // 单元格事件
+    customCellDetail(record){
+      return {
+        style: {
+          'color': "#1890ff",
+          'cursor': "pointer",
+        },
+        on: { 
+          // 点击事件
+          click: (event) => {
+            this.$refs.drawerDetail.detail(record);
+          },
+        },
+      };
+    },
     /* 导出 */
     handleExportXls2(){
       let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));

+ 6 - 2
src/permission.js

@@ -17,8 +17,12 @@ router.beforeEach((to, from, next) => {
   //解决三级菜单无法缓存问题
   //参考: https://blog.csdn.net/qq_37322135/article/details/126013301
   //参考: https://blog.csdn.net/cwin8951/article/details/106644118
-  if (to.matched && to.matched.length>3) {
-    to.matched.splice(2, to.matched.length - 3)
+  // if (to.matched && to.matched.length>3) {
+  //   to.matched.splice(2, to.matched.length - 3)
+  // }
+  // 修改框架:点击三级菜单的不自动折叠
+  if (to.matched && to.matched.length>4) {
+    to.matched.splice(3, to.matched.length - 4)
   }
   //update-end---author:scott ---date::2022-10-13  for:[jeecg-boot/issues/4091]多级路由缓存问题 #4091--------------
   

+ 17 - 15
src/views/module_ems/cmmsRepairManage/CmmsRepairManageList.vue

@@ -126,7 +126,7 @@
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
             <a-menu slot="overlay">
               <a-menu-item>
-                <a @click="handleDetail(record)">详情</a>
+                <a @click="handleDrawerDetail(record)">详情</a>
               </a-menu-item>
               <a-menu-item>
                 <a @click="handleFreeze(record)">冻结</a>
@@ -143,9 +143,10 @@
       </a-table>
     </div>
 
+    <!-- 增改+派单 -->
     <cmms-repair-manage-modal ref="modalForm" @ok="modalFormOk"></cmms-repair-manage-modal>
-    <!-- 派单 -->
-    <cmms-repair-dispatch ref="dispatchForm"></cmms-repair-dispatch>
+    <!-- 详情 -->
+    <cmms-repair-manage-detail ref="drawerDetail"></cmms-repair-manage-detail>
   </a-card>
 </template>
 
@@ -155,14 +156,14 @@
   import { mixinDevice } from '@/utils/mixin'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import CmmsRepairManageModal from './modules/CmmsRepairManageModal'
-import CmmsRepairDispatch from './modules/CmmsRepairDispatch.vue'
+  import CmmsRepairManageDetail from './modules/CmmsRepairManageDetail.vue'
 
   export default {
     name: 'CmmsRepairManageList',
     mixins:[JeecgListMixin, mixinDevice],
     components: {
       CmmsRepairManageModal,
-      CmmsRepairDispatch
+      CmmsRepairManageDetail,
     },
     data () {
       return {
@@ -188,7 +189,8 @@ import CmmsRepairDispatch from './modules/CmmsRepairDispatch.vue'
           {
             title:'维修工单编号',
             align:"center",
-            dataIndex: 'repaircode'
+            dataIndex: 'repaircode',
+            customCell: this.customCellDetail
           },
           {
             title:'工单名称',
@@ -263,11 +265,11 @@ import CmmsRepairDispatch from './modules/CmmsRepairDispatch.vue'
             // },
             {
               title:'创建时间',
-            align:"center",
-            dataIndex: 'createTime',
-            customRender:function (text) {
-              return !text?"":(text.length>10?text.substr(0,10):text)
-            }
+              align:"center",
+              dataIndex: 'createTime',
+              customRender:function (text) {
+                return !text?"":(text.length>10?text.substr(0,10):text)
+              }
           },
           // {
           //   title:'备注',
@@ -318,10 +320,10 @@ import CmmsRepairDispatch from './modules/CmmsRepairDispatch.vue'
     },
     methods: {
       // 派单
-      handleEdit: function (record) {
-        this.$refs.dispatchForm.dispatch(record);
-        this.$refs.dispatchForm.title = "派单";
-        this.$refs.dispatchForm.disableSubmit = false;
+      handleDisptch (record) {
+        this.$refs.modalForm.title = "派单";
+        this.$refs.modalForm.modalType = "disptch";
+        this.$refs.modalForm.dispatch(record);
       },
       // 冻结
       handleFreeze(record){

+ 162 - 0
src/views/module_ems/cmmsRepairManage/modules/CmmsRepairManageDetail.vue

@@ -0,0 +1,162 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    @close="close"
+    destroyOnClose
+    :visible="visible"
+    >
+    <a-spin :spinning="confirmLoading">
+      <!-- 基础信息详情 -->
+      <a-descriptions title="" bordered size="middle">
+        <a-descriptions-item label="维修工单编号">
+          {{detailData.repaircode}}
+        </a-descriptions-item>
+        <a-descriptions-item label="工单名称">
+          {{detailData.repairname}}
+        </a-descriptions-item>
+        <a-descriptions-item label="设备编号">
+          {{detailData.equipmentcode}}
+        </a-descriptions-item>
+        <a-descriptions-item label="优先级">
+          {{detailData.priority}}
+        </a-descriptions-item>
+        <a-descriptions-item label="设备名称">
+          {{detailData.equipmentname}}
+        </a-descriptions-item>
+        <a-descriptions-item label="故障日期">
+          {{detailData.faultdate}}
+        </a-descriptions-item>
+        <a-descriptions-item label="故障描述" :span="2">
+          {{detailData.repaircode}}
+        </a-descriptions-item>
+        <a-descriptions-item label="上一次维修时间">
+          {{detailData.repaircode}}
+        </a-descriptions-item>
+        <a-descriptions-item label="维修反馈">
+          {{detailData.repaircode}}
+        </a-descriptions-item>
+        <a-descriptions-item label="处理结果">
+          {{detailData.repaircode}}
+        </a-descriptions-item>
+        <a-descriptions-item label="当前状态">
+          {{detailData.repaircode}}
+        </a-descriptions-item>
+      </a-descriptions>
+      <!-- 分割线 -->
+      <a-divider orientation="left" style="font-size: 14px;"> 操作日志 </a-divider>
+      <!-- 操作日志详情 -->
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="logData"
+        class="j-table-force-nowrap cmms-table">
+
+        <span slot="status" slot-scope="text, record">
+          <a-tag v-if="record.status === '0'" color="orange">{{ text }}</a-tag>
+          <a-tag v-if="record.status === '1' || record.priority === '2'" color="blue">{{ text }}</a-tag>
+          <a-tag v-if="record.status === '3'">{{ text }}</a-tag>
+        </span>
+
+      </a-table>
+    </a-spin>
+
+  </a-drawer>
+</template>
+
+<script>
+  import { httpAction, getAction } from '@/api/manage'
+  export default {
+    name: 'CmmsRepairManageDetail',
+    data () {
+      return {
+        title:"详情",
+        width:'60%',
+        visible: false,
+        confirmLoading: false, // 加载中
+        detailData: {}, // 详情
+        logData: [], // 操作日志表格数据
+        // 表头
+        columns: [
+          // {
+          //   title: '序号',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'节点名称',
+            align:"center",
+            dataIndex: 'nodename'
+          },
+          {
+            title:'日期',
+            align:"center",
+            dataIndex: 'handledate'
+          },
+          {
+            title:'处理意见',
+            align:"center",
+            dataIndex: 'opinion'
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
+        ],
+      }
+    },
+    methods: {
+      detail (record) {
+        this.visible = true
+        this.title = record.repairname
+        // this.title = record.repairname + ' 详情'
+        // this.detailData = record
+        this.confirmLoading = true
+        getAction('/cmmsRepair/cmmsRepair/queryById',{id:record.id}).then((res)=>{
+          if(res.success){
+            this.detailData = res.result
+            this.logData = res.result.nodeList
+          }else{
+            this.$message.warning(res.message);
+          }
+        }).finally(() => {
+          this.confirmLoading = false;
+        })
+      },
+      close () {
+        this.visible = false;
+      },
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 9 - 5
src/views/module_ems/cmmsRepairManage/modules/CmmsRepairDispatch.vue

@@ -55,7 +55,7 @@
   import { validateDuplicateValue } from '@/utils/util'
 
   export default {
-    name: 'CmmsRepairManageForm',
+    name: 'CmmsRepairDispatch',
     components: {
     },
     props: {
@@ -101,10 +101,14 @@
       this.modelDefault = JSON.parse(JSON.stringify(this.model));
     },
     methods: {
-      add () {
-        this.edit(this.modelDefault);
-      },
-      edit (record) {
+      // add () {
+      //   this.edit(this.modelDefault);
+      // },
+      // edit (record) {
+      //   this.model = Object.assign({}, record);
+      //   this.visible = true;
+      // },
+      dispatch (record) {
         this.model = Object.assign({}, record);
         this.visible = true;
       },

+ 17 - 4
src/views/module_ems/cmmsRepairManage/modules/CmmsRepairManageModal.vue

@@ -8,24 +8,27 @@
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     cancelText="关闭">
-    <cmms-repair-manage-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></cmms-repair-manage-form>
+    <cmms-repair-manage-form v-if="modalType==='form'" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></cmms-repair-manage-form>
+    <cmms-repair-manage-dispatch v-if="modalType==='dispatch'" ref="dispatchForm"></cmms-repair-manage-dispatch>
   </j-modal>
 </template>
 
 <script>
-
   import CmmsRepairManageForm from './CmmsRepairManageForm'
+  import CmmsRepairManageDispatch from './CmmsRepairManageDispatch.vue'
   export default {
     name: 'CmmsRepairManageModal',
     components: {
-      CmmsRepairManageForm
+      CmmsRepairManageForm,
+      CmmsRepairManageDispatch
     },
     data () {
       return {
         title:'',
         width:800,
         visible: false,
-        disableSubmit: false
+        disableSubmit: false,
+        modalType: 'form',
       }
     },
     methods: {
@@ -41,9 +44,18 @@
           this.$refs.realForm.edit(record);
         })
       },
+      dispatch (record) {
+        console.log(this.modalType)
+        this.modalType = 'dispatch'
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.dispatchForm.dispatch(record);
+        })
+      },
       close () {
         this.$emit('close');
         this.visible = false;
+        this.modalType = 'form';
       },
       handleOk () {
         this.$refs.realForm.submitForm();
@@ -51,6 +63,7 @@
       submitCallback(){
         this.$emit('ok');
         this.visible = false;
+        this.modalType = 'form';
       },
       handleCancel () {
         this.close()

+ 190 - 0
src/views/module_ems/cmmsSpotcheckContent/CmmsSpotcheckContentList.vue

@@ -0,0 +1,190 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('点检内容')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <cmms-spotcheck-content-modal ref="modalForm" @ok="modalFormOk"></cmms-spotcheck-content-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import CmmsSpotcheckContentModal from './modules/CmmsSpotcheckContentModal'
+  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+
+  export default {
+    name: 'CmmsSpotcheckContentList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      CmmsSpotcheckContentModal
+    },
+    data () {
+      return {
+        description: '点检内容管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'点检内容编号',
+            align:"center",
+            dataIndex: 'contentcode'
+          },
+          {
+            title:'点检内容名称',
+            align:"center",
+            dataIndex: 'contentname'
+          },
+          {
+            title:'设备id',
+            align:"center",
+            dataIndex: 'equipmentid_dictText'
+          },
+          {
+            title:'状态:启用:0、禁用:1',
+            align:"center",
+            dataIndex: 'status_dictText'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/cmmsSpotcheckContent/cmmsSpotcheckContent/list",
+          delete: "/cmmsSpotcheckContent/cmmsSpotcheckContent/delete",
+          deleteBatch: "/cmmsSpotcheckContent/cmmsSpotcheckContent/deleteBatch",
+          exportXlsUrl: "/cmmsSpotcheckContent/cmmsSpotcheckContent/exportXls",
+          importExcelUrl: "cmmsSpotcheckContent/cmmsSpotcheckContent/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'contentcode',text:'点检内容编号',dictCode:''})
+        fieldList.push({type:'string',value:'contentname',text:'点检内容名称',dictCode:''})
+        fieldList.push({type:'sel_search',value:'equipmentid',text:'设备id',dictTable:"ems_tpm_equipment_tree", dictText:'name', dictCode:'id'})
+        fieldList.push({type:'string',value:'status',text:'状态:启用:0、禁用:1',dictCode:'spotcheck_content_status'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 119 - 0
src/views/module_ems/cmmsSpotcheckContent/modules/CmmsSpotcheckContentForm.vue

@@ -0,0 +1,119 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="点检内容编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contentcode">
+              <a-input v-model="model.contentcode" placeholder="请输入点检内容编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="点检内容名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contentname">
+              <a-input v-model="model.contentname" placeholder="请输入点检内容名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="设备id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
+              <j-search-select-tag v-model="model.equipmentid" dict="ems_tpm_equipment_tree,name,id"  />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="状态:启用:0、禁用:1" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+              <j-dict-select-tag type="list" v-model="model.status" dictCode="spotcheck_content_status" placeholder="请选择状态:启用:0、禁用:1" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'CmmsSpotcheckContentForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/cmmsSpotcheckContent/cmmsSpotcheckContent/add",
+          edit: "/cmmsSpotcheckContent/cmmsSpotcheckContent/edit",
+          queryById: "/cmmsSpotcheckContent/cmmsSpotcheckContent/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 4 - 4
src/views/module_ems/cmmsRepairManage/modules/CmmsRepairManageModal.Style#Drawer.vue

@@ -7,7 +7,7 @@
     @close="close"
     destroyOnClose
     :visible="visible">
-    <cmms-repair-manage-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></cmms-repair-manage-form>
+    <cmms-spotcheck-content-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></cmms-spotcheck-content-form>
     <div class="drawer-footer">
       <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
       <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
@@ -17,12 +17,12 @@
 
 <script>
 
-  import CmmsRepairManageForm from './CmmsRepairManageForm'
+  import CmmsSpotcheckContentForm from './CmmsSpotcheckContentForm'
 
   export default {
-    name: 'CmmsRepairManageModal',
+    name: 'CmmsSpotcheckContentModal',
     components: {
-      CmmsRepairManageForm
+      CmmsSpotcheckContentForm
     },
     data () {
       return {

+ 60 - 0
src/views/module_ems/cmmsSpotcheckContent/modules/CmmsSpotcheckContentModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <cmms-spotcheck-content-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></cmms-spotcheck-content-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import CmmsSpotcheckContentForm from './CmmsSpotcheckContentForm'
+  export default {
+    name: 'CmmsSpotcheckContentModal',
+    components: {
+      CmmsSpotcheckContentForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>