Kaynağa Gözat

删除多余页面

lilei 4 yıl önce
ebeveyn
işleme
cfb7697331

+ 81 - 59
src/config/router.config.js

@@ -11,7 +11,7 @@ export const asyncRouterMap = [{
   name: 'index',
   component: BasicLayout,
   meta: {
-    title: 'IT后台'
+    title: '运营后台'
   },
   redirect: '/home',
   children: [{
@@ -47,76 +47,98 @@ export const asyncRouterMap = [{
     }
   },
   {
-    path: '/tenants',
-    redirect: '/tenants/list',
+    path: '/shop',
+    redirect: '/shop/order',
     component: PageView,
     meta: {
-      title: '租户管理',
-      icon: 'team'
+      title: '商城',
+      icon: 'shop'
       // permission: 'M_tenants_list'
     },
-    children: [{
-      path: '/tenants/list',
-      name: 'tenantsList',
-      component: () => import(/* webpackChunkName: "tenants" */ '@/views/tenants/tenantsList.vue'),
-      meta: {
-        title: '租户列表',
-        icon: 'team'
-        // permission: 'M_tenants_list'
-      }
-    }]
-  },
-  // 考评管理
-  {
-    path: '/evaluation',
-    redirect: '/evaluation/evaluationItem',
-    component: PageView,
-    meta: {
-      title: '考评管理',
-      icon: 'block'
-      // permission: 'M_evaluation_0'
-    },
-    children: [{
-      path: '/evaluation/evaluationItem',
-      name: 'EvaluationItem',
-      component: () => import(/* webpackChunkName: "evaluation" */
-        '@/views/evaluation/evaluationItem/EvaluationItem.vue'),
-      meta: {
-        title: '考评项目',
-        icon: 'save'
-        // permission: 'M_evaluationItem_list'
-      }
-    }, {
-      path: '/evaluation/evaluationPlan',
-      name: 'EvaluationPlan',
-      component: () => import(/* webpackChunkName: "evaluation" */
-        '@/views/evaluation/evaluationPlan/EvaluationPlan.vue'),
-      meta: {
-        title: '考评方案',
-        icon: 'switcher'
-        // permission: 'M_evaluationPlan_list'
+    children: [
+      {
+        path: '/shop/order',
+        name: 'shopOrder',
+        component: () => import(/* webpackChunkName: "tenants" */ '@/views/shop/shopOrder.vue'),
+        meta: {
+          title: '订单管理',
+          icon: 'profile'
+          // permission: 'M_tenants_list'
+        }
+      },
+      {
+        path: '/shop/orderDetail',
+        name: 'shopOrderDetail',
+        hidden: true,
+        component: () => import(/* webpackChunkName: "tenants" */ '@/views/shop/shopOrder.vue'),
+        meta: {
+          title: '订单详情',
+          icon: 'profile'
+          // permission: 'M_tenants_list'
+        }
+      },
+      {
+        path: '/shop/goods',
+        name: 'goodsList',
+        component: () => import(/* webpackChunkName: "tenants" */ '@/views/shop/shopOrder.vue'),
+        meta: {
+          title: '商品管理',
+          icon: 'shopping'
+          // permission: 'M_tenants_list'
+        }
+      },
+      {
+        path: '/shop/goodsShelves',
+        name: 'goodsShelves',
+        component: () => import(/* webpackChunkName: "tenants" */ '@/views/shop/shopOrder.vue'),
+        meta: {
+          title: '商品上架',
+          icon: 'flag'
+          // permission: 'M_tenants_list'
+        }
+      },
+      {
+        path: '/shop/bannerSetting',
+        name: 'bannerSetting',
+        component: () => import(/* webpackChunkName: "appSetting" */ '@/views/appSetting/bannerSetting.vue'),
+        meta: {
+          title: '营销图设置',
+          icon: 'file-image'
+        // permission: 'M_banner'
+        }
       }
-    }]
+    ]
   },
   {
-    path: '/appSetting',
-    redirect: '/appSetting/bannerSetting',
+    path: '/shopSetting',
+    redirect: '/shopSetting/bannerSetting',
     component: PageView,
     meta: {
-      title: '小程序设置',
+      title: '商城设置',
       icon: 'appstore'
       // permission: 'M_appSetting'
     },
-    children: [{
-      path: '/appSetting/bannerSetting',
-      name: 'bannerSetting',
-      component: () => import(/* webpackChunkName: "appSetting" */ '@/views/appSetting/bannerSetting.vue'),
-      meta: {
-        title: '营销图设置',
-        icon: 'file-image'
-        // permission: 'M_banner'
+    children: [
+      {
+        path: '/shopSetting/goodsClass',
+        name: 'goodsClass',
+        component: () => import(/* webpackChunkName: "tenants" */ '@/views/shop/shopOrder.vue'),
+        meta: {
+          title: '商品分类管理',
+          icon: 'folder'
+          // permission: 'M_tenants_list'
+        }
+      },
+      {
+        path: '/shopSetting/supplier',
+        name: 'supplier',
+        component: () => import(/* webpackChunkName: "tenants" */ '@/views/shop/shopOrder.vue'),
+        meta: {
+          title: '供货商管理',
+          icon: 'solution'
+          // permission: 'M_tenants_list'
+        }
       }
-    }
     ]
   },
   // auth
@@ -125,7 +147,7 @@ export const asyncRouterMap = [{
     redirect: '/auth/userList',
     component: PageView,
     meta: {
-      title: 'IT权限管理',
+      title: '权限管理',
       icon: 'lock'
       // permission: 'M_auth_0'
     },

+ 0 - 173
src/views/evaluation/evaluationItem/AddEvaIndexModal.vue

@@ -1,173 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="600">
-      <a-form :form="form" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评指标名称 -->
-            <a-form-item label="考评指标名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                id="addEvaIndexModal-name"
-                :maxLength="128"
-                v-decorator="[
-                  'formData.name',
-                  { initialValue: formData.name,
-                    getValueFromEvent: $filterEmpty,
-                    rules: [{ required: true, message: '请输入考评指标名称!' }] },
-                ]"
-                placeholder="请输入考评指标名称(最多128个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 15, offset: 9 }">
-          <a-button :loading="loading" id="addEvaIndexModal-submit" type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button id="addEvaIndexModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  itemIndexSave,
-  itemIndexDetail
-} from '@/api/evaluationItem.js'
-export default {
-  name: 'AddEvaIndexModal',
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 关联的考评项id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    },
-    // 要编辑的考评指标id
-    itemIndexId: {
-	  type: [String, Number],
-	  default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-		  // 编辑 查数据
-        if (this.itemIndexId) {
-          this.getData(this.itemIndexId)
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'AddEvaIndexModal'
-      }),
-      formData: {
-        name: '' // 指标名称
-      },
-	  loading: false // 确定按钮loading
-
-    }
-  },
-  computed: {
-    // 弹框标题
-    titleText () {
-      return this.itemIndexId ? '编辑' : '新增'
-    }
-  },
-  methods: {
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.clear()
-      this.$emit('close')
-    },
-    // 编辑时,获取数据详情
-    getData (id) {
-      itemIndexDetail({ id: id }).then(res => {
-        if (res.status == 200) {
-          // console.log(res, 'rrrrrrrrrr')
-          this.form.setFieldsValue({ 'formData.name': res.data.name })
-        }
-      })
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          this.loading = true
-          const params = this.itemIndexId ? Object.assign({ assessItemId: this.itemId, id: this.itemIndexId }, values.formData) : Object.assign({ assessItemId: this.itemId }, values.formData)
-          // console.log(params, 'ppppppppppppp')
-          itemIndexSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
-    }
-
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'AddEvaIndexModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.modalBox {}
-
-	.ant-modal-footer {
-		display: none;
-	}
-
-	.time-text {
-		color: #1890FF;
-		padding: 0px 20px;
-		cursor: pointer;
-	}
-
-	.labelT {
-		position: absolute;
-		left: -135px;
-		top: 20px;
-		color: rgba(0, 0, 0, 0.85);
-	}
-</style>

+ 0 - 213
src/views/evaluation/evaluationItem/AddEvaItemModal.vue

@@ -1,213 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="600">
-      <a-form :form="form" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评项目名称 -->
-            <a-form-item label="考评项目名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                id="addEvaItemModal-name"
-                :maxLength="128"
-                v-decorator="[
-                  'formData.name',
-                  { initialValue: formData.name,
-                    getValueFromEvent: $filterEmpty,
-                    rules: [{ required: true, message: '请输入考评项目名称!' }] },
-                ]"
-                placeholder="请输入考评项目名称(最多128个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评项目说明 -->
-            <a-form-item label="考评项目说明:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-textarea
-                allowClear
-                id="addEvaItemModal-desc"
-                :maxLength="500"
-                Input.TextArea
-                :autoSize="{minRows:5}"
-                v-decorator="[
-                  'formData.desc',
-                  { initialValue: formData.desc,getValueFromEvent: $filterEmpty },
-                ]"
-                placeholder="请输入考评项目说明(最多500个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 15, offset: 9 }">
-          <a-button :loading="loading" id="addEvaItemModal-submit" type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button id="addEvaItemModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  itemDetail,
-  itemSave
-} from '@/api/evaluationItem.js'
-export default {
-  name: 'AddEvaItemModal',
-  components: {
-    STable,
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的项目id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        this.form.resetFields()
-        // 编辑查详情
-        if (this.itemId) {
-          this.getFormData(this.itemId)
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'AddEvaItemModal'
-      }),
-      formData: {
-        name: '', // 方案名称
-        desc: '' // 方案说明
-      },
-	  loading: false // 确定按钮loading
-    }
-  },
-  computed: {
-    // 弹框标题
-    titleText () {
-      return this.itemId ? '编辑' : '新增'
-    }
-  },
-  methods: {
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.formData.name = ''
-      this.formData.desc = ''
-      this.$emit('close')
-    },
-    // 查详情
-    getFormData (id) {
-      itemDetail({
-        id: id
-      }).then(res => {
-        if (res.status == 200) {
-          // console.log(res, 'rrrrrrrrrr')
-          this.formData = Object.assign(this.formData, res.data)
-          console.log(this.formData, 'this.formData')
-        }
-      })
-    },
-    // 保存提交
-    handleSubmit () {
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          this.loading = true
-          const params = this.itemId ? Object.assign({
-            id: this.itemId
-          }, values.formData) : values.formData
-          // console.log(params, 'ppppppppppppp')
-          itemSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(() => {
-                this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.cancel()
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
-    }
-
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'AddEvaItemModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.modalBox {}
-
-	.ant-modal-footer {
-		display: none;
-	}
-
-	.time-text {
-		color: #1890FF;
-		padding: 0px 20px;
-		cursor: pointer;
-	}
-
-	.labelT {
-		position: absolute;
-		left: -135px;
-		top: 20px;
-		color: rgba(0, 0, 0, 0.85);
-	}
-</style>

+ 0 - 265
src/views/evaluation/evaluationItem/EvaluationItem.vue

@@ -1,265 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :span="6">
-            <a-form-item label="考评项目名称">
-              <a-input id="evaluationItem-name" allowClear v-model.trim="queryParam.name" placeholder="请输入考评项目名称" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-item label="启用状态">
-              <v-select
-                id="evaluationItem-status"
-                ref="status"
-                allowClear
-                placeholder="状态"
-                v-model="queryParam.status"
-                code="ENABLE_FLAG"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-button id="evaluationItem-search" type="primary" style="margin-right: 10px;" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button id="evaluationItem-reset" type="" @click="reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <a-divider />
-    <div class="table-operator">
-      <a-button id="evaluationItem-add" type="primary" icon="plus" @click="openModal">新增</a-button>
-    </div>
-    <s-table
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-icon id="evaluationItem-setting" title="设置考评指标" type="setting" class="actionBtn icon-orange" @click="handleSet(record)" />
-        <a-icon
-          id="evaluationItem-edit"
-          type="edit"
-          title="编辑"
-          class="actionBtn icon-blues"
-          v-if="record.status == '0'"
-          @click="openModal(record)" />
-        <a-icon
-          id="evaluationItem-delete"
-          title="删除"
-          type="delete"
-          class="actionBtn icon-red"
-          v-if="record.status == '0'"
-          @click="delect(record)" />
-      </template>
-      <!-- 启用禁用 -->
-      <template slot="enable" slot-scope="text, row">
-        <a-switch id="evaluationItem-enableStatus" checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)" />
-      </template>
-    </s-table>
-    <!-- 新增/编辑 弹窗 -->
-    <add-evaItemModal :itemId="itemId" :visible="openAddModal" @refresh="reset" @close="openAddModal=false"></add-evaItemModal>
-    <!-- 设置弹窗 -->
-    <set-evaItemModal :itemId="itemId" :itemName="itemName" :visible="openSetting" @close="openSetting=false"></set-evaItemModal>
-  </a-card>
-
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  getItemListByPage,
-  itemDelete,
-  itemEnable
-} from '@/api/evaluationItem.js'
-import addEvaItemModal from './AddEvaItemModal.vue'
-import setEvaItemModal from './SetEvaItemModal.vue'
-import moment from 'moment'
-export default {
-  name: 'EvaluationPlanList',
-  components: {
-    STable,
-    VSelect,
-    addEvaItemModal,
-    setEvaItemModal
-  },
-  data () {
-    return {
-      moment,
-      pageNo: 1,
-      pageSize: 10,
-      openAddModal: false, // 打开新增弹窗
-      openSetting: false, // 打开设置弹窗
-      itemId: '', // 要编辑的考评项id
-      itemName: '', // 要编辑的考评项名称
-      // 查询参数
-      queryParam: {
-        name: '', // 项目名称
-        status: '' // 状态
-      },
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '考评项目名称',
-        dataIndex: 'name',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '考评项目说明',
-        dataIndex: 'desc',
-        width: 300,
-        align: 'center',
-        customRender: (text) => {
-		  return text || '--'
-        }
-      },
-      {
-        title: '状态',
-        width: 150,
-        align: 'center',
-        dataIndex: 'status',
-        scopedSlots: {
-          customRender: 'enable'
-        }
-      },
-      {
-        title: '操作',
-        width: 200,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        return getItemListByPage(Object.assign(parameter, this.queryParam)).then(res => {
-          if (res.status == 200) {
-            const no = (res.data.pageNo - 1) * res.data.pageSize
-            for (let i = 0; i < res.data.list.length; i++) {
-              const _item = res.data.list[i]
-              _item.no = no + i + 1
-              _item.status = _item.status + '' === '1'
-            }
-            res.data.count = Number(res.data.count)
-            return res.data
-          }
-        })
-      }
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.reset()
-    })
-  },
-  methods: {
-    // 修改状态
-    changeFlagHandle (record) {
-      // console.log(record, '222222222')
-      const _data = {
-        id: record.id,
-        status: record.status ? '1' : '0'
-      }
-      itemEnable(_data).then(res => {
-        console.log(res.status)
-        if (res.status == '200') {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-        } else {
-          record.status = !record.status
-        }
-      })
-    },
-    // 打开新增弹窗
-    openModal (row) {
-      this.itemId = row ? row.id : ''
-      this.openAddModal = true
-    },
-    // 删除
-    delect (row) {
-      const _this = this
-      this.$confirm({
-        title: '警告',
-        centered: true,
-        content: '删除考评项目时,其关联的考评指标将被同步删除,确认删除吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          itemDelete({
-            id: row.id
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-            }
-          })
-        }
-      })
-    },
-    // 打开设置弹框
-    handleSet (row) {
-      this.openSetting = true
-      this.itemId = row.id
-      this.itemName = row.name
-    },
-    // 重置
-    reset () {
-      this.queryParam = {
-        name: '',
-        status: '' // 状态
-      }
-      this.$refs.table.refresh(true)
-    }
-  }
-}
-</script>
-<style>
-	.table-page-search-wrapper,
-	.addButton {
-		margin-bottom: 0;
-	}
-
-	.table-page-search-wrapper .ant-form-inline .ant-form-item {
-		margin-bottom: 10px;
-	}
-
-	.table-operator {
-		margin-bottom: 10px;
-	}
-
-	.textCount {
-		border: 1px solid #91d5ff;
-		background-color: #e6f7ff;
-		padding: 10px 0;
-		border-radius: 5px;
-		padding-left: 20px;
-		margin: 10px 0;
-	}
-
-	.action-button {
-		line-height: 40px;
-		white-space: nowrap;
-		padding: 5px 10px;
-		background-color: #1890ff;
-		border-radius: 4px;
-		color: #fff;
-		margin-right: 5px;
-	}
-
-	.menu-text {
-		background-color: #f90;
-	}
-</style>

