hfxc226 3 lat temu
rodzic
commit
80aabe1b74

+ 127 - 0
src/api/customize/fieldTemplate.js

@@ -0,0 +1,127 @@
+import { axios } from '@/utils/request'
+import { stringify } from 'qs'
+
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getCustomFieldTemplatePage (parameter) {
+  return axios({
+    url: '/customize/fieldTemplate/page?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * add func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function addCustomFieldTemplate (parameter) {
+  return axios({
+    url: '/customize/fieldTemplate',
+    method: 'POST',
+    headers: {
+      'Accept': 'application/json',
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: parameter
+  })
+}
+
+/**
+ * update func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function updateCustomFieldTemplate (parameter) {
+  return axios({
+    url: '/customize/fieldTemplate/' + parameter.id,
+    method: 'PUT',
+    data: parameter
+  })
+}
+
+/**
+ * fetch single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function fetchCustomFieldTemplate (parameter) {
+  return axios({
+    url: '/customize/fieldTemplate/' + parameter.id,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * query list func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function queryCustomFieldTemplate (parameter) {
+  return axios({
+    url: '/customize/fieldTemplate?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * delete batch func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteCustomFieldTemplates (parameter) {
+  return axios({
+    url: '/customize/fieldTemplate',
+    method: 'DELETE',
+    data: parameter
+  })
+}
+
+/**
+ * delete single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteCustomFieldTemplate (parameter) {
+  return axios({
+    url: '/customize/fieldTemplate/' + parameter.id,
+    method: 'DELETE',
+    data: parameter
+  })
+}
+
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+  * @returns {*}
+ */
+export function exportCustomFieldTemplate (parameter) {
+  return axios({
+    url: '/customize/fieldTemplate/export?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
+}

+ 128 - 0
src/api/customize/fieldTemplateData.js

@@ -0,0 +1,128 @@
+import { axios } from '@/utils/request'
+import { stringify } from 'qs'
+
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getCustomFieldTemplateDataPage (parameter) {
+    return axios({
+        url: '/customize/fieldTemplateData/page?' + stringify(parameter),
+        method: 'get',
+        headers: {
+            'Content-Type': 'application/json;charset=UTF-8'
+        }
+    })
+}
+
+/**
+ * add func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function addCustomFieldTemplateData (parameter) {
+    return axios({
+        url: '/customize/fieldTemplateData',
+        method: 'POST',
+        headers: {
+            'Accept': 'application/json',
+            'Content-Type': 'application/json;charset=UTF-8'
+        },
+        data: parameter
+    })
+}
+
+/**
+ * update func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function updateCustomFieldTemplateData (parameter) {
+    return axios({
+        url: '/customize/fieldTemplateData/' + parameter.id,
+        method: 'PUT',
+        data: parameter
+    })
+}
+
+/**
+ * fetch single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function fetchCustomFieldTemplateData (parameter) {
+    return axios({
+        url: '/customize/fieldTemplateData/' + parameter.id,
+        method: 'get',
+        headers: {
+            'Content-Type': 'application/json;charset=UTF-8'
+        }
+    })
+}
+
+/**
+ * query list func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function queryCustomFieldTemplateData (parameter) {
+    return axios({
+        url: '/customize/fieldTemplateData?' + stringify(parameter),
+        method: 'get',
+        headers: {
+            'Content-Type': 'application/json;charset=UTF-8'
+        }
+    })
+}
+
+/**
+ * delete batch func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteCustomFieldTemplateDatas (parameter) {
+    return axios({
+        url: '/customize/fieldTemplateData',
+        method: 'DELETE',
+        data: parameter
+    })
+}
+
+/**
+ * delete single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteCustomFieldTemplateData (parameter) {
+    return axios({
+        url: '/customize/fieldTemplateData/' + parameter.id,
+        method: 'DELETE',
+        data: parameter
+    })
+}
+
+
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+ * @returns {*}
+ */
+export function exportCustomFieldTemplateData (parameter) {
+    return axios({
+        url: '/customize/fieldTemplateData/export?' + stringify(parameter),
+        method: 'get',
+        headers: {
+            'Content-Type': 'application/json;charset=UTF-8'
+        },
+        responseType: 'blob'
+    })
+}

+ 4 - 15
src/router/generator-platform-routers.js

@@ -288,9 +288,11 @@ const constantRouterComponents = {
   'RepairReportMttr': () => import('@/views/dashboard/RepairReportMttr'), // MTTR月统计报表
   'RepairReportFee': () => import('@/views/dashboard/RepairReportFee'), // 费用按月统计
   'StoreReport1': () => import('@/views/dashboard/StoreReport1'), // 仓库报表
-
+  'RepairScreen': () => import('@/views/big-screen/RepairScreen'), // 车间大屏
   // 自定义管理
-  'CustomizeReport': () => import('@/views/customize/report/CustomizeReport') // 自定义报表
+  'CustomizeReport': () => import('@/views/customize/report/CustomizeReport'),// 自定义报表
+  'CustomFieldTemplate': () => import('@/views/customize/fieldTemplate/CustomFieldTemplate'),// 自定义模板
+  'CustomFieldTemplateData': () => import('@/views/customize/fieldTemplateData/CustomFieldTemplateData')// 自定义模板数据
 }
 
 // 前端未找到页面路由(固定不用改)
@@ -361,19 +363,6 @@ export const constantRouterMap = [
       }
     ]
   },
-
-  {
-    path: '/repairScreen',
-    component: BlankLayout,
-    redirect: '/screen/repair',
-    children: [
-      {
-        path: 'RepairScreen',
-        name: 'RepairScreen',
-        component: () => import('@/views/big-screen/RepairScreen')
-      }
-    ]
-  },
   {
     path: '/chartReport',
     component: BlankLayout,

+ 2 - 0
src/utils/dict.js

@@ -283,6 +283,8 @@ DictCache.TYPE = {
   _AUDIT_MONEY: '_AUDIT_MONEY',
   CUSTOMIZE_REPORT_ECHART_TYPE: 'CUSTOMIZE_REPORT_ECHART_TYPE',
   CUSTOMIZE_REPORT_INTER_TYPE: 'CUSTOMIZE_REPORT_INTER_TYPE',
+  CUSTOM_FIELD_TEMPLATE_TYPE: 'CUSTOM_FIELD_TEMPLATE_TYPE',
+  CUSTOM_FIELD_TEMPLATE_FILED_TYPE: 'CUSTOM_FIELD_TEMPLATE_FILED_TYPE',
   PARAMETER_TYPE: 'PARAMETER_TYPE'
 
 }

+ 280 - 0
src/views/customize/fieldTemplate/CustomFieldTemplate.vue

@@ -0,0 +1,280 @@
+<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-col :md="6" :sm="24">
+              <a-form-item label="类型">
+                <a-select
+                  v-model="queryParam.type"
+                  placeholder="请选择">
+                  <a-select-option
+                    v-for="(label,value) in typeMap"
+                    :key="value"
+                    :label="label"
+                    :value="parseInt(value)">{{ label }}
+                  </a-select-option>
+                </a-select>
+              </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('customize-fieldTemplate-add')" type="primary" icon="plus" @click="handleAdd()">新增</a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('customize-fieldTemplate-export')" type="primary" icon="download" @click="doExport">导出</a-button>
+            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('customize-fieldTemplate-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('customize-fieldTemplate-edit')"
+              @click="handleEdit(record)"
+            >修改</operation-button>
+            <operation-button
+              v-if="$auth('customize-fieldTemplate-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 { getCustomFieldTemplatePage, deleteCustomFieldTemplates, fetchCustomFieldTemplate, exportCustomFieldTemplate } from '@/api/customize/fieldTemplate'
+
+export default {
+  name: 'CustomFieldTemplateList',
+  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: 'content'
+        },
+        {
+          title: '类型',
+          dataIndex: 'type',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.typeMap, text)
+          }
+        },
+        {
+          title: '备注',
+          dataIndex: 'remark'
+        },
+        {
+          title: '创建日期',
+          dataIndex: 'createdTime'
+        },
+        {
+          title: '创建人名称',
+          dataIndex: 'createdUserName'
+        },
+        {
+          title: '二级类别',
+          dataIndex: 'secondTypeId'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 下拉框map
+      typeMap: {},
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getCustomFieldTemplatePage(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.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_TYPE)
+    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]
+      }
+      deleteCustomFieldTemplates(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
+      fetchCustomFieldTemplate({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleView (record) {
+      this.visible = false
+      fetchCustomFieldTemplate({ 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
+      }
+      exportCustomFieldTemplate(parameter).then(file => {
+        this.BaseTool.Util.downLoadExportExcel(file)
+      })
+    },
+    handleEnter () {
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>

+ 269 - 0
src/views/customize/fieldTemplate/modules/BaseForm.vue

@@ -0,0 +1,269 @@
+<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-select
+              v-decorator="['type', {rules: [{required: true, message: '类型不能为空'}]}]"
+              placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in typeMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
+        <row-item>
+
+          <a-form-item
+            label="备注"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['remark', {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="['secondTypeId', {rules: [{required: false, message: '二级类别不能为空'}]}]"/>
+          </a-form-item>
+        </row-item>
+      </row-list>
+    </a-form>
+    <title-divider title="字段明细" width="90px"></title-divider>
+    <div class="table-operator" style="margin-bottom: 8px;">
+      <a-button size="small" type="primary" @click="handleParam">
+        <a-icon type="plus"/>
+        添加
+      </a-button>
+      <a-button class="margin-left8" size="small" type="danger" @click="handleDelParam">
+        <a-icon type="delete"/>
+        删除
+      </a-button>
+    </div>
+    <a-table
+      bordered
+      :data-source="data"
+      :columns="columns"
+      tableLayout="auto"
+      rowKey="id"
+      :row-selection="rowSelection">
+      <span slot="action" slot-scope="record">
+        <template>
+          <a @click="handleParam(record)">修改</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="是否要删除该条数据?" @confirm="handleDelParam(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </template>
+      </span>
+    </a-table>
+    <param-form ref="paramForm" @ok="handleParamList" />
+  </a-card>
+</template>
+
+<script>
+import pick from 'lodash.pick'
+import ParamForm from './ParamForm'
+import { addCustomFieldTemplate, updateCustomFieldTemplate } from '@/api/customize/fieldTemplate'
+import DetailList from '@/components/tools/DetailList'
+export default {
+  name: 'BaseCustomFieldTemplate',
+  components: {
+    ParamForm,
+    DetailList
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      data: [],
+      form: this.$form.createForm(this),
+      visible: false,
+      // 下拉框map
+      typeMap: {},
+      typeFieldMap: {},
+      rowSelection: {
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.selectedRows = selectedRows
+        }
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+      options: {
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys
+        }
+      },
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return index + 1
+          }
+        },
+        {
+          title: '显示名称',
+          dataIndex: 'label'
+        },
+        {
+          title: '字段名称',
+          dataIndex: 'fieldName'
+        },
+        {
+          title: '类型',
+          dataIndex: 'type',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.typeFieldMap, text)
+          }
+        },
+        {
+          title: '是否必填',
+          dataIndex: 'required'
+        },
+        {
+          title: '显示行数',
+          dataIndex: 'rows',
+          width: 120
+        },
+        {
+          title: '排序',
+          dataIndex: 'sort',
+          width: 150
+        },
+        {
+          title: '默认值',
+          dataIndex: 'defaultValue',
+          width: 150
+        },
+        {
+          title: '最小长度',
+          dataIndex: 'minLength',
+          width: 150
+        },
+        {
+          title: '最大长度',
+          dataIndex: 'maxLength',
+          width: 150
+        },
+        {
+          title: '操作',
+          key: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ]
+    }
+  },
+  props: {},
+  created () {
+    // 下拉框map
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_TYPE)
+    this.typeFieldMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_FILED_TYPE)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      // 如果是空标识添加
+      if (this.BaseTool.Object.isBlank(record)) {
+        this.modalTitle = '添加'
+        return
+      }
+      this.modalTitle = '编辑'
+      const { form: { setFieldsValue } } = this
+      this.data = JSON.parse(record.content)
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign(pick(record, [
+          'id',
+          'content',
+          'type',
+          'remark',
+          'secondTypeId'
+        ])))
+      })
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        values.content = JSON.stringify(this.data)
+        // 日期处理
+        if (this.BaseTool.String.isBlank(values.id)) {
+          addCustomFieldTemplate(values)
+            .then(() => {
+              this.handleCancel(values)
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+        } else {
+          updateCustomFieldTemplate(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')
+      }
+    },
+    handleParam (record) {
+      const modal = this.$refs.paramForm
+      modal.base(record)
+    },
+    handleParamList (values) {
+      console.log(values)
+      if (this.data == null) {
+        this.data = []
+      }
+      this.data.push(values)
+    },
+    handleDelParam (index) {
+      console.log(index)
+      this.data.splice(index, 1)
+    }
+  }
+}
+</script>

