浏览代码

巡检初始化

guarantee-lsq 2 年之前
父节点
当前提交
a2db0c2571

+ 128 - 0
src/api/fill/task-detail.js

@@ -0,0 +1,128 @@
+import { axios } from '@/utils/request'
+import { stringify } from 'qs'
+
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getFillGatherTaskDetailPage(parameter) {
+  return axios({
+    url: '/fill/task-details/page?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * add func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function addFillGatherTaskDetail(parameter) {
+  return axios({
+    url: '/fill/task-details',
+    method: 'POST',
+    headers: {
+      'Accept': 'application/json',
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: parameter
+  })
+}
+
+/**
+ * update func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function updateFillGatherTaskDetail(parameter) {
+  return axios({
+    url: '/fill/task-details/' + parameter.id,
+    method: 'PUT',
+    data: parameter
+  })
+}
+
+
+/**
+ * fetch single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function fetchFillGatherTaskDetail(parameter) {
+  return axios({
+    url: '/fill/task-details/' + parameter.id,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * query list func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function queryFillGatherTaskDetail(parameter) {
+  return axios({
+    url: '/fill/task-details?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * delete batch func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteFillGatherTaskDetails(parameter) {
+  return axios({
+    url: '/fill/task-details',
+    method: 'DELETE',
+    data: parameter
+  })
+}
+
+/**
+ * delete single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteFillGatherTaskDetail(parameter) {
+  return axios({
+    url: '/fill/task-details/' + parameter.id,
+    method: 'DELETE',
+    data: parameter
+  })
+}
+
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+  * @returns {*}
+ */
+export function exportFillGatherTaskDetail(parameter) {
+  return axios({
+    url: '/fill/task-details/export?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
+}

+ 129 - 0
src/api/fill/task.js

@@ -0,0 +1,129 @@
+import { axios } from '@/utils/request'
+import { stringify } from 'qs'
+
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getFillGatherTaskPage (parameter) {
+  return axios({
+    url: '/fill/tasks/page?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * add func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function addFillGatherTask (parameter) {
+  return axios({
+    url: '/fill/tasks',
+    method: 'POST',
+    headers: {
+      'Accept': 'application/json',
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: parameter
+  })
+}
+
+/**
+ * update func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function updateFillGatherTask (parameter) {
+  return axios({
+    url: '/fill/tasks/' + parameter.id,
+    method: 'PUT',
+    data: parameter
+  })
+}
+
+
+/**
+ * fetch single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function fetchFillGatherTask (parameter) {
+  return axios({
+    url: '/fill/tasks/' + parameter.id,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * query list func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function queryFillGatherTask (parameter) {
+  return axios({
+    url: '/fill/tasks?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * delete batch func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteFillGatherTasks (parameter) {
+  return axios({
+    url: '/fill/tasks',
+    method: 'DELETE',
+    data: parameter
+  })
+}
+
+/**
+ * delete single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteFillGatherTask (parameter) {
+  return axios({
+    url: '/fill/tasks/' + parameter.id,
+    method: 'DELETE',
+    data: parameter
+  })
+}
+
+
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+  * @returns {*}
+ */
+export function exportFillGatherTask (parameter) {
+  return axios({
+    url: '/fill/tasks/export?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
+}

+ 34 - 35
src/views/fill/info/FillInfo.vue

@@ -8,7 +8,7 @@
               <a-input v-model.trim="queryParam.keyword" placeholder="请输入名称/字段名称"/>
             </a-form-item>
           </a-col>
-          <a-col :md="8" :sm="24">
+<!--          <a-col :md="8" :sm="24">
             <a-form-item label="表头显示">
               <a-select
                 v-model="queryParam.useType"
@@ -21,7 +21,7 @@
                 </a-select-option>
               </a-select>
             </a-form-item>
-          </a-col>
+          </a-col>-->
           <a-col :md="8" :sm="24">
             <a-form-item label="类型">
               <a-select
@@ -36,7 +36,7 @@
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="8" :sm="24">
+<!--          <a-col :md="8" :sm="24">
             <a-form-item label="标识">
               <a-select
                 v-model="queryParam.codeValue"
@@ -63,7 +63,7 @@
                 </a-select-option>
               </a-select>
             </a-form-item>
-          </a-col>
+          </a-col>-->
           <a-col :md="8 || 24" :sm="24">
             <span class="table-page-search-submitButtons">
               <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
@@ -75,9 +75,10 @@
     </div>
 
     <div class="table-operator" style="margin-bottom: 8px;">
-      <a-button v-if="$auth('fill-infos-add')" type="primary" icon="plus" @click="$refs.baseModal.base()">新增</a-button>
-      <a-button style="margin-left: 8px" v-if="$auth('fill-infos-export')" type="primary" icon="download" @click="doExport">导出</a-button>
-      <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('fill-infos-del')">
+      <a-button v-if="$auth('fill-infos-add')" type="primary" icon="plus" @click="$refs.baseModal.base()">巡检内容项</a-button>
+      <a-button v-if="$auth('fill-infos-add')" style='margin-left: 3%;' type="primary" icon="plus" @click="previewSome()">勾选预览</a-button>
+      <a-button style="margin-left: 3%;" v-if="$auth('fill-infos-export')" type="primary" icon="download" @click="doExport">导出数据</a-button>
+<!--      <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('fill-infos-del')">
         <a-menu slot="overlay">
           <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
             <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
@@ -86,7 +87,7 @@
         <a-button style="margin-left: 8px">
           批量操作 <a-icon type="down" />
         </a-button>
-      </a-dropdown>
+      </a-dropdown>-->
     </div>
 
     <s-table
@@ -102,7 +103,7 @@
     >
       <span slot="action" slot-scope="record">
         <template>
-          <a @click="handleView(record)">查看</a>
+          <a @click="handleView(record)">预览</a>
           <operation-button
             v-if="$auth('fill-infos-edit')"
             @click="handleEdit(record)"
@@ -121,6 +122,7 @@
     </s-table>
     <base-form ref="baseModal" @ok="handleOk"/>
     <detail ref="detailModal"/>
+    <preview-form ref='previewForm' @ok='handleOk()' />
   </a-card>
 </template>
 
@@ -128,6 +130,7 @@
 import { STable, Ellipsis } from '@/components'
 import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
+import PreviewForm from './modules/PreviewForm'
 import { getFillInfoPage, deleteFillInfos, fetchFillInfo, exportFillInfo } from '@/api/fill/info'
 
 export default {
@@ -136,7 +139,8 @@ export default {
     STable,
     Ellipsis,
     BaseForm,
-    Detail
+    Detail,
+    PreviewForm
   },
   data () {
     return {
@@ -153,20 +157,13 @@ export default {
           }
         },
         {
-          title: '名称',
+          title: '巡检项名称',
           dataIndex: 'name'
         },
-        {
+        /* {
           title: '字段名称',
           dataIndex: 'fieldKey'
-        },
-        {
-          title: '表头显示',
-          dataIndex: 'useType',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Table.getMapText(this.useTypeMap, text)
-          }
-        },
+        }, */
         {
           title: '类型',
           dataIndex: 'type',
@@ -174,21 +171,10 @@ export default {
             return this.BaseTool.Table.getMapText(this.typeMap, text)
           }
         },
-        {
-          title: '性质',
-          dataIndex: 'nature',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Table.getMapText(this.natureMap, text)
-          }
-        },
         {
           title: '备注',
           dataIndex: 'remark'
         },
-        {
-          title: '排序',
-          dataIndex: 'sort'
-        },
         {
           title: '创建人名称',
           dataIndex: 'createdUserName'
@@ -297,10 +283,10 @@ export default {
       modal.base(record)
     },
     handleView (record) {
-      fetchFillInfo({ id: record.id }).then(res => {
-        const modal = this.$refs.detailModal
-        modal.base(res.data)
-      })
+      const modal = this.$refs.previewForm
+      const sourceData = []
+      sourceData.push(record)
+      modal.base(sourceData)
     },
     handleOk () {
       this.$refs.table.refresh()
@@ -322,6 +308,19 @@ export default {
         this.BaseTool.UPLOAD.downLoadExportExcel(file)
       })
     },
+    // 勾选预览
+    previewSome () {
+      const length = this.selectedRows.length
+      if (length === 0) {
+        this.$message.info('预览至少勾选一项')
+        return
+      }
+      const data = []
+      for (let i = 0; i < length; i++) {
+        data.push(this.selectedRows[i])
+      }
+      this.$refs.previewForm.base(data)
+    },
     handleEnter () {
       this.$refs.table.refresh(true)
     }

+ 110 - 18
src/views/fill/info/modules/BaseForm.vue

@@ -17,15 +17,16 @@
       <row-list :col="1">
         <row-item>
           <a-form-item
-            label="名称"
+            label="巡检内容项名称"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
+              placeholder='卫生状况'
               v-decorator="['name', {rules: [{required: true, message: '名称不能为空'}]}]"/>
           </a-form-item>
         </row-item>
-        <row-item>
+<!--        <row-item>
           <a-form-item
             label="字段名称"
             :labelCol="BaseTool.Constant.labelCol"
@@ -52,10 +53,10 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-        </row-item>
+        </row-item>-->
         <row-item>
           <a-form-item
-            label="类型"
+            label="内容项填报类型"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
@@ -72,8 +73,30 @@
             </a-select>
           </a-form-item>
         </row-item>
-
-        <row-item v-show="isDictType">
+<!--        <a-button v-show='selectFlag' type="primary" style='margin-left: 45%;margin-bottom: 22px;' icon="plus" @click="$refs.baseModal.base()">录入范围值</a-button>-->
+<!--        <row-item>
+          <a-form-item
+            label="填报示范值"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              placeholder='正常/不良/12.3等'
+              v-decorator="['defaultValue']"/>
+          </a-form-item>
+        </row-item>-->
+        <row-item>
+          <a-form-item
+            label="填报备注"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              placeholder='比如:此项必填,否则视为巡检无效'
+              v-decorator="['remark']"/>
+          </a-form-item>
+        </row-item>
+<!--        <row-item v-show="isDictType">
           <a-form-item
             label="数据词典类型"
             :labelCol="BaseTool.Constant.labelCol"
@@ -130,34 +153,41 @@
               :min="1"
               v-decorator="['sort', {rules: [{required: true, message: '排序不能为空'}]}]"/>
           </a-form-item>
-        </row-item>
+        </row-item>-->
       </row-list>
-      <row-list :col="1">
+      <row-list :col="1" v-show='selectFlag'>
         <row-item>
           <a-form-item
-            label="备注"
+            label="录入范围值"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-textarea
+              placeholder='值与值之间用-隔开,比如 正常-不良-恶劣'
               :rows="4"
-              v-decorator="['remark']"/>
+              v-decorator="['selectValue']"/>
           </a-form-item>
         </row-item>
       </row-list>
+      <a-button :loading="confirmLoading" style='margin-left:45%;' type="primary" @click="previewHandle(2)">实时预览</a-button>
     </a-form>
     <template slot="footer">
-      <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+      <a-button :loading="confirmLoading" style='margin-left:120px;' type="primary" @click="previewHandle(1)">保存</a-button>
     </template>
+    <preview-form ref='previewForm' @Ok='handleCancel()' />
   </a-modal>
 </template>
 
 <script>
 import pick from 'lodash.pick'
 import { addFillInfo, updateFillInfo } from '@/api/fill/info'
+import PreviewForm from './PreviewForm'
 
 export default {
   name: 'BaseFillInfo',
+  components: {
+    PreviewForm
+  },
   data () {
     return {
       confirmLoading: false,
@@ -165,6 +195,7 @@ export default {
       form: this.$form.createForm(this),
       isDictType: false,
       visible: false,
+      selectFlag: false,
       // 下拉框map
       useTypeMap: {},
       typeMap: {},
@@ -183,15 +214,25 @@ export default {
   methods: {
     base (record) {
       this.visible = true
+      this.selectFlag = false
       // 如果是空标识添加
       if (this.BaseTool.Object.isBlank(record)) {
-        this.modalTitle = '添加'
+        this.modalTitle = '添加巡检内容项'
         this.isDictType = false
         return
       }
-      this.modalTitle = '编辑'
+      this.modalTitle = '编辑巡检内容项'
       const { form: { setFieldsValue } } = this
       this.isDictTypeShow(record.type)
+      if (record.type === 2) {
+        this.selectFlag = true
+        const selectData = JSON.parse(record.selectValue)
+        let tempVal = ''
+        for (let i = 0; i < selectData.length; i++) {
+          tempVal = tempVal + selectData[i].value + '-'
+        }
+        record.selectValue = tempVal.substring(0, tempVal.length - 1)
+      }
       // 日期处理
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
@@ -204,10 +245,18 @@ export default {
           'dictType',
           'nature',
           'remark',
-          'sort'
+          'sort',
+          'selectValue'
         ])))
       })
     },
+    typeChange (val) {
+      if (val === 2) {
+        this.selectFlag = true
+      } else {
+        this.selectFlag = false
+      }
+    },
     save () {
       const { form: { validateFieldsAndScroll } } = this
       this.confirmLoading = true
@@ -240,9 +289,53 @@ export default {
       this.isDictType = this.DictCache.VALUE.FILL_INFO_TYPE.FILL_INFO_TYPE_XIA_LA === type ||
       this.DictCache.VALUE.FILL_INFO_TYPE.FILL_INFO_TYPE_DAN_XUAN === type
     },
-    typeChange (val) {
-      console.log(111, val)
-      this.isDictTypeShow(val)
+    previewHandle (num) {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        if (values.type === 2) {
+          if (values.selectValue === undefined || values.selectValue === '') {
+            this.$message.error('范围值不能为空')
+            this.confirmLoading = false
+            return
+          } else {
+            const dataArr = values.selectValue.split('-')
+            const data = []
+            for (let i = 0; i < dataArr.length; i++) {
+              data.push({ value: dataArr[i] })
+            }
+            values.selectValue = JSON.stringify(data)
+          }
+        }
+        if (num === 2) {
+          this.confirmLoading = false
+          const modal = this.$refs.previewForm
+          const sourceData = []
+          sourceData.push(values)
+          modal.base(sourceData)
+        } else {
+          // 日期处理
+          if (this.BaseTool.String.isBlank(values.id)) {
+            addFillInfo(values)
+              .then(() => {
+                this.handleCancel(values)
+              }).catch(() => {
+                this.confirmLoading = false
+              })
+          } else {
+            updateFillInfo(values)
+              .then(() => {
+                this.handleCancel(values)
+              }).catch(() => {
+                this.confirmLoading = false
+              })
+          }
+        }
+      })
     },
     handleCancel (values) {
       this.visible = false
@@ -252,7 +345,6 @@ export default {
         this.$emit('ok', values)
       }
     }
-
   }
 }
 </script>

+ 87 - 0
src/views/fill/info/modules/PreviewForm.vue

@@ -0,0 +1,87 @@
+<template>
+  <a-modal
+    :title="modalTitle"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @cancel="handleCancel"
+  >
+    <div style='text-align: center;'>
+      <h1>时代思康巡检记录填报</h1>
+    </div>
+    <a-form :form="form">
+      <row-list :col="1">
+        <row-item v-for="(item, index) in data" :key="index">
+          <a-form-item
+            :label="item.name"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input v-if="item.type === 1" :placeholder='item.remark' />
+            <a-select
+              v-if="item.type === 2"
+              style="width: 120px"
+            >
+              <a-select-option
+                v-for="option in item.selectValue"
+                :key="option.value"
+                :label="option.value"
+                :value="option.value">{{ option.value }}</a-select-option>
+            </a-select>
+            <a-span v-if="item.type === 2" style='padding-left: 15%;'>填报备注:{{ item.remark }}</a-span>
+          </a-form-item>
+        </row-item>
+      </row-list>
+    </a-form>
+    <template slot="footer">
+      <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  name: 'PreviewForm',
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      isDictType: false,
+      visible: false,
+      selectFlag: false,
+      // 下拉框map
+      useTypeMap: {},
+      typeMap: {},
+      codeValueMap: {},
+      natureMap: {},
+      data: []
+    }
+  },
+  props: {},
+  created () {
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.data = []
+      for (let i = 0; i < record.length; i++) {
+        if (record[i].type === 2) {
+          if (typeof record[i].selectValue !== 'object') {
+            record[i].selectValue = JSON.parse(record[i].selectValue)
+          }
+        }
+        this.data.push(record[i])
+      }
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.confirmLoading = false
+      this.form.resetFields()
+      if (this.BaseTool.Object.isNotBlank(values)) {
+        this.$emit('ok', values)
+      }
+    }
+  }
+}
+</script>

+ 276 - 0
src/views/fill/task-detail/FillGatherTaskDetail.vue

@@ -0,0 +1,276 @@
+<template>
+  <a-card :bordered='false'>
+    <div v-show='visible'>
+      <div class='table-page-search-wrapper' @keyup.enter='handleEnter'>
+        <a-form layout='inline'>
+          <a-row :gutter='48' v-show='advanced'>
+            <a-col :md='6' :sm='24'>
+              <a-form-item label='关键字'>
+                <a-input v-model='queryParam.keyword' placeholder='请输入名称/类型名称' />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter='48'>
+            <a-col :md='24 || 24' :sm='24' style='text-align: right'>
+                            <span class='table-page-search-submitButtons'>
+                              <a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
+                              <a-button style='margin-left: 8px' @click='resetSearchForm'>重置</a-button>
+                              <a @click='()=>{ this.advanced = !this.advanced}' style='margin-left: 8px'>
+                                  {{ advanced ? '收起' : '展开' }}
+                                  <a-icon :type="advanced ? 'up' : 'down'" />
+                              </a>
+                            </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <div class='table-operator' style='margin-bottom: 8px;'>
+        <a-row>
+          <a-col :md='16'>
+            <a-button v-if="$auth('fill-fills-add')" type='primary' icon='plus' @click='handleAdd()'>新增</a-button>
+            <a-button style='margin-left: 8px' v-if="$auth('fill-fills-export')" type='primary' icon='download'
+                      @click='doExport'>导出
+            </a-button>
+            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('fill-fills-del')">
+              <a-menu slot='overlay'>
+                <a-popconfirm title='是否要删除所选数据?' @confirm='batchDelete()'>
+                  <a-menu-item key='1'>
+                    <a-icon type='delete' />
+                    <a>删除</a></a-menu-item>
+                </a-popconfirm>
+              </a-menu>
+              <a-button style='margin-left: 8px'>
+                批量操作
+                <a-icon type='down' />
+              </a-button>
+            </a-dropdown>
+          </a-col>
+        </a-row>
+      </div>
+
+      <s-table
+        ref='table'
+        size='default'
+        rowKey='id'
+        :columns='columns'
+        :data='loadData'
+        :alert='options.alert'
+        :rowSelection='options.rowSelection'
+        showPagination='auto'
+      >
+                <span slot='action' slot-scope='record'>
+                  <template>
+                    <a @click='handleView(record)'>查看</a>
+                    <operation-button
+                      v-if="$auth('fill-fills-edit')" @click='handleEdit(record)'
+                    >修改</operation-button>
+                    <operation-button
+                      v-if="$auth('fill-fills-del')"
+                      :type='2'
+                      title='是否要删除该条数据?'
+                      @confirm='batchDelete(record.id)'>删除</operation-button>
+                  </template>
+                </span>
+      </s-table>
+    </div>
+    <base-form ref='baseModal' @ok='handleOk' />
+    <detail ref='detailModal' @ok='handleOk' />
+  </a-card>
+</template>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import BaseForm from './modules/BaseForm'
+import Detail from './modules/Detail'
+import {
+  getFillGatherTaskDetailPage,
+  deleteFillGatherTaskDetails,
+  fetchFillGatherTaskDetail,
+  exportFillGatherTaskDetail
+} from '@/api/fill/task-detail'
+
+export default {
+  name: 'FillGatherTaskDetailList',
+  components: {
+    STable,
+    Ellipsis,
+    BaseForm,
+    Detail
+  },
+  data() {
+    return {
+      advanced: false,
+      visible: true,
+      // 查询参数
+      queryParam: {},
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '巡检任务ID',
+          dataIndex: 'taskId'
+        },
+        {
+          title: '设备ID',
+          dataIndex: 'sbId'
+        },
+        {
+          title: '生成时间',
+          dataIndex: 'createdTime'
+        },
+        {
+          title: '任务创建人',
+          dataIndex: 'createdUserName'
+        },
+        {
+          title: '巡检填报内容集合',
+          dataIndex: 'content'
+        },
+        {
+          title: '0 未填报 1 已填报',
+          dataIndex: 'status'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 下拉框map
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getFillGatherTaskDetailPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+
+      options: {
+        alert: {
+          show: true, clear: () => {
+            this.selectedRowKeys = []
+          }
+        },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false
+    }
+  },
+  created() {
+    // 下拉框map
+    this.tableOption()
+  },
+  methods: {
+    tableOption() {
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: {
+            show: true, clear: () => {
+              this.selectedRowKeys = []
+            }
+          },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    batchDelete(id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteFillGatherTaskDetails(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    handleAdd() {
+      this.visible = false
+      const modal = this.$refs.baseModal
+      modal.base()
+    },
+    handleEdit(record) {
+      this.visible = false
+      fetchFillGatherTaskDetail({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleView(record) {
+      this.visible = false
+      fetchFillGatherTaskDetail({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleOk(values) {
+      this.visible = true
+      this.$refs.table.refresh()
+    },
+    onSelectChange(selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm() {
+      this.queryParam = {}
+      this.$refs.table.refresh(true)
+    },
+    doExport() {
+      const parameter = {
+        ...this.queryParam
+      }
+      exportFillGatherTaskDetail(parameter).then(file => {
+        this.BaseTool.Util.downLoadExportExcel(file)
+      })
+    },
+    handleEnter() {
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>

+ 146 - 0
src/views/fill/task-detail/modules/BaseForm.vue

@@ -0,0 +1,146 @@
+<template>
+    <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+        <a-row :gutter="48" slot="extra">
+            <a-col :md="48" :sm="48">
+              <span class="table-page-search-submitButtons" style="float: right">
+                <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+                <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
+              </span>
+            </a-col>
+        </a-row>
+        <a-form :form="form">
+
+            <a-form-item v-show="false">
+                <a-input v-decorator="['id']" type="hidden"/>
+                                                                                                                                                                                                                                                                                                                                                                                            </a-form-item>
+
+            <row-list :col="2">
+                                                                                                <row-item>
+
+                            <a-form-item
+                                    label="巡检任务ID"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input
+                                            v-decorator="['taskId', {rules: [{required: true, message: '巡检任务ID不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="设备ID"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input
+                                            v-decorator="['sbId', {rules: [{required: true, message: '设备ID不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                                                                                                                                                                                                                                        <row-item>
+
+                            <a-form-item
+                                    label="巡检填报内容集合"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="0 未填报 1 已填报"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input-number
+                                            style="width: 100%"
+                                            :min="0"
+                                            :formatter="BaseTool.Amount.formatter"
+                                            :parser="BaseTool.Amount.parser"
+                                            v-decorator="['status', {rules: [{required: true, message: '0 未填报 1 已填报不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                </row-list>
+        </a-form>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </a-card>
+</template>
+
+<script>
+    import pick from 'lodash.pick'
+    import {addFillGatherTaskDetail, updateFillGatherTaskDetail } from '@/api/fill/task-detail'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                        export default {
+        name: 'BaseFillGatherTaskDetail',
+        data () {
+            return {
+                confirmLoading: false,
+                modalTitle: null,
+                form: this.$form.createForm(this),
+                visible: false,
+            // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
+        },
+        props: {},
+        created () {
+            // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
+        methods: {
+            base (record) {
+                this.visible = true
+                // 如果是空标识添加
+                if (this.BaseTool.Object.isBlank(record)) {
+                    this.modalTitle = '添加'
+                    return
+                }
+                this.modalTitle = '编辑'
+                const {form: {setFieldsValue}} = this
+                // 日期处理
+                                this.$nextTick(() => {
+                    setFieldsValue(Object.assign(pick(record, [
+                                                                                    'id',
+                                                                                                                'taskId',
+                                                                                                                'sbId',
+                                                                                                                                                                                                                                                                                                                                                                                                                                        'content',
+                                                                                                                'status',
+                                                    ])))
+                })
+            },
+            save () {
+                const {form: {validateFieldsAndScroll}} = this
+                this.confirmLoading = true
+                validateFieldsAndScroll((errors, values) => {
+                    if (errors) {
+                        this.confirmLoading = false
+                        return
+                    }
+                    // 日期处理
+                                        if (this.BaseTool.String.isBlank(values.id)) {
+                        addFillGatherTaskDetail(values)
+                                .then(() => {
+                                    this.handleCancel(values)
+                                }).catch(() => {
+                            this.confirmLoading = false
+                        })
+                    } else {
+                        updateFillGatherTaskDetail(values)
+                                .then(() => {
+                                    this.handleCancel(values)
+                                }).catch(() => {
+                            this.confirmLoading = false
+                        })
+                    }
+                })
+            },
+            handleCancel (values) {
+                this.visible = false
+                this.confirmLoading = false
+                this.form.resetFields()
+                if (this.BaseTool.Object.isNotBlank(values)) {
+                    this.$emit('ok', values)
+                } else {
+                    this.$emit('ok')
+                }
+            }
+                                                                                                                                                                                                                                                                                                                                        }
+    }
+</script>

+ 69 - 0
src/views/fill/task-detail/modules/Detail.vue

@@ -0,0 +1,69 @@
+<template>
+    <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+        <a-row :gutter="48" slot="extra">
+            <a-col :md="48" :sm="48">
+              <span class="table-page-search-submitButtons" style="float: right">
+                <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
+              </span>
+            </a-col>
+        </a-row>
+        <detail-list title="" :col="2">
+                                                                                                    <detail-list-item term="巡检任务ID">{{ model.taskId }}</detail-list-item>
+                                                                                                            <detail-list-item term="设备ID">{{ model.sbId }}</detail-list-item>
+                                                                                                                                        <detail-list-item term="填报时间">{{ model.updateTime }}</detail-list-item>
+                                                                                                            <detail-list-item term="任务创建人ID">{{ model.createdUserId }}</detail-list-item>
+                                                                                                                                        <detail-list-item term="填报人ID">{{ model.updateUserId }}</detail-list-item>
+                                                                                                            <detail-list-item term="填报人">{{ model.updateUserName }}</detail-list-item>
+                                                                                                            <detail-list-item term="巡检填报内容集合">{{ model.content }}</detail-list-item>
+                                                                                                            <detail-list-item term="0 未填报 1 已填报">{{ model.status }}</detail-list-item>
+                                                        </detail-list>
+    </a-card>
+</template>
+
+<script>
+    import DetailList from '@/components/tools/DetailList'
+    const DetailListItem = DetailList.Item
+
+    export default {
+        name: 'FillGatherTaskDetailDetail',
+        components: {
+            DetailList,
+            DetailListItem
+        },
+        data () {
+            return {
+                confirmLoading: false,
+                mdl: {},
+                modalTitle: null,
+                visible: false,
+                // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            model: {
+                                                                                                                    'taskId': null,
+                                                                                                'sbId': null,
+                                                                                                                                            'updateTime': null,
+                                                                                                'createdUserId': null,
+                                                                                                                                            'updateUserId': null,
+                                                                                                'updateUserName': null,
+                                                                                                'content': null,
+                                                                                                'status': null,
+                                                            }
+            }
+        },
+        created () {
+            // 下拉框map
+            
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
+        methods: {
+            base (record) {
+                this.visible = true
+                this.modalTitle = '详情'
+                this.model = record
+            },
+            handleCancel () {
+                this.visible = false
+                this.confirmLoading = false
+                this.$emit('ok')
+            }
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
+    }
+</script>

+ 289 - 0
src/views/fill/task-detail/modules/FillGatherTaskDetailSelectModal.vue

@@ -0,0 +1,289 @@
+<template>
+    <a-modal
+            :title="modalTitle"
+            :width="1000"
+            :visible="visible"
+            :confirmLoading="confirmLoading"
+            class="ant-modal2"
+            @cancel="handleCancel"
+    >
+        <a-card :bordered="false">
+            <div class="table-page-search-wrapper">
+                <a-form layout="inline">
+                    <a-row :gutter="48">
+                        <a-col :md="6" :sm="24">
+                            <a-form-item label="关键字">
+                                <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称"/>
+                            </a-form-item>
+                        </a-col>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a-col :md="6 || 24" :sm="24">
+                            <span class="table-page-search-submitButtons">
+                                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                                <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
+                                  {{ advanced ? '收起' : '展开' }}
+                                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                                </a>
+                            </span>
+                        </a-col>
+                    </a-row>
+                </a-form>
+            </div>
+
+            <div class="table-operator">
+            </div>
+
+            <s-table
+                    ref="table"
+                    size="default"
+                    rowKey="id"
+                    :columns="columns"
+                    :data="loadData"
+                    :alert="options.alert"
+                    :customRow="options.customRow"
+                    :rowSelection="options.rowSelection"
+                    showPagination="auto"
+            >
+                <span slot="action" slot-scope="record1">
+                  <template>
+                    <a @click="handleView(record1)">查看</a>
+                  </template>
+                </span>
+            </s-table>
+            <detail ref="detailModal"/>
+        </a-card>
+        <template slot="footer">
+            <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">取消</a-button>
+            <a-button :loading="confirmLoading" type="primary" @click="handleSelect()">确定</a-button>
+        </template>
+    </a-modal>
+</template>
+
+<script>
+    import { STable, Ellipsis } from '@/components'
+    import Detail from './Detail'
+    import { getFillGatherTaskDetailPage, fetchFillGatherTaskDetail } from '@/api/fill/task-detail'
+
+    export default {
+        name: 'FillGatherTaskDetailSelectModal',
+        components: {
+            STable,
+            Ellipsis,
+            Detail
+        },
+        props: {
+            type: {
+                type: String,
+                default: 'radio'
+            },
+            selectedRowKey: {
+                type: Array,
+                default: () => {
+                    return []
+                }
+            },
+            selectedRow: {
+                type: Array,
+                default: () => {
+                    return []
+                }
+            }
+        },
+        data () {
+            return {
+                advanced: false,
+                confirmLoading: false,
+                mdl: {},
+                modalTitle: null,
+                visible: false,
+                record: null,
+                // 查询参数
+                queryParam: {
+                },
+                extraQueryParam: {
+                },
+                // 表头
+                columns: [
+                    {
+                        title: '序号',
+                        dataIndex: 'index',
+                        customRender: (text, record, index) => {
+                            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+                        }
+                    },
+                                                                                                                                                {
+                                title: '巡检任务ID',
+                                dataIndex: 'taskId'
+                            },
+                                                                                                                                                        {
+                                title: '设备ID',
+                                dataIndex: 'sbId'
+                            },
+                                                                                                                                                        {
+                                title: '生成时间',
+                                dataIndex: 'createdTime'
+                            },
+                                                                                                                                                                                                                                                {
+                                title: '任务创建人',
+                                dataIndex: 'createdUserName'
+                            },
+                                                                                                                                                                                                                                                {
+                                title: '巡检填报内容集合',
+                                dataIndex: 'content'
+                            },
+                                                                                                                                                            {
+                                    title: '0 未填报 1 已填报',
+                                    dataIndex: 'status',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                            {
+                        title: '操作',
+                        key: 'action',
+                        width: '200px',
+                        align: 'center',
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            // 加载数据方法 必须为 Promise 对象
+                loadData: parameter => {
+                    parameter = {
+                        ...parameter,
+                        ...this.queryParam,
+                        ...this.extraQueryParam,
+                        dataScope: {
+                            sortBy: 'desc',
+                            sortName: 'update_time'
+                        }
+                    }
+                    return getFillGatherTaskDetailPage(Object.assign(parameter, this.queryParam))
+                            .then(res => {
+                                return res.data
+                            })
+                },
+                selectedRowKeys: [],
+                selectedRows: [],
+
+                options: {
+                    alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+                    rowSelection: {
+                        selectedRowKeys: this.selectedRowKeys,
+                        onChange: this.onSelectChange
+                    }
+                },
+                optionAlertShow: false,
+                isCreated: false
+            }
+        },
+        created () {
+            // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
+        methods: {
+            tableOption () {
+                if (!this.optionAlertShow) {
+                    this.options = {
+                        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+                        rowSelection: {
+                            selectedRowKeys: this.selectedRowKeys,
+                            onChange: this.onSelectChange,
+                            type: this.type,
+                            getCheckboxProps: record => ({
+                                props: {
+                                    disabled: false,
+                                    name: record.id
+                                }
+                            })
+                        },
+                        customRow: (record) => {
+                            return {
+                                on: { // 事件
+                                    click: (event) => { // 点击行
+                                        // 选择对象
+                                        this.mySelect([record.id], [record])
+                                    },
+                                    dblclick: (event) => {
+                                        this.mySelect([record.id], [record])
+                                        this.handleSelect()
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    this.optionAlertShow = true
+                } else {
+                    this.options = {
+                        alert: false,
+                        rowSelection: null
+                    }
+                    this.optionAlertShow = false
+                }
+            },
+            handleView (record) {
+                fetchFillGatherTaskDetail({ id: record.id }).then(res => {
+                    const modal = this.$refs.detailModal
+                    modal.base(res.data)
+                })
+            },
+            handleOk () {
+                this.$refs.table.refresh()
+            },
+            onSelectChange (selectedRowKeys, selectedRows) {
+                this.selectedRowKeys = selectedRowKeys
+                this.selectedRows = selectedRows
+            },
+            resetSearchForm () {
+                this.queryParam = {
+                }
+                this.$refs.table.refresh(true)
+            },
+            base (record, queryParam = {}) {
+                this.visible = true
+                this.modalTitle = '选择信息'
+                this.extraQueryParam = queryParam
+                this.record = record
+                if (this.isCreated) {
+                    this.$refs.table.clearSelected()
+                    this.options.rowSelection.type = this.type
+                    this.handleOk()
+                } else {
+                    this.tableOption()
+                    this.isCreated = true
+                }
+            },
+            handleCancel () {
+                this.visible = false
+                this.confirmLoading = false
+            },
+            handleSelect () {
+                if (this.selectedRowKeys.length === 0) {
+                    this.$message.warn('请至少选择一项信息')
+                } else {
+                    this.confirmLoading = true
+                    this.$emit('selected', this.record, this.selectedRowKeys, this.selectedRows)
+                    this.confirmLoading = false
+                    this.visible = false
+                }
+            },
+            mySelect (selectedRowKeys, selectedRows) {
+                if (this.type === 'radio') {
+                    this.$refs.table.updateSelect(selectedRowKeys, selectedRows)
+                            this.$refs.table.rowSelection.onChange(selectedRowKeys, selectedRows)
+                } else {
+                    let mySelectedRowKeys
+                    let mySelectedRows = this.selectedRows.filter(item => item.id !== selectedRowKeys[0])
+                    if (this.selectedRowKeys.includes(selectedRowKeys[0])) {
+                        mySelectedRowKeys = this.selectedRowKeys.filter(item => item !== selectedRowKeys[0])
+                    } else {
+                        mySelectedRowKeys = [...selectedRowKeys, ...this.selectedRowKeys]
+                        mySelectedRows = [...mySelectedRows, ...selectedRows]
+                    }
+                    this.$refs.table.updateSelect(mySelectedRowKeys, mySelectedRows)
+                            this.$refs.table.rowSelection.onChange(mySelectedRowKeys, mySelectedRows)
+                }
+
+            }
+        }
+    }
+</script>

+ 300 - 0
src/views/fill/task/FillGatherTask.vue

@@ -0,0 +1,300 @@
+<template>
+  <a-card :bordered='false'>
+    <div v-show='visible'>
+      <div class='table-page-search-wrapper' @keyup.enter='handleEnter'>
+        <a-form layout='inline'>
+          <a-row :gutter='48' v-show='advanced'>
+            <a-col :md='6' :sm='24'>
+              <a-form-item label='关键字'>
+                <a-input v-model='queryParam.keyword' placeholder='请输入名称/类型名称' />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter='48'>
+            <a-col :md='24 || 24' :sm='24' style='text-align: right'>
+                            <span class='table-page-search-submitButtons'>
+                              <a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
+                              <a-button style='margin-left: 8px' @click='resetSearchForm'>重置</a-button>
+                              <a @click='()=>{ this.advanced = !this.advanced}' style='margin-left: 8px'>
+                                  {{ advanced ? '收起' : '展开' }}
+                                  <a-icon :type="advanced ? 'up' : 'down'" />
+                              </a>
+                            </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <div class='table-operator' style='margin-bottom: 8px;'>
+        <a-row>
+          <a-col :md='16'>
+            <a-button v-if="$auth('fill-fills-add')" type='primary' icon='plus' @click='handleAdd()'>新增</a-button>
+            <a-button style='margin-left: 8px' v-if="$auth('fill-fills-export')" type='primary' icon='download'
+                      @click='doExport'>导出
+            </a-button>
+            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('fill-fills-del')">
+              <a-menu slot='overlay'>
+                <a-popconfirm title='是否要删除所选数据?' @confirm='batchDelete()'>
+                  <a-menu-item key='1'>
+                    <a-icon type='delete' />
+                    <a>删除</a></a-menu-item>
+                </a-popconfirm>
+              </a-menu>
+              <a-button style='margin-left: 8px'>
+                批量操作
+                <a-icon type='down' />
+              </a-button>
+            </a-dropdown>
+          </a-col>
+        </a-row>
+      </div>
+
+      <s-table
+        ref='table'
+        size='default'
+        rowKey='id'
+        :columns='columns'
+        :data='loadData'
+        :alert='options.alert'
+        :rowSelection='options.rowSelection'
+        showPagination='auto'
+      >
+                <span slot='action' slot-scope='record'>
+                  <template>
+                    <a @click='handleView(record)'>查看</a>
+                    <operation-button
+                      v-if="$auth('fill-fills-edit')" @click='handleEdit(record)'
+                    >修改</operation-button>
+                    <operation-button
+                      v-if="$auth('fill-fills-del')"
+                      :type='2'
+                      title='是否要删除该条数据?'
+                      @confirm='batchDelete(record.id)'>删除</operation-button>
+                  </template>
+                </span>
+      </s-table>
+    </div>
+    <base-form ref='baseModal' @ok='handleOk' />
+    <detail ref='detailModal' @ok='handleOk' />
+  </a-card>
+</template>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import BaseForm from './modules/BaseForm'
+import Detail from './modules/Detail'
+import {
+  getFillGatherTaskPage,
+  deleteFillGatherTasks,
+  fetchFillGatherTask,
+  exportFillGatherTask
+} from '@/api/fill/task'
+
+export default {
+  name: 'FillGatherTaskList',
+  components: {
+    STable,
+    Ellipsis,
+    BaseForm,
+    Detail
+  },
+  data() {
+    return {
+      advanced: false,
+      visible: true,
+      // 查询参数
+      queryParam: {},
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '巡检人',
+          dataIndex: 'checker'
+        },
+        {
+          title: '巡检主管',
+          dataIndex: 'checkLeader'
+        },
+        {
+          title: '巡检开始时间',
+          dataIndex: 'createdTime'
+        },
+        {
+          title: '任务创建人',
+          dataIndex: 'createdUserName'
+        },
+        {
+          title: '待完成数量',
+          dataIndex: 'waitNum'
+        },
+        {
+          title: '巡检总数量',
+          dataIndex: 'totalNum'
+        },
+        {
+          title: '0 待接单 1 巡检中 2 完成  3 延迟  4 暂停',
+          dataIndex: 'status'
+        },
+        {
+          title: '要求时间',
+          dataIndex: 'requireHour'
+        },
+        {
+          title: '超时预警时间',
+          dataIndex: 'warningHour'
+        },
+        {
+          title: '累计延时时间',
+          dataIndex: 'lateHistoryHours'
+        },
+        {
+          title: '变更记录',
+          dataIndex: 'recordJson'
+        },
+        {
+          title: '任务名称',
+          dataIndex: 'name'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 下拉框map
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getFillGatherTaskPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+
+      options: {
+        alert: {
+          show: true, clear: () => {
+            this.selectedRowKeys = []
+          }
+        },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false
+    }
+  },
+  created() {
+    // 下拉框map
+    this.tableOption()
+  },
+  methods: {
+    tableOption() {
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: {
+            show: true, clear: () => {
+              this.selectedRowKeys = []
+            }
+          },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    batchDelete(id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteFillGatherTasks(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    handleAdd() {
+      this.visible = false
+      const modal = this.$refs.baseModal
+      modal.base()
+    },
+    handleEdit(record) {
+      this.visible = false
+      fetchFillGatherTask({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleView(record) {
+      this.visible = false
+      fetchFillGatherTask({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleOk(values) {
+      this.visible = true
+      this.$refs.table.refresh()
+    },
+    onSelectChange(selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm() {
+      this.queryParam = {}
+      this.$refs.table.refresh(true)
+    },
+    doExport() {
+      const parameter = {
+        ...this.queryParam
+      }
+      exportFillGatherTask(parameter).then(file => {
+        this.BaseTool.Util.downLoadExportExcel(file)
+      })
+    },
+    handleEnter() {
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>

+ 238 - 0
src/views/fill/task/modules/BaseForm.vue

@@ -0,0 +1,238 @@
+<template>
+    <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+        <a-row :gutter="48" slot="extra">
+            <a-col :md="48" :sm="48">
+              <span class="table-page-search-submitButtons" style="float: right">
+                <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+                <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
+              </span>
+            </a-col>
+        </a-row>
+        <a-form :form="form">
+
+            <a-form-item v-show="false">
+                <a-input v-decorator="['id']" type="hidden"/>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </a-form-item>
+
+            <row-list :col="2">
+                                                                                                <row-item>
+
+                            <a-form-item
+                                    label="巡检人"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input
+                                            v-decorator="['checker', {rules: [{required: true, message: '巡检人不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="巡检主管"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input
+                                            v-decorator="['checkLeader', {rules: [{required: true, message: '巡检主管不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                                                                                                                                                                                                                                        <row-item>
+
+                            <a-form-item
+                                    label="待完成数量"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input-number
+                                            style="width: 100%"
+                                            :min="0"
+                                            :formatter="BaseTool.Amount.formatter"
+                                            :parser="BaseTool.Amount.parser"
+                                            v-decorator="['waitNum', {rules: [{required: true, message: '待完成数量不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="巡检总数量"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input-number
+                                            style="width: 100%"
+                                            :min="0"
+                                            :formatter="BaseTool.Amount.formatter"
+                                            :parser="BaseTool.Amount.parser"
+                                            v-decorator="['totalNum', {rules: [{required: true, message: '巡检总数量不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="0 待接单 1 巡检中 2 完成  3 延迟  4 暂停"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input-number
+                                            style="width: 100%"
+                                            :min="0"
+                                            :formatter="BaseTool.Amount.formatter"
+                                            :parser="BaseTool.Amount.parser"
+                                            v-decorator="['status', {rules: [{required: true, message: '0 待接单 1 巡检中 2 完成  3 延迟  4 暂停不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="要求时间"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input-number
+                                            style="width: 100%"
+                                            :min="0"
+                                            :formatter="BaseTool.Amount.formatter"
+                                            :parser="BaseTool.Amount.parser"
+                                            v-decorator="['requireHour', {rules: [{required: true, message: '要求时间不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="超时预警时间"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input-number
+                                            style="width: 100%"
+                                            :min="0"
+                                            :formatter="BaseTool.Amount.formatter"
+                                            :parser="BaseTool.Amount.parser"
+                                            v-decorator="['warningHour', {rules: [{required: true, message: '超时预警时间不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="累计延时时间"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input-number
+                                            style="width: 100%"
+                                            :min="0"
+                                            :formatter="BaseTool.Amount.formatter"
+                                            :parser="BaseTool.Amount.parser"
+                                            v-decorator="['lateHistoryHours', {rules: [{required: true, message: '累计延时时间不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="变更记录"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                            </a-form-item>
+                        </row-item>
+                                                                                <row-item>
+
+                            <a-form-item
+                                    label="任务名称"
+                                    :labelCol="BaseTool.Constant.labelCol"
+                                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                            >
+                                                                    <a-input
+                                            v-decorator="['name', {rules: [{required: true, message: '任务名称不能为空'}]}]"/>
+                                                            </a-form-item>
+                        </row-item>
+                                                </row-list>
+        </a-form>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </a-card>
+</template>
+
+<script>
+    import pick from 'lodash.pick'
+    import {addFillGatherTask, updateFillGatherTask } from '@/api/fill/task'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        export default {
+        name: 'BaseFillGatherTask',
+        data () {
+            return {
+                confirmLoading: false,
+                modalTitle: null,
+                form: this.$form.createForm(this),
+                visible: false,
+            // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
+        },
+        props: {},
+        created () {
+            // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
+        methods: {
+            base (record) {
+                this.visible = true
+                // 如果是空标识添加
+                if (this.BaseTool.Object.isBlank(record)) {
+                    this.modalTitle = '添加'
+                    return
+                }
+                this.modalTitle = '编辑'
+                const {form: {setFieldsValue}} = this
+                // 日期处理
+                                this.$nextTick(() => {
+                    setFieldsValue(Object.assign(pick(record, [
+                                                                                    'id',
+                                                                                                                'checker',
+                                                                                                                'checkLeader',
+                                                                                                                                                                                                                                                                                                                                                                                                                                        'waitNum',
+                                                                                                                'totalNum',
+                                                                                                                'status',
+                                                                                                                'requireHour',
+                                                                                                                'warningHour',
+                                                                                                                'lateHistoryHours',
+                                                                                                                'recordJson',
+                                                                                                                'name',
+                                                    ])))
+                })
+            },
+            save () {
+                const {form: {validateFieldsAndScroll}} = this
+                this.confirmLoading = true
+                validateFieldsAndScroll((errors, values) => {
+                    if (errors) {
+                        this.confirmLoading = false
+                        return
+                    }
+                    // 日期处理
+                                        if (this.BaseTool.String.isBlank(values.id)) {
+                        addFillGatherTask(values)
+                                .then(() => {
+                                    this.handleCancel(values)
+                                }).catch(() => {
+                            this.confirmLoading = false
+                        })
+                    } else {
+                        updateFillGatherTask(values)
+                                .then(() => {
+                                    this.handleCancel(values)
+                                }).catch(() => {
+                            this.confirmLoading = false
+                        })
+                    }
+                })
+            },
+            handleCancel (values) {
+                this.visible = false
+                this.confirmLoading = false
+                this.form.resetFields()
+                if (this.BaseTool.Object.isNotBlank(values)) {
+                    this.$emit('ok', values)
+                } else {
+                    this.$emit('ok')
+                }
+            }
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
+    }
+</script>

+ 81 - 0
src/views/fill/task/modules/Detail.vue

@@ -0,0 +1,81 @@
+<template>
+    <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+        <a-row :gutter="48" slot="extra">
+            <a-col :md="48" :sm="48">
+              <span class="table-page-search-submitButtons" style="float: right">
+                <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
+              </span>
+            </a-col>
+        </a-row>
+        <detail-list title="" :col="2">
+                                                                                                    <detail-list-item term="巡检人">{{ model.checker }}</detail-list-item>
+                                                                                                            <detail-list-item term="巡检主管">{{ model.checkLeader }}</detail-list-item>
+                                                                                                                                        <detail-list-item term="巡检结束时间">{{ model.updateTime }}</detail-list-item>
+                                                                                                            <detail-list-item term="任务创建人ID">{{ model.createdUserId }}</detail-list-item>
+                                                                                                                                        <detail-list-item term="巡检结束人ID">{{ model.updateUserId }}</detail-list-item>
+                                                                                                            <detail-list-item term="巡检结束人">{{ model.updateUserName }}</detail-list-item>
+                                                                                                            <detail-list-item term="待完成数量">{{ model.waitNum }}</detail-list-item>
+                                                                                                            <detail-list-item term="巡检总数量">{{ model.totalNum }}</detail-list-item>
+                                                                                                            <detail-list-item term="0 待接单 1 巡检中 2 完成  3 延迟  4 暂停">{{ model.status }}</detail-list-item>
+                                                                                                            <detail-list-item term="要求时间">{{ model.requireHour }}</detail-list-item>
+                                                                                                            <detail-list-item term="超时预警时间">{{ model.warningHour }}</detail-list-item>
+                                                                                                            <detail-list-item term="累计延时时间">{{ model.lateHistoryHours }}</detail-list-item>
+                                                                                                            <detail-list-item term="变更记录">{{ model.recordJson }}</detail-list-item>
+                                                                                                            <detail-list-item term="任务名称">{{ model.name }}</detail-list-item>
+                                                        </detail-list>
+    </a-card>
+</template>
+
+<script>
+    import DetailList from '@/components/tools/DetailList'
+    const DetailListItem = DetailList.Item
+
+    export default {
+        name: 'FillGatherTaskDetail',
+        components: {
+            DetailList,
+            DetailListItem
+        },
+        data () {
+            return {
+                confirmLoading: false,
+                mdl: {},
+                modalTitle: null,
+                visible: false,
+                // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            model: {
+                                                                                                                    'checker': null,
+                                                                                                'checkLeader': null,
+                                                                                                                                            'updateTime': null,
+                                                                                                'createdUserId': null,
+                                                                                                                                            'updateUserId': null,
+                                                                                                'updateUserName': null,
+                                                                                                'waitNum': null,
+                                                                                                'totalNum': null,
+                                                                                                'status': null,
+                                                                                                'requireHour': null,
+                                                                                                'warningHour': null,
+                                                                                                'lateHistoryHours': null,
+                                                                                                'recordJson': null,
+                                                                                                'name': null,
+                                                            }
+            }
+        },
+        created () {
+            // 下拉框map
+            
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
+        methods: {
+            base (record) {
+                this.visible = true
+                this.modalTitle = '详情'
+                this.model = record
+            },
+            handleCancel () {
+                this.visible = false
+                this.confirmLoading = false
+                this.$emit('ok')
+            }
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
+    }
+</script>

+ 328 - 0
src/views/fill/task/modules/FillGatherTaskSelectModal.vue

@@ -0,0 +1,328 @@
+<template>
+    <a-modal
+            :title="modalTitle"
+            :width="1000"
+            :visible="visible"
+            :confirmLoading="confirmLoading"
+            class="ant-modal2"
+            @cancel="handleCancel"
+    >
+        <a-card :bordered="false">
+            <div class="table-page-search-wrapper">
+                <a-form layout="inline">
+                    <a-row :gutter="48">
+                        <a-col :md="6" :sm="24">
+                            <a-form-item label="关键字">
+                                <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称"/>
+                            </a-form-item>
+                        </a-col>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <a-col :md="6 || 24" :sm="24">
+                            <span class="table-page-search-submitButtons">
+                                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                                <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
+                                  {{ advanced ? '收起' : '展开' }}
+                                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                                </a>
+                            </span>
+                        </a-col>
+                    </a-row>
+                </a-form>
+            </div>
+
+            <div class="table-operator">
+            </div>
+
+            <s-table
+                    ref="table"
+                    size="default"
+                    rowKey="id"
+                    :columns="columns"
+                    :data="loadData"
+                    :alert="options.alert"
+                    :customRow="options.customRow"
+                    :rowSelection="options.rowSelection"
+                    showPagination="auto"
+            >
+                <span slot="action" slot-scope="record1">
+                  <template>
+                    <a @click="handleView(record1)">查看</a>
+                  </template>
+                </span>
+            </s-table>
+            <detail ref="detailModal"/>
+        </a-card>
+        <template slot="footer">
+            <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">取消</a-button>
+            <a-button :loading="confirmLoading" type="primary" @click="handleSelect()">确定</a-button>
+        </template>
+    </a-modal>
+</template>
+
+<script>
+    import { STable, Ellipsis } from '@/components'
+    import Detail from './Detail'
+    import { getFillGatherTaskPage, fetchFillGatherTask } from '@/api/fill/task'
+
+    export default {
+        name: 'FillGatherTaskSelectModal',
+        components: {
+            STable,
+            Ellipsis,
+            Detail
+        },
+        props: {
+            type: {
+                type: String,
+                default: 'radio'
+            },
+            selectedRowKey: {
+                type: Array,
+                default: () => {
+                    return []
+                }
+            },
+            selectedRow: {
+                type: Array,
+                default: () => {
+                    return []
+                }
+            }
+        },
+        data () {
+            return {
+                advanced: false,
+                confirmLoading: false,
+                mdl: {},
+                modalTitle: null,
+                visible: false,
+                record: null,
+                // 查询参数
+                queryParam: {
+                },
+                extraQueryParam: {
+                },
+                // 表头
+                columns: [
+                    {
+                        title: '序号',
+                        dataIndex: 'index',
+                        customRender: (text, record, index) => {
+                            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+                        }
+                    },
+                                                                                                                                                {
+                                title: '巡检人',
+                                dataIndex: 'checker'
+                            },
+                                                                                                                                                        {
+                                title: '巡检主管',
+                                dataIndex: 'checkLeader'
+                            },
+                                                                                                                                                        {
+                                title: '巡检开始时间',
+                                dataIndex: 'createdTime'
+                            },
+                                                                                                                                                                                                                                                {
+                                title: '任务创建人',
+                                dataIndex: 'createdUserName'
+                            },
+                                                                                                                                                                                                                                                    {
+                                    title: '待完成数量',
+                                    dataIndex: 'waitNum',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                                                                                            {
+                                    title: '巡检总数量',
+                                    dataIndex: 'totalNum',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                                                                                            {
+                                    title: '0 待接单 1 巡检中 2 完成  3 延迟  4 暂停',
+                                    dataIndex: 'status',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                                                                                            {
+                                    title: '要求时间',
+                                    dataIndex: 'requireHour',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                                                                                            {
+                                    title: '超时预警时间',
+                                    dataIndex: 'warningHour',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                                                                                            {
+                                    title: '累计延时时间',
+                                    dataIndex: 'lateHistoryHours',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                                                                                        {
+                                title: '变更记录',
+                                dataIndex: 'recordJson'
+                            },
+                                                                                                                                                        {
+                                title: '任务名称',
+                                dataIndex: 'name'
+                            },
+                                                                                            {
+                        title: '操作',
+                        key: 'action',
+                        width: '200px',
+                        align: 'center',
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            // 加载数据方法 必须为 Promise 对象
+                loadData: parameter => {
+                    parameter = {
+                        ...parameter,
+                        ...this.queryParam,
+                        ...this.extraQueryParam,
+                        dataScope: {
+                            sortBy: 'desc',
+                            sortName: 'update_time'
+                        }
+                    }
+                    return getFillGatherTaskPage(Object.assign(parameter, this.queryParam))
+                            .then(res => {
+                                return res.data
+                            })
+                },
+                selectedRowKeys: [],
+                selectedRows: [],
+
+                options: {
+                    alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+                    rowSelection: {
+                        selectedRowKeys: this.selectedRowKeys,
+                        onChange: this.onSelectChange
+                    }
+                },
+                optionAlertShow: false,
+                isCreated: false
+            }
+        },
+        created () {
+            // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
+        methods: {
+            tableOption () {
+                if (!this.optionAlertShow) {
+                    this.options = {
+                        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+                        rowSelection: {
+                            selectedRowKeys: this.selectedRowKeys,
+                            onChange: this.onSelectChange,
+                            type: this.type,
+                            getCheckboxProps: record => ({
+                                props: {
+                                    disabled: false,
+                                    name: record.id
+                                }
+                            })
+                        },
+                        customRow: (record) => {
+                            return {
+                                on: { // 事件
+                                    click: (event) => { // 点击行
+                                        // 选择对象
+                                        this.mySelect([record.id], [record])
+                                    },
+                                    dblclick: (event) => {
+                                        this.mySelect([record.id], [record])
+                                        this.handleSelect()
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    this.optionAlertShow = true
+                } else {
+                    this.options = {
+                        alert: false,
+                        rowSelection: null
+                    }
+                    this.optionAlertShow = false
+                }
+            },
+            handleView (record) {
+                fetchFillGatherTask({ id: record.id }).then(res => {
+                    const modal = this.$refs.detailModal
+                    modal.base(res.data)
+                })
+            },
+            handleOk () {
+                this.$refs.table.refresh()
+            },
+            onSelectChange (selectedRowKeys, selectedRows) {
+                this.selectedRowKeys = selectedRowKeys
+                this.selectedRows = selectedRows
+            },
+            resetSearchForm () {
+                this.queryParam = {
+                }
+                this.$refs.table.refresh(true)
+            },
+            base (record, queryParam = {}) {
+                this.visible = true
+                this.modalTitle = '选择信息'
+                this.extraQueryParam = queryParam
+                this.record = record
+                if (this.isCreated) {
+                    this.$refs.table.clearSelected()
+                    this.options.rowSelection.type = this.type
+                    this.handleOk()
+                } else {
+                    this.tableOption()
+                    this.isCreated = true
+                }
+            },
+            handleCancel () {
+                this.visible = false
+                this.confirmLoading = false
+            },
+            handleSelect () {
+                if (this.selectedRowKeys.length === 0) {
+                    this.$message.warn('请至少选择一项信息')
+                } else {
+                    this.confirmLoading = true
+                    this.$emit('selected', this.record, this.selectedRowKeys, this.selectedRows)
+                    this.confirmLoading = false
+                    this.visible = false
+                }
+            },
+            mySelect (selectedRowKeys, selectedRows) {
+                if (this.type === 'radio') {
+                    this.$refs.table.updateSelect(selectedRowKeys, selectedRows)
+                            this.$refs.table.rowSelection.onChange(selectedRowKeys, selectedRows)
+                } else {
+                    let mySelectedRowKeys
+                    let mySelectedRows = this.selectedRows.filter(item => item.id !== selectedRowKeys[0])
+                    if (this.selectedRowKeys.includes(selectedRowKeys[0])) {
+                        mySelectedRowKeys = this.selectedRowKeys.filter(item => item !== selectedRowKeys[0])
+                    } else {
+                        mySelectedRowKeys = [...selectedRowKeys, ...this.selectedRowKeys]
+                        mySelectedRows = [...mySelectedRows, ...selectedRows]
+                    }
+                    this.$refs.table.updateSelect(mySelectedRowKeys, mySelectedRows)
+                            this.$refs.table.rowSelection.onChange(mySelectedRowKeys, mySelectedRows)
+                }
+
+            }
+        }
+    }
+</script>