+ 0 - 172
src/views/evaluation/evaluationItem/SetEvaItemModal.vue

@@ -1,172 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      title="设置考评指标"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="'60%'">
-      <a-row :gutter="24" class="header">
-        <div>请给考评项目为【{{ itemName }}】设置考评指标</div>
-        <a-button id="setEvaItemModal-add" type="primary" @click="openModal">新增考评指标</a-button>
-      </a-row>
-      <a-table
-        ref="table"
-        size="default"
-        :pagination="false"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :dataSource="list"
-        bordered>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-icon id="setEvaItemModal-edit" title="编辑" type="edit" class="actionBtn icon-blues" @click="openModal(record)" />
-          <a-icon id="setEvaItemModal-delete" title="删除" type="delete" class="actionBtn icon-red" @click="delect(record)" />
-        </template>
-      </a-table>
-      <!-- 新增/编辑 弹窗 -->
-      <add-evaIndexModal :itemId="itemId" :itemIndexId="itemIndexId" :visible="openAddModal" @refresh="getList" @close="openAddModal=false"></add-evaIndexModal>
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  itemIndexQuery,
-  itemIndexDelete
-} from '@/api/evaluationItem.js'
-import addEvaIndexModal from './AddEvaIndexModal.vue'
-export default {
-  name: 'SetEvaItemModal',
-  components: {
-    addEvaIndexModal
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的考评项id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    },
-    // 要编辑的考评项名称
-    itemName: {
-      type: String,
-      default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        this.getList()
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      openAddModal: false, // 是否打开编辑/新增弹框
-      itemIndexId: '', // 考评指标id
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '考评指标名称',
-        dataIndex: 'name',
-        width: 300,
-        align: 'center'
-      },
-      {
-        title: '操作',
-        width: 150,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      list: []
-    }
-  },
-  computed: {},
-  methods: {
-    // 获取列表数据
-    getList () {
-      itemIndexQuery({
-        assessItemId: this.itemId
-      }).then(res => {
-        if (res.status == 200) {
-          res.data.map((item, index) => {
-            item.no = index + 1
-          })
-          this.list = res.data
-        } else {
-          this.list = []
-        }
-      })
-    },
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.$emit('close')
-    },
-    // 打开新增/编辑 弹窗
-    openModal (row) {
-      this.itemIndexId = row ? row.id : ''
-      this.openAddModal = true
-    },
-    // 删除考评指标
-    delect (row) {
-      const _this = this
-      this.$confirm({
-        title: '警告',
-        centered: true,
-        content: '删除后原数据不可恢复,是否删除?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          itemIndexDelete({
-            id: row.id
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.getList()
-            }
-          })
-        }
-      })
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'SetEvaItemModal'
-    })
-  }
-
-}
-</script>
-
-<style lang="less">
-	.modalBox{
-	  .header {
-	  	font-size: 16px;
-	  	font-weight: 600;
-	    padding: 0 15px 20px 15px;
-	  }
-	  .header div {
-	  	margin-bottom: 20px;
-	  }
-	}
-</style>