+ 300 - 0
src/views/customize/fieldTemplate/modules/CustomFieldTemplateSelectModal.vue

@@ -0,0 +1,300 @@
+<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-select
+              v-model="queryParam.type"
+              placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in typeMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+            <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 { getCustomFieldTemplatePage, fetchCustomFieldTemplate } from '@/api/customize/fieldTemplate'
+
+export default {
+  name: 'CustomFieldTemplateSelectModal',
+  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: 'content'
+        },
+        {
+          title: '类型',
+          dataIndex: 'type',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.typeMap, text)
+          }
+        },
+        {
+          title: '备注',
+          dataIndex: 'remark'
+        },
+        {
+          title: '创建日期',
+          dataIndex: 'createdTime'
+        },
+        {
+          title: '创建人名称',
+          dataIndex: 'createdUserName'
+        },
+        {
+          title: '二级类别',
+          dataIndex: 'secondTypeId'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 下拉框map
+      typeMap: {},
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          ...this.extraQueryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getCustomFieldTemplatePage(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
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_TYPE)
+  },
+  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) {
+      fetchCustomFieldTemplate({ 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>

+ 80 - 0
src/views/customize/fieldTemplate/modules/Detail.vue

@@ -0,0 +1,80 @@
+<template>
+  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+    <detail-list title="" :col="2">
+      <detail-list-item term="模板内容">{{ model.content }}</detail-list-item>
+      <detail-list-item term="类型">{{ BaseTool.Object.getField(this.typeMap,model.type) }}</detail-list-item>
+      <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
+      <detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>
+      <detail-list-item term="创建人">{{ model.createdUserId }}</detail-list-item>
+      <detail-list-item term="更新人">{{ model.updateUserId }}</detail-list-item>
+      <detail-list-item term="更新人名称">{{ model.updateUserName }}</detail-list-item>
+      <detail-list-item term="二级类别">{{ model.secondTypeId }}</detail-list-item>
+    </detail-list>
+    <title-divider title="字段明细" width="90px"></title-divider>
+    <a-table
+      bordered
+      :data-source="data"
+      :columns="columns"
+      tableLayout="auto"
+      rowKey="fieldName">
+      <span slot="action" slot-scope="record">
+        <template>
+          <a @click="handleParam(record)">修改</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="是否要删除该条数据?" @confirm="handleDelParam(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </template>
+      </span>
+    </a-table>
+  </a-card>
+</template>
+
+<script>
+import DetailList from '@/components/tools/DetailList'
+const DetailListItem = DetailList.Item
+
+export default {
+  name: 'CustomFieldTemplateDetail',
+  components: {
+    DetailList,
+    DetailListItem
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      // 下拉框map
+      typeMap: {},
+      model: {
+        'content': null,
+        'type': null,
+        'remark': null,
+        'updateTime': null,
+        'createdUserId': null,
+        'updateUserId': null,
+        'updateUserName': null,
+        'secondTypeId': null
+      }
+    }
+  },
+  created () {
+    // 下拉框map
+
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_TYPE)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.modalTitle = '详情'
+      this.model = record
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+    }
+  }
+}
+</script>