+ 0 - 253
src/views/evaluation/evaluationPlan/AddEvaModal.vue

@@ -1,253 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="600">
-      <a-form :form="form" :model="formData" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评方案名称 -->
-            <a-form-item label="考评方案名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                id="addEvaModal-name"
-                :maxLength="128"
-                v-decorator="[
-                  'formData.name',
-                  { initialValue: formData.name,
-                    getValueFromEvent: $filterEmpty,
-                    rules: [{ required: true, message: '请输入考评方案名称!' }] },
-                ]"
-                placeholder="请输入考评方案名称(最多128个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 适用模式 -->
-            <a-form-item label="适用模式:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <v-select
-                ref="orgType"
-                id="addEvaModal-scopeType"
-                allowClear
-                mode="multiple"
-                @change="scopeTypeChange"
-                v-decorator="[
-                  'formData.scopeType',
-                  { initialValue: formData.scopeType,
-                    rules: [{ required: true, message: '请选择适用模式!' }] },
-                ]"
-                code="ASSESS_SCHEME_SCOPE_TYPE"></v-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评方案说明 -->
-            <a-form-item label="考评方案说明:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-textarea
-                allowClear
-                id="addEvaModal-desc"
-                :maxLength="500"
-                Input.TextArea
-                :autoSize="{minRows:5}"
-                v-decorator="[
-                  'formData.desc',
-                  { initialValue: formData.desc,getValueFromEvent: $filterEmpty },
-                ]"
-                placeholder="请输入考评方案说明(最多500个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button :loading="loading" id="addEvaModal-submit" type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button id="addEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  VSelect
-} from '@/components'
-import {
-  planSave,
-  planDetail
-} from '@/api/evaluationPlan.js'
-export default {
-  name: 'AddEvaModal',
-  components: {
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的方案id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        this.form.resetFields()
-        // 编辑查详情
-        if (this.itemId) {
-          this.getFormData(this.itemId)
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'AddEvaModal'
-      }),
-      formData: {
-        name: '', // 方案名称
-        scopeType: [], // 适用类型
-        desc: '' // 方案说明
-      },
-      loading: false, // 确定按钮loading
-      options: [{
-        code: 'VIDEO_INSPECTION',
-        dispName: '视频巡店',
-        id: 1
-      },
-      {
-        code: 'SPOT_INSPECTION',
-        dispName: '现场巡店',
-        id: 12
-      },
-      {
-        code: 'POINT_INSPECTION',
-        dispName: '点检',
-        id: 13
-      }
-      ]
-    }
-  },
-  computed: {
-    // 弹框标题
-    titleText () {
-      return this.itemId ? '编辑' : '新增'
-    }
-  },
-  methods: {
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.formData = {
-        name: '', // 方案名称
-        scopeType: [], // 适用类型
-        desc: '' // 方案说明
-      }
-      this.$emit('close')
-    },
-    // 查详情
-    getFormData (id) {
-      planDetail({
-        id: id
-      }).then(res => {
-        if (res.status == 200) {
-          // console.log(res, 'rrrrrrrrrr')
-          this.formData = Object.assign(this.formData, res.data)
-          this.formData.scopeType = this.formData.scopeType.split(',')
-        }
-      })
-    },
-    // 使用模式改变
-    scopeTypeChange (v) {
-      this.formData.scopeType = v
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          this.loading = true
-          const params = this.itemId ? Object.assign({
-            id: this.itemId
-          }, values.formData) : values.formData
-          params.scopeType = params.scopeType.join(',')
-          // console.log(params, 'ppppppppppppp')
-          planSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.cancel()
-        }
-      })
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'AddEvaModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.modalBox {}
-
-	.ant-modal-footer {
-		display: none;
-	}
-
-	.time-text {
-		color: #1890FF;
-		padding: 0px 20px;
-		cursor: pointer;
-	}
-
-	.labelT {
-		position: absolute;
-		left: -135px;
-		top: 20px;
-		color: rgba(0, 0, 0, 0.85);
-	}
-</style>

+ 0 - 317
src/views/evaluation/evaluationPlan/EvaluationPlan.vue

@@ -1,317 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :span="6">
-            <a-form-item label="方案名称">
-              <a-input id="evaluationPlan-name" allowClear v-model.trim="queryParam.name" placeholder="请输入方案名称" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-item label="启用状态">
-              <v-select
-                id="evaluationPlan-status"
-                ref="status"
-                allowClear
-                placeholder="状态"
-                v-model="queryParam.status"
-                code="ENABLE_FLAG"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-button id="evaluationPlan-search" type="primary" style="margin-right: 10px;" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button id="evaluationPlan-reset" type="" @click="reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <a-divider />
-    <a-row class="add-btn" type="flex" justify="space-between">
-      <a-button id="evaluationPlan-add" type="primary" icon="plus" @click="openModal">新增</a-button>
-      <!-- 目前版本不要 -->
-      <!-- <a-col id="evaluationPlan-setDefaultPlan" @click="handleDefaultSet">
-        <a-icon type="setting" class="setting-icon" />
-        <span class="setting">默认方案设置</span>
-      </a-col> -->
-    </a-row>
-    <s-table
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-icon id="evaluationPlan-setting" title="选择考评项目" type="setting" class="actionBtn icon-orange" @click="handleSet(record)" />
-        <a-icon
-          id="evaluationPlan-edit"
-          title="编辑"
-          type="edit"
-          class="actionBtn icon-blues"
-          v-if="record.status == '0'"
-          @click="openModal(record)" />
-        <a-icon
-          id="evaluationPlan-delete"
-          title="删除"
-          type="delete"
-          class="actionBtn icon-red"
-          v-if="record.status == '0'"
-          @click="delect(record)" />
-      </template>
-      <!-- 启用禁用 -->
-      <template slot="enable" slot-scope="text, row">
-        <a-switch id="evaluationPlan-enableStatus" checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)" />
-      </template>
-    </s-table>
-    <!-- 新增/编辑 弹窗 -->
-    <add-evaModal :itemId="itemId" :visible="openAddModal" @refresh="reset" @close="openAddModal=false"></add-evaModal>
-    <!-- 选择考评项弹窗 -->
-    <set-evaModal :itemId="itemId" :itemName="itemName" :visible="openSetting" @close="openSetting=false"></set-evaModal>
-    <!-- 设置默认方案弹窗 -->
-    <set-evaDefaultModal :itemId="itemId" :defaultPlanList="defaultPlanList" :visible="openDefaultSetting" @refresh="getDefaultPlan" @close="openDefaultSetting=false"></set-evaDefaultModal>
-  </a-card>
-
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  planQueryByPage,
-  planEnable,
-  planDefaultQuery,
-  planDelete
-} from '@/api/evaluationPlan.js'
-import addEvaModal from './AddEvaModal.vue'
-import setEvaModal from './SetEvaModal.vue'
-import setEvaDefaultModal from './SetEvaDefaultModal.vue'
-export default {
-  name: 'EvaluationPlanList',
-  components: {
-    STable,
-    VSelect,
-    addEvaModal,
-    setEvaModal,
-    setEvaDefaultModal
-  },
-  data () {
-    return {
-      pageNo: 1,
-      pageSize: 10,
-      openAddModal: false, // 打开新增弹窗
-      openSetting: false, // 打开选择考评项弹窗
-      openDefaultSetting: false, // 打开设置默认方案弹窗
-      itemId: '', // 要编辑的方案id
-      itemName: '', // 方案名称
-      defaultPlanList: [], // 默认方案列表
-      // 查询参数
-      queryParam: {
-        name: '',
-        status: '' // 状态
-      },
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '考评方案名称',
-        dataIndex: 'name',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '考评方案说明',
-        dataIndex: 'desc',
-        width: 300,
-        align: 'center',
-        customRender: (text) => {
-          return text || '--'
-        }
-      },
-      {
-        title: '适用模式',
-        width: 200,
-        align: 'center',
-        dataIndex: 'scopeTypeDictValue'
-      },
-      {
-        title: '状态',
-        width: 150,
-        align: 'center',
-        dataIndex: 'status',
-        scopedSlots: {
-          customRender: 'enable'
-        }
-      },
-      {
-        title: '操作',
-        width: 200,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        return planQueryByPage(Object.assign(parameter, this.queryParam)).then(res => {
-          if (res.status == 200) {
-            const no = (res.data.pageNo - 1) * res.data.pageSize
-            for (let i = 0; i < res.data.list.length; i++) {
-              const _item = res.data.list[i]
-              _item.no = no + i + 1
-              _item.status = _item.status + '' === '1'
-            }
-            return res.data
-          }
-        })
-      }
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.reset()
-      vm.getDefaultPlan()
-    })
-  },
-  methods: {
-    // 默认方案查询
-    getDefaultPlan () {
-      planDefaultQuery().then(res => {
-        // console.log(res, 'rrrrrrrr')
-        if (res.status == 200) {
-          this.defaultPlanList = res.data
-        } else {
-          this.defaultPlanList = []
-        }
-      })
-    },
-    // 修改状态
-    changeFlagHandle (record) {
-      const _data = {
-        id: record.id,
-        status: record.status ? '1' : '0'
-      }
-      planEnable(_data).then(res => {
-        console.log(res.status)
-        if (res.status == '200') {
-          this.$message.success('修改成功')
-          this.$refs.table.refresh()
-        } else {
-          record.status = !record.status
-        }
-      })
-    },
-    // 打开新增弹窗
-    openModal (row) {
-      this.itemId = row ? row.id : ''
-      this.openAddModal = true
-    },
-    // 打开默认方案设置弹窗
-    handleDefaultSet () {
-      this.openDefaultSetting = true
-    },
-    // 删除
-    delect (row) {
-      const _this = this
-      // 判断当前方案是否为默认方案
-      const has = this.defaultPlanList.find(item => item.assessId == row.id)
-      if (has) {
-        this.$warning({
-          title: '警告',
-		  centered: true,
-          content: '该考评方案为当前默认考评方案,不能删除,请取消该方案的默认后再进行删除!'
-        })
-      } else {
-        this.$confirm({
-          title: '警告',
-		  centered: true,
-          content: '删除后原数据不可恢复,是否删除?',
-          okText: '确定',
-          cancelText: '取消',
-          onOk () {
-            planDelete({
-              id: row.id
-            }).then(res => {
-              if (res.status == 200) {
-                _this.$message.success(res.message)
-                _this.$refs.table.refresh()
-              }
-            })
-          }
-        })
-      }
-    },
-    // 打开设置弹框
-    handleSet (row) {
-      this.itemId = row.id
-      this.itemName = row.name
-      this.openSetting = true
-      console.log(this.openSetting)
-    },
-    // 重置
-    reset () {
-      this.queryParam = {
-        name: '',
-        status: '' // 状态
-      }
-      this.$refs.table.refresh(true)
-    }
-  }
-}
-</script>
-<style scoped>
-	.table-page-search-wrapper,
-	.addButton {
-		margin-bottom: 0;
-	}
-
-	.table-page-search-wrapper .ant-form-inline .ant-form-item {
-		margin-bottom: 10px;
-	}
-
-	.add-btn {
-		margin-bottom: 10px;
-	}
-
-	.actionBtn {
-		font-size: 20px;
-		padding: 0 10px;
-	}
-
-	.setting-icon {
-		font-size: 20px;
-		margin-right: 5px;
-		color: #1890FF;
-	}
-
-	.setting {
-		font-size: 16px;
-		color: #1890FF;
-		border-bottom: 1px solid #1890FF;
-		cursor: pointer;
-	}
-
-	.blue {
-		color: #1890FF;
-	}
-
-	.green {
-		color: #16b50e;
-	}
-
-	.red {
-		color: red;
-	}
-
-	.orange {
-		color: #ffaa00;
-	}
-</style>