+ 114 - 0
src/views/customize/fieldTemplate/modules/OptionForm.vue

@@ -0,0 +1,114 @@
+<template>
+  <a-modal
+    :title="modalTitle"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @cancel="handleCancel"
+  >
+    <a-form :form="form">
+      <row-list :col="2">
+        <row-item>
+          <a-form-item
+            label="参数名称"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['name']"/>
+          </a-form-item>
+        </row-item>
+      </row-list>
+      <row-list :col="1">
+        <row-item>
+          <a-form-item
+            label="参数值"
+            :labelCol="BaseTool.Constant.labelCol2"
+            :wrapperCol="BaseTool.Constant.wrapperCol2"
+          >
+            <a-input
+              v-decorator="['value']"/>
+          </a-form-item>
+        </row-item>
+      </row-list>
+    </a-form>
+    <template slot="footer">
+      <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script>
+import { queryUserDept } from '@/api/upms/user-dept'
+import { queryUser } from '@/api/upms/user'
+
+export default {
+  name: 'DispatchBaseForm',
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      visible: false,
+      // 下拉框map
+      sourceMap: {},
+      levelMap: {},
+      statusMap: {},
+      record: {},
+      userList: [],
+      deptUserList: []
+    }
+  },
+  props: {
+  },
+  created () {
+    // 下拉框map
+    this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
+    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS)
+    this.getUsers()
+    this.getDeptUsers()
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      // 如果是空标识添加
+      this.modalTitle = '派工'
+      this.record = record
+    },
+    getDeptUsers () {
+      queryUserDept({ deptCode: this.DictCache.VALUE.SYS_DEPT_CODE.XIAN_CHANG_WEI_XIU_ZU, userStatus: 1 }).then(res => {
+        queryUserDept({ deptCode: this.DictCache.VALUE.SYS_DEPT_CODE.CHANG_NEI_WEI_XIU_ZU, userStatus: 1 }).then(res2 => {
+          this.deptUserList = res.data.concat(res2.data)
+        })
+      })
+    },
+    getUsers () {
+      queryUser({ status: 1 }).then(res => {
+        this.userList = res.data
+      })
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        this.handleCancel(values)
+      })
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.confirmLoading = false
+      this.form.resetFields()
+      console.log(values)
+      if (this.BaseTool.Object.isNotBlank(values)) {
+        console.log(values)
+        this.$emit('ok', values)
+      }
+    }
+  }
+}
+</script>