+ 0 - 244
src/views/evaluation/evaluationPlan/SetEvaDefaultModal.vue

@@ -1,244 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      title="默认方案设置"
-	  centered
-      v-model="isshow"
-      @cancle="cancel"
-      :width="600">
-      <a-form :form="form" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <!-- 视频巡店默认方案 -->
-            <a-form-item label="视频巡店默认方案:" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
-              <a-select
-                id="setEvaDefaultModal-videoType"
-                @change="videoTypeChange"
-                v-decorator="[
-                  'formData.videoType',
-                  { initialValue: formData.videoType,
-                    rules: [{ required: true, message: '请选择考评方案(单选)!' }] },
-                ]"
-                placeholder="请选择考评方案(单选)"
-              >
-                <a-select-option v-for="item in planList" :key="item.id" :value="item.id">
-                  {{ item.name }}
-                </a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <!-- 现场巡店默认方案 -->
-            <a-form-item label="现场巡店默认方案:" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
-              <a-select
-                id="setEvaDefaultModal-spotType"
-                placeholder="请选择考评方案(单选)"
-                @change="spotTypeChange"
-                v-decorator="[
-                  'formData.spotType',
-                  { initialValue: formData.spotType,
-                    rules: [{ required: true, message: '请选择考评方案(单选)!' }] },
-                ]">
-                <a-select-option v-for="item in planList" :key="item.id" :value="item.id">
-                  {{ item.name }}
-                </a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row>
-          <a-col :span="22">
-            说明:如果默认方案被删除,系统将自动获取对应类别下最新一条启用的模板作为默认方案模板
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button :loading="loading" id="setEvaDefaultModal-submit" type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button id="setEvaDefaultModal-cancle" :style="{ marginLeft: '8px' }" @click="cancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  planQuery,
-  planDefaultSave
-} from '@/api/evaluationPlan.js'
-export default {
-  name: 'AddEvaModal',
-  components: {
-    STable,
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的方案id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    },
-    // 默认方案
-    defaultPlanList: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        this.form.resetFields()
-        // 默认方案回显
-        this.pageInit()
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'AddEvaModal'
-      }),
-	  // 默认值设为undefined, 解决placeholder不生效问题
-      formData: {
-        videoType: undefined, // 视频巡店默认方案
-        spotType: undefined // 现场巡店默认方案
-      },
-      planList: [], // 考评方案列表
-	  loading: false // 确定按钮loading
-    }
-  },
-  computed: {},
-  mounted () {
-    // 获取方案列表数据
-    this.getPlanList()
-  },
-  methods: {
-    pageInit () {
-      if (this.defaultPlanList.length) {
-        this.formData.videoType = this.defaultPlanList.find(item => item.scopeType == 'VIDEO_INSPECTION').assessId
-        this.formData.spotType = this.defaultPlanList.find(item => item.scopeType == 'SPOT_INSPECTION').assessId
-      }
-    },
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.formData.videoType = undefined
-      this.formData.spotType = undefined
-      this.$emit('close')
-    },
-    // 获取方案列表数据
-    getPlanList () {
-      planQuery().then(res => {
-        if (res.status == 200) {
-          this.planList = res.data
-        } else {
-          this.planList = []
-        }
-      })
-    },
-    // 视频巡店默认方案改变
-    videoTypeChange (v) {
-      this.formData.videoType = v
-    },
-    // 现场巡店默认方案改变
-    spotTypeChange (v) {
-      this.formData.spotType = v
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          this.loading = true
-          const params = [{
-            assessId: values.formData.videoType,
-            scopeType: 'VIDEO_INSPECTION'
-          },
-          {
-            assessId: values.formData.spotType,
-            scopeType: 'SPOT_INSPECTION'
-          }
-          ]
-          planDefaultSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-			  // 保存后更新默认方案
-			  this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.cancel()
-        }
-      })
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'AddEvaModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.modalBox {}
-
-	.ant-modal-footer {
-		display: none;
-	}
-
-	.time-text {
-		color: #1890FF;
-		padding: 0px 20px;
-		cursor: pointer;
-	}
-
-	.labelT {
-		position: absolute;
-		left: -135px;
-		top: 20px;
-		color: rgba(0, 0, 0, 0.85);
-	}
-</style>

+ 0 - 393
src/views/evaluation/evaluationPlan/SetEvaModal.vue

@@ -1,393 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      title="选择考评项"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="'80%'">
-      <a-row :gutter="24">
-        <a-col class="title" :span="20">
-          <!-- 考评方案名称 -->
-          <span>考评方案名称: {{ itemName }}</span>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-form :form="form" ref="form" @submit="handleSubmit">
-          <a-card class="card-content">
-            <a-col :span="15">
-              <p>已选考评项目:</p>
-              <!-- 已选考评项列表 -->
-              <a-table
-                ref="table"
-                size="default"
-                :scroll="{y:400}"
-                :pagination="false"
-                :rowKey="(record) => record.id"
-                :columns="columns"
-                :dataSource="checkedList"
-                bordered>
-                <!-- 操作 -->
-                <template slot="action" slot-scope="text, record, index">
-                  <a-button
-                    id="setEvaModal-moveUp"
-                    type="primary"
-                    ghost
-                    size="small"
-                    class="actionBtn"
-                    @click="moveUp(index)"
-                    v-if="index>0"
-                    icon="arrow-up">上移</a-button>
-                  <a-button
-                    id="setEvaModal-moveDown"
-                    type="primary"
-                    ghost
-                    size="small"
-                    class="actionBtn"
-                    @click="moveDown(index)"
-                    v-if="index < checkedList.length-1"
-                    icon="arrow-down">下移</a-button>
-                  <a-button
-                    id="setEvaModal-moveTop"
-                    type="danger"
-                    ghost
-                    size="small"
-                    class="actionBtn"
-                    @click="moveTop(index)"
-                    v-if="index>0"
-                    icon="up">置顶</a-button>
-                  <a-button
-                    id="setEvaModal-moveBottom"
-                    type="danger"
-                    ghost
-                    size="small"
-                    class="actionBtn"
-                    @click="moveBottom(index)"
-                    v-if="index < checkedList.length-1"
-                    icon="down">置底</a-button>
-                </template>
-              </a-table>
-
-            </a-col>
-            <a-col span="1" class="divider">
-            </a-col>
-            <a-col span="8">
-              <a-row>
-                <p>请选择需要的考评项目:</p>
-              </a-row>
-              <s-table
-                ref="tableItem"
-                size="default"
-                :scroll="{y:400}"
-                :showPagination="false"
-                :row-selection="rowSelection"
-                :rowKey="(record) => record.id"
-                :columns="itemColumns"
-                :data="loadItemData"
-                bordered>
-                <!-- 启用禁用 -->
-                <template slot="enable" slot-scope="text, row">
-                  <span :class="[text==1 ? 'green' : 'grey']">{{ text==1 ? '启用' : '禁用' }}</span>
-                </template>
-              </s-table>
-            </a-col>
-          </a-card>
-          <a-form-item class="footer" :wrapper-col="{ span: 24, offset: 12 }">
-            <a-button :loading="loading" id="setEvaModal-submit" type="primary" @click="handleSubmit()">
-              保存
-            </a-button>
-            <a-button id="setEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
-              取消
-            </a-button>
-          </a-form-item>
-        </a-form>
-      </a-row>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  planItemQuery,
-  planItemSave
-} from '@/api/evaluationPlan.js'
-import { getItemList } from '@/api/evaluationItem.js'
-export default {
-  name: 'AddEvaModal',
-  components: {
-    STable,
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的方案id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    },
-    // 要编辑的方案名字
-    itemName: {
-	  type: String,
-	  default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        // 获取已选列表数据
-        this.getCheckedList()
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'SetEvaModal'
-      }),
-      loading: false, // 确定按钮loading
-      // 已选考评项数据
-      checkedList: [], // 已选考评项列表
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '考评项目名称',
-        dataIndex: 'assessItemName',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '操作',
-        width: 200,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      // 考评项列表数据
-      itemColumns: [{
-        title: '考评项目名称',
-        dataIndex: 'name',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '状态',
-        width: 100,
-        dataIndex: 'status',
-        align: 'center',
-        scopedSlots: {
-          customRender: 'enable'
-        }
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadItemData: parameter => {
-        return getItemList().then(res => {
-          if (res.status == 200) {
-            return res.data
-          }
-        })
-      }
-    }
-  },
-  computed: {
-    // 已选择的复选框
-    selectedRowKeys () {
-      const arr = []
-      this.checkedList.map(item => {
-        arr.push(item.assessItemId)
-      })
-      return arr
-    },
-    // 列表项是否可选择的配置
-    rowSelection () {
-      return {
-        columnTitle: '选择', // 选择框标题
-        columnWidth: 80, // 选择框宽度
-        selectedRowKeys: this.selectedRowKeys, // 指定选中项的 key 数组
-        // 选中项发生变化时的回调 selectedRowKeys:指定选中项的 key 数组 selectedRows:已选中的数组数据
-        onChange: (selectedRowKeys, selectedRows) => {
-          const arr = []
-          let index = 0
-  		  // 根据选择项的顺序展示已选列表
-          selectedRowKeys.map(item => {
-            index++
-            const p = selectedRows.find(row => row.id == item)
-            const row = {}
-            if (p) {
-              row.no = index
-			  row.assessItemId = p.id
-			  row.assessItemName = p.name
-			  row.assessSchemeId = this.itemId
-              arr.push(row)
-            }
-          })
-          this.checkedList = arr
-          // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-        },
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.status == '0' // 禁用状态不可选
-          }
-        })
-      }
-    }
-  },
-  methods: {
-    // 获取已选列表数据
-    getCheckedList () {
-      planItemQuery({ assessSchemeId: this.itemId }).then(res => {
-        if (res.status == 200) {
-          this.checkedList = res.data
-          this.checkedList.map((item, index) => {
-            item.no = index + 1
-          })
-        } else {
-          this.checkedList = []
-          this.$message.warning(res.message)
-        }
-      })
-    },
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.clear()
-      this.$emit('close')
-    },
-    // 上移
-    moveUp (index) {
-      this.moveArr(index, index - 1)
-    },
-    // 下移
-    moveDown (index) {
-      this.moveArr(index, index + 1)
-    },
-    // 置顶
-    moveTop (index) {
-      this.goToArr(index, 1)
-    },
-    // 置底
-    moveBottom (index) {
-      this.goToArr(index, 0)
-    },
-    // 置顶和置底
-    goToArr (index, type) {
-      const arr = this.checkedList
-      const row = arr[index]
-      arr.splice(index, 1)
-      if (type) {
-        arr.unshift(row)
-      } else {
-        arr.push(row)
-      }
-      arr.map((item, index) => {
-        item.no = index + 1
-      })
-    },
-    // 移动
-    moveArr (index1, index2) {
-      const arr = this.checkedList
-      arr[index1] = arr.splice(index2, 1, arr[index1])[0]
-      arr.map((item, index) => {
-        item.no = index + 1
-      })
-      this.checkedList = arr
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          if (!this.checkedList.length) {
-            return this.$message.warning('请先选择考评项目')
-          }
-		  this.loading = true
-          planItemSave(this.checkedList).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.clear()
-          _this.cancel()
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
-    }
-
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'SetEvaModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.title {
-		font-size: 16px;
-		color: black;
-		padding-bottom: 30px;
-	}
-
-	.actionBtn {
-		font-size: 12px;
-		margin: 0 5px;
-	}
-
-	.green {
-		color: #16b50e;
-	}
-
-	.grey {
-		color: rgb(153, 153, 153);
-	}
-
-	.footer {
-		margin-top: 20px;
-	}
-</style>