+ 272 - 0
src/views/customize/fieldTemplate/modules/ParamForm.vue

@@ -0,0 +1,272 @@
+<template>
+  <a-modal
+    :title="modalTitle"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @cancel="handleCancel"
+  >
+    <a-form :form="form">
+      <row-list :col="2">
+        <row-item>
+          <a-form-item
+            label="显示名称"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['label']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="字段名称"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['fieldName']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="类型"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select
+              v-decorator="['type', {rules: [{required: true, message: '类型不能为空'}]}]"
+              placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in typeMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="是否必填"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select
+              v-decorator="['required', {rules: [{required: true, message: '类型不能为空'}]}]"
+              placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in yesNoMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="显示行数"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['rows']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="排序"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['sort']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="最小长度"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['minLength']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="最大长度"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['maxLength']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="默认值"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['defaultValue']"/>
+          </a-form-item>
+        </row-item>
+      </row-list>
+    </a-form>
+    <title-divider title="下拉选择项明细" width="90px"></title-divider>
+    <div class="table-operator" style="margin-bottom: 8px;">
+      <a-button size="small" type="primary" @click="handleOption">
+        <a-icon type="plus"/>
+        添加
+      </a-button>
+      <a-button class="margin-left8" size="small" type="danger" @click="handleDelOption">
+        <a-icon type="delete"/>
+        删除
+      </a-button>
+    </div>
+    <a-table
+      bordered
+      :data-source="data"
+      :columns="columns"
+      tableLayout="auto"
+      rowKey="id"
+      :row-selection="rowSelection">
+      <span slot="action" slot-scope="record">
+        <template>
+          <a @click="handleOption(record)">修改</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="是否要删除该条数据?" @confirm="handleDelOption(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </template>
+      </span>
+    </a-table>
+    <template slot="footer">
+      <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+    </template>
+    <option-form ref="optionForm" @ok="handleOptionList" />
+  </a-modal>
+</template>
+
+<script>
+import OptionForm from './OptionForm'
+import DetailList from '@/components/tools/DetailList'
+export default {
+  name: 'FieldTemplateOptionForm',
+  components: {
+    OptionForm,
+    DetailList
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      visible: false,
+      data: [],
+      // 下拉框map
+      yesNoMap: {},
+      record: {},
+      typeMap: {},
+      rowSelection: {
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.selectedRows = selectedRows
+        }
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+      options: {
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys
+        }
+      },
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return index + 1
+          }
+        },
+        {
+          title: '参数名称',
+          dataIndex: 'name'
+        },
+        {
+          title: '参数值',
+          dataIndex: 'value'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ]
+    }
+  },
+  props: {
+  },
+  created () {
+    // 下拉框map
+    this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_FILED_TYPE)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      // 如果是空标识添加
+      this.modalTitle = '字段设置'
+      this.record = record
+      this.data = record.optionList
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        values.optionList = this.optionList
+        this.handleCancel(values)
+      })
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.confirmLoading = false
+      this.form.resetFields()
+      console.log(values)
+      if (this.BaseTool.Object.isNotBlank(values)) {
+        console.log(values)
+        this.$emit('ok', values)
+      }
+    },
+    handleOption (record) {
+      if (record == null) {
+        const modal = this.$refs.optionForm
+        modal.base()
+      } else {
+        const modal = this.$refs.optionForm
+        modal.base(record)
+      }
+    },
+    handleOptionList (values) {
+      console.log(values)
+      if (this.optionList == null) {
+        this.optionList = []
+      }
+      this.optionList.push(values)
+    },
+    handleDelOption (index) {
+      console.log(index)
+      this.optionList.splice(index, 1)
+    }
+  }
+}
+</script>