+ 2 - 6
src/views/tenants/tenantsList.vue → src/views/shop/shopOrder.vue

@@ -46,8 +46,6 @@
         <span :class="[text==1 ? 'green' : 'red']">{{ text==1 ? '已启用' : '已禁用' }}</span>
       </template>
     </s-table>
-    <!-- 新增/编辑 弹窗 -->
-    <tenantsModal :itemId="itemId" :visible="openTenantsModal" @refresh="reset()" @close="openTenantsModal=false"></tenantsModal>
   </a-card>
 
 </template>
@@ -61,14 +59,12 @@ import {
   getTenantsList,
   tenantsDelete
 } from '@/api/tenants.js'
-import tenantsModal from './tenantsModal.vue'
 import moment from 'moment'
 export default {
-  name: 'TenantsList',
+  name: 'ShopOrder',
   components: {
     STable,
-    VSelect,
-    tenantsModal
+    VSelect
   },
   data () {
     return {

+ 0 - 397
src/views/tenants/tenantsModal.vue

@@ -1,397 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      centered
-      class="modalBox"
-      :footer="null"
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="900">
-      <a-form :form="form" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <!-- 企业名称 -->
-            <a-form-item label="企业名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                :maxLength="30"
-                v-decorator="['formData.name', { initialValue: formData.name,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入企业名称!' }] }]"
-                placeholder="请输入企业名称(最多30个字符)"
-              />
-            </a-form-item>
-          </a-col>
-          <!-- 企业编码 -->
-          <!-- 本次迭代先隐藏 -->
-          <!-- <a-col :span="12">
-            <a-form-item label="企业编码:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input allowClear :maxLength="30" v-decorator="['formData.bizCode', { initialValue: formData.bizCode,getValueFromEvent: $filterEmpty }]" placeholder="请输入企业编码" />
-            </a-form-item>
-          </a-col> -->
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <!-- 负责人名称 -->
-            <a-form-item label="负责人名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input allowClear :maxLength="30" v-decorator="['formData.contactName', { initialValue: formData.contactName,getValueFromEvent: $filterEmpty, rules: [] }]" placeholder="请输入负责人名称(最多30个字符)" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <!-- 负责人手机 -->
-            <a-form-item label="负责人手机:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                :disabled="itemId?true:false"
-                :maxLength="11"
-                v-decorator="[
-                  'formData.contactPhone',
-                  { initialValue: formData.contactPhone, rules: [{ required: true, message: '请输入负责人手机号!' }, { pattern: /^\d{11}$/, message: '请输入正确的负责人手机号' }] }
-                ]"
-                placeholder="请输入负责人手机"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <!-- 使用有效期至 -->
-            <a-form-item label="使用有效期至:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-date-picker
-                style="width: 100%;"
-                :disabled-date="disabledDate"
-                @change="expireDateChange"
-                placeholder="年/月/日"
-                v-decorator="['formData.expireDate', { initialValue: formData.expireDate, rules: [{ type: 'object', required: true, message: '请选择使用有效期!' }] }]"
-              />
-              <p>
-                常选:
-                <span class="time-text" @click="timeFilter(3)">3天</span>
-                <span class="time-text" @click="timeFilter(30)">1个月</span>
-                <span class="time-text" @click="timeFilter(365)">1年</span>
-              </p>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <!-- 启用状态 -->
-            <a-form-item label="启用状态:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-radio-group @change="onStatusChange" v-decorator="['formData.status', { initialValue: formData.status, rules: [{ required: true, message: '请选择启用状态!' }] }]">
-                <a-radio :value="1">是</a-radio>
-                <a-radio :value="0">否</a-radio>
-              </a-radio-group>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row>
-          <a-col :span="12">
-            <!-- 使用权限 -->
-            <a-form-item label="使用权限:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <v-select
-                ref="orgType"
-                allowClear
-                @change="scopeTypeChange"
-                v-decorator="['formData.scopeType', { initialValue: formData.scopeType, rules: [{ required: true, message: '请选择使用权限!' }] }]"
-                code="STORE_AUTH_TYPE"
-              ></v-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <!-- 地址 -->
-          <a-col span="9">
-            <a-form-item label="地址:" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-select @change="getCityList" v-decorator="['formData.addrProvince', { initialValue: formData.addrProvince, rules: [] }]" placeholder="请选择省">
-                <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col span="7">
-            <a-form-item prop="addrCity">
-              <a-select v-decorator="['formData.addrCity', { initialValue: formData.addrCity, rules: [] }]" @change="getAreaList" placeholder="请选择市">
-                <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col span="7">
-            <a-form-item prop="addrDistrict">
-              <a-select v-decorator="['formData.addrDistrict', { initialValue: formData.addrDistrict, rules: [] }]" @change="areaCharged" placeholder="请选择区/县">
-                <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="17">
-            <!-- 详细地址 -->
-            <a-form-item label="详细地址" :label-col="{ span: 4 }" :wrapper-col="{ span: 18 }">
-              <a-input :maxLength="30" allowClear placeholder="请输入详细地址(最多30个字符)" v-decorator="['formData.addrDetail', { initialValue: formData.addrDetail,getValueFromEvent: $filterEmpty, rules: [] }]" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button type="primary" @click="handleSubmit()">保存</a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="cancel()">取消</a-button>
-        </a-form-item>
-      </a-form>
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import { getProvince, getCityByPro, getDistrictByCity, tenantsDetail, tenantsSave } from '@/api/tenants.js'
-import moment from 'moment'
-export default {
-  name: 'TenantsModal',
-  components: {
-    STable,
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的租户id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        if (this.itemId) {
-          this.getDetail(this.itemId)
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      moment,
-      isshow: this.visible,
-      form: this.$form.createForm(this, {
-        name: 'tenantsModal'
-      }),
-      addrProvinceList: [], // 省列表
-      addrCityList: [], // 市列表
-      addrDistrictList: [], // 区列表
-      formData: {
-        name: '', // 企业名称
-        bizCode: '', // 企业编码
-        contactName: '', // 负责人名称
-        contactPhone: '', // 负责人电话
-        expireDate: null, // 使用有效期
-        scopeType: '', // 权限类型
-        status: 1, // 启用状态
-        addrProvince: undefined,
-        addrCity: undefined,
-        addrDistrict: undefined,
-        addrDetail: '' // 详细地址
-      }
-    }
-  },
-  computed: {
-    titleText () {
-      return this.itemId ? '编辑' : '新增'
-    }
-  },
-  mounted () {
-    this.getProvinceList()
-  },
-  methods: {
-    cancel (e) {
-      this.clear()
-      this.$emit('close')
-    },
-    // 不可选日期 今天以前日期不可选
-    disabledDate (current) {
-      return current && current.valueOf() < Date.now() - 86400000
-    },
-    pageInit () {
-      this.formData = {
-        name: '', // 企业名称
-        bizCode: '', // 企业编码
-        contactName: '', // 负责人名称
-        contactPhone: '', // 负责人电话
-        expireDate: null, // 使用有效期
-        scopeType: '', // 权限类型
-        status: 1, // 启用状态
-        addrProvince: undefined,
-        addrCity: undefined,
-        addrDistrict: undefined,
-        addrDetail: '' // 详细地址
-      }
-    },
-    // 查详情
-    getDetail (id) {
-      tenantsDetail({ id: id }).then(res => {
-        // console.log(res, 'rrrrrrr')
-        if (res.status == 200) {
-          // 获取市列表数据
-          this.getCityListRequest(res.data.addrProvince)
-          // 获取区列表数据
-          this.getAreaListRequest(res.data.addrCity)
-          this.formData = Object.assign(this.formData, res.data)
-          const now = moment().add(7, 'day').format('YYYY-MM-DD')
-          const expireDate = moment(now, 'YYYY-MM-DD')
-          this.formData.expireDate = this.formData.expireDate ? moment(this.formData.expireDate, 'YYYY-MM-DD') : expireDate
-          this.form.setFields({ 'formData.expireDate': { value: this.formData.expireDate, errors: '' } })
-          this.formData.status = Number(this.formData.status)
-
-          console.log(this.formData, 'this.formData')
-        }
-      })
-    },
-    // 获取省列表'
-    getProvinceList () {
-      getProvince().then(res => {
-        // console.log(res, 'rrrrrrr')
-        if (res.status == 200) {
-          this.addrProvinceList = res.data || []
-        } else {
-          this.addrProvinceList = []
-        }
-      })
-    },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.form.setFields({ 'formData.addrCity': { value: undefined, errors: '' } })
-      this.form.setFields({ 'formData.addrDistrict': { value: undefined, errors: '' } })
-      this.form.setFields({ 'formData.addrDetail': { value: undefined, errors: '' } })
-      this.getCityListRequest(val)
-    },
-    getCityListRequest (val) {
-      getCityByPro({
-        id: val
-      }).then(res => {
-        if (res.status == 200) {
-          this.addrCityList = res.data || []
-        } else {
-          this.addrCityList = []
-        }
-      })
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.form.setFields({ 'formData.addrDistrict': { value: undefined, errors: '' } })
-      this.form.setFields({ 'formData.addrDetail': { value: undefined, errors: '' } })
-      this.getAreaListRequest(val)
-    },
-    getAreaListRequest (val) {
-      getDistrictByCity({
-        id: val
-      }).then(res => {
-        if (res.status == 200) {
-          this.addrDistrictList = res.data || []
-        } else {
-          this.addrDistrictList = []
-        }
-      })
-    },
-    // 区县变更
-    areaCharged (val) {
-      this.form.setFields({ 'formData.addrDetail': { value: undefined, errors: '' } })
-    },
-    // 有效期改变
-    expireDateChange (v) {
-      console.log(v)
-      this.form.setFields({
-        'formData.expireDate': {
-          value: v,
-          errors: ''
-        }
-      })
-    },
-    // 使用权限改变
-    scopeTypeChange (v) {
-      this.form.setFields({ 'formData.scopeType': { value: v, errors: '' } })
-    },
-    // 启用状态切换
-    onStatusChange (v) {
-      console.log(v, 'vvvvvvvvvv')
-      this.formData.status = v
-    },
-    // 快捷时间处理
-    timeFilter (time) {
-      const now = moment()
-        .add(time, 'day')
-        .format('YYYY-MM-DD')
-      this.form.setFields({
-        'formData.expireDate': {
-          value: moment(now, 'YYYY-MM-DD'),
-          errors: ''
-        }
-      })
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          const params = this.itemId
-            ? Object.assign(
-              {
-                id: this.itemId
-              },
-              values.formData
-            )
-            : values.formData
-          params.expireDate = moment(params.expireDate).format('YYYY-MM-DD')
-          tenantsSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.error(res.message);
-            }
-          })
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
-      this.pageInit()
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'tenantsModal'
-    })
-  }
-}
-</script>
-
-<style>
-.modalBox {
-}
-
-.ant-modal-footer {
-  display: none;
-}
-
-.time-text {
-  color: #1890ff;
-  padding: 0px 20px;
-  cursor: pointer;
-}
-
-.labelT {
-  position: absolute;
-  left: -135px;
-  top: 20px;
-  color: rgba(0, 0, 0, 0.85);
-}
-</style>