+ 280 - 0
src/views/customize/fieldTemplateData/CustomFieldTemplateData.vue

@@ -0,0 +1,280 @@
+<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-col :md="6" :sm="24">
+              <a-form-item label="类型">
+                <a-select
+                  v-model="queryParam.type"
+                  placeholder="请选择">
+                  <a-select-option
+                    v-for="(label,value) in typeMap"
+                    :key="value"
+                    :label="label"
+                    :value="parseInt(value)">{{ label }}
+                  </a-select-option>
+                </a-select>
+              </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('customize-fieldTemplateData-add')" type="primary" icon="plus" @click="handleAdd()">新增</a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('customize-fieldTemplateData-export')" type="primary" icon="download" @click="doExport">导出</a-button>
+            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('customize-fieldTemplateData-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('customize-fieldTemplateData-edit')"
+              @click="handleEdit(record)"
+            >修改</operation-button>
+            <operation-button
+              v-if="$auth('customize-fieldTemplateData-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 { getCustomFieldTemplateDataPage, deleteCustomFieldTemplateDatas, fetchCustomFieldTemplateData, exportCustomFieldTemplateData } from '@/api/customize/fieldTemplateData'
+
+export default {
+  name: 'CustomFieldTemplateDataList',
+  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: 'type',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.typeMap, text)
+          }
+        },
+        {
+          title: '所属对象id',
+          dataIndex: 'objId'
+        },
+        {
+          title: '模板数据',
+          dataIndex: 'data'
+        },
+        {
+          title: '备注',
+          dataIndex: 'remark'
+        },
+        {
+          title: '创建日期',
+          dataIndex: 'createdTime'
+        },
+        {
+          title: '创建人名称',
+          dataIndex: 'createdUserName'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 下拉框map
+      typeMap: {},
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getCustomFieldTemplateDataPage(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.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_DATA_TYPE)
+    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]
+      }
+      deleteCustomFieldTemplateDatas(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
+      fetchCustomFieldTemplateData({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleView (record) {
+      this.visible = false
+      fetchCustomFieldTemplateData({ 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
+      }
+      exportCustomFieldTemplateData(parameter).then(file => {
+        this.BaseTool.Util.downLoadExportExcel(file)
+      })
+    },
+    handleEnter () {
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>

+ 154 - 0
src/views/customize/fieldTemplateData/modules/BaseForm.vue

@@ -0,0 +1,154 @@
+<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-select
+              v-decorator="['type', {rules: [{required: true, message: '类型不能为空'}]}]"
+              placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in typeMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </row-item>
+        <row-item>
+
+          <a-form-item
+            label="所属对象id"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['objId', {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-input
+              v-decorator="['data', {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="['remark', {rules: [{required: true, message: '备注不能为空'}]}]"/>
+          </a-form-item>
+        </row-item>
+      </row-list>
+    </a-form>
+  </a-card>
+</template>
+
+<script>
+import pick from 'lodash.pick'
+import { addCustomFieldTemplateData, updateCustomFieldTemplateData } from '@/api/customize/fieldTemplateData'
+export default {
+  name: 'BaseCustomFieldTemplateData',
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      visible: false,
+      // 下拉框map
+      typeMap: {}
+    }
+  },
+  props: {},
+  created () {
+    // 下拉框map
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_DATA_TYPE)
+  },
+  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',
+          'type',
+          'objId',
+          'data',
+          'remark'
+        ])))
+      })
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        // 日期处理
+        if (this.BaseTool.String.isBlank(values.id)) {
+          addCustomFieldTemplateData(values)
+            .then(() => {
+              this.handleCancel(values)
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+        } else {
+          updateCustomFieldTemplateData(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>

+ 300 - 0
src/views/customize/fieldTemplateData/modules/CustomFieldTemplateDataSelectModal.vue

@@ -0,0 +1,300 @@
+<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-select
+              v-model="queryParam.type"
+              placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in typeMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+            <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 { getCustomFieldTemplateDataPage, fetchCustomFieldTemplateData } from '@/api/customize/fieldTemplateData'
+
+export default {
+  name: 'CustomFieldTemplateDataSelectModal',
+  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: 'type',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.typeMap, text)
+          }
+        },
+        {
+          title: '所属对象id',
+          dataIndex: 'objId'
+        },
+        {
+          title: '模板数据',
+          dataIndex: 'data'
+        },
+        {
+          title: '备注',
+          dataIndex: 'remark'
+        },
+        {
+          title: '创建日期',
+          dataIndex: 'createdTime'
+        },
+        {
+          title: '创建人名称',
+          dataIndex: 'createdUserName'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 下拉框map
+      typeMap: {},
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          ...this.extraQueryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getCustomFieldTemplateDataPage(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
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_DATA_TYPE)
+  },
+  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) {
+      fetchCustomFieldTemplateData({ 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>

+ 67 - 0
src/views/customize/fieldTemplateData/modules/Detail.vue

@@ -0,0 +1,67 @@
+<template>
+  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+    <detail-list title="" :col="2">
+      <detail-list-item term="类型">{{ BaseTool.Object.getField(this.typeMap,model.type) }}</detail-list-item>
+      <detail-list-item term="所属对象id">{{ model.objId }}</detail-list-item>
+      <detail-list-item term="模板数据">{{ model.data }}</detail-list-item>
+      <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
+      <detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>
+      <detail-list-item term="创建人">{{ model.createdUserId }}</detail-list-item>
+      <detail-list-item term="更新人">{{ model.updateUserId }}</detail-list-item>
+      <detail-list-item term="更新人名称">{{ model.updateUserName }}</detail-list-item>
+    </detail-list>
+
+    <template slot="footer">
+      <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
+    </template>
+  </a-card>
+</template>
+
+<script>
+import DetailList from '@/components/tools/DetailList'
+const DetailListItem = DetailList.Item
+
+export default {
+  name: 'CustomFieldTemplateDataDetail',
+  components: {
+    DetailList,
+    DetailListItem
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      // 下拉框map
+      typeMap: {},
+      model: {
+        'type': null,
+        'objId': null,
+        'data': null,
+        'remark': null,
+        'updateTime': null,
+        'createdUserId': null,
+        'updateUserId': null,
+        'updateUserName': null
+      }
+    }
+  },
+  created () {
+    // 下拉框map
+
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FIELD_TEMPLATE_DATA_TYPE)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.modalTitle = '详情'
+      this.model = record
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+    }
+  }
+}
+</script>

+ 13 - 7
src/views/workplace/backlog/NewWorkplaceBacklog.vue

@@ -83,7 +83,7 @@
       <a-row :gutter="[30,40]">
         <a-col class="gutter-row" :span="6">
           <div style="height: 471px;background: #FFFFFF;">
-            <div id="pie"></div>
+            <div id="container-pie"></div>
           </div>
         </a-col>
         <a-col class="gutter-row" :span="12">
@@ -189,7 +189,7 @@ export default {
         { item: '事例五', count: 9, percent: 0.09 }
       ],
       allCount: 100,
-      chart: {},
+      chart: null,
       queryParam: {
         status: 1
       },
@@ -296,7 +296,12 @@ export default {
   },
   created () {
     this.getDict()
-    this.getInfo()
+    //this.getInfo()
+  },
+  mounted () {
+    this.$nextTick(function () {
+      this.getInfo()
+    })
   },
   methods: {
     getDict () {
@@ -304,9 +309,10 @@ export default {
       this.typeDetailDict = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE)
     },
     getInfo () {
-      this.getCharts('pie', this.equipmentData)
+      this.getCharts('container-pie', this.equipmentData)
     },
     getCharts (id, data) {
+      this.chart && this.chart.destroy()// 防止点击搜索按钮新增一个
       this.chart = new Chart({
         container: id,
         autoFit: true,
@@ -328,6 +334,7 @@ export default {
         showMarkers: false,
         itemTpl: '<li class="g2-tooltip-list-item"><span style="background-color:{color};" class="g2-tooltip-marker"></span>{name}: {value}</li>'
       })
+      // 辅助文本
       this.chart
         .annotation()
         .text({
@@ -342,7 +349,7 @@ export default {
         })
         .text({
           position: ['50%', '50%'],
-          content: '100',
+          content: '200',
           style: {
             fontSize: 20,
             fill: '#8c8c8c',
@@ -365,7 +372,7 @@ export default {
       this.chart
         .interval()
         .adjust('stack')
-        .position('count')
+        .position('percent')
         .color('item')
         .label('percent', (percent) => {
           return {
@@ -381,7 +388,6 @@ export default {
             value: percent
           }
         })
-
       this.chart.interaction('element-active')
       this.chart.render()
     }