Explorar o código

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
修改 提交

1004749546@qq.com %!s(int64=4) %!d(string=hai) anos
pai
achega
6d90170e9b

+ 9 - 6
src/views/evaluation/evaluationItem/AddEvaIndexModal.vue

@@ -8,6 +8,7 @@
             <a-form-item label="考评指标名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               <a-input
                 allowClear
+				id="addEvaIndexModal-name"
                 :maxLength="128"
                 v-decorator="[
                   'formData.name',
@@ -19,10 +20,10 @@
           </a-col>
         </a-row>
         <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button :loading="loading" id="addEvaIndexModal-submit" type="primary" @click="handleSubmit()">
             确定
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button id="addEvaIndexModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
             取消
           </a-button>
         </a-form-item>
@@ -78,7 +79,8 @@ export default {
       }),
       formData: {
         name: '' // 指标名称
-      }
+      },
+	  loading: false // 确定按钮loading
 
     }
   },
@@ -98,7 +100,7 @@ export default {
     getData (id) {
       itemIndexDetail({ id: id }).then(res => {
         if (res.status == 200) {
-          console.log(res, 'rrrrrrrrrr')
+          // console.log(res, 'rrrrrrrrrr')
           this.form.setFieldsValue({ 'formData.name': res.data.name })
         }
       })
@@ -108,9 +110,9 @@ export default {
       const _this = this
       this.form.validateFields((err, values) => {
         if (!err) {
-          console.log(values.formData, ' formData.type222222222')
+			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')
+          // console.log(params, 'ppppppppppppp')
           itemIndexSave(params).then(res => {
             console.log(res, 'res--save')
             if (res.status + '' === '200') {
@@ -122,6 +124,7 @@ export default {
             } else {
               // this.$message.warning(res.message)
             }
+			this.loading = false
           })
         }
       })

+ 10 - 6
src/views/evaluation/evaluationItem/AddEvaItemModal.vue

@@ -8,6 +8,7 @@
             <a-form-item label="考评项目名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               <a-input
                 allowClear
+                id="addEvaItemModal-name"
                 :maxLength="128"
                 v-decorator="[
                   'formData.name',
@@ -24,6 +25,7 @@
             <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}"
@@ -36,10 +38,10 @@
           </a-col>
         </a-row>
         <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button :loading="loading" id="addEvaItemModal-submit" type="primary" @click="handleSubmit()">
             确定
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button id="addEvaItemModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
             取消
           </a-button>
         </a-form-item>
@@ -100,8 +102,8 @@ export default {
       formData: {
         name: '', // 方案名称
         desc: '' // 方案说明
-      }
-
+      },
+	  loading: false // 确定按钮loading
     }
   },
   computed: {
@@ -123,7 +125,7 @@ export default {
         id: id
       }).then(res => {
         if (res.status == 200) {
-          console.log(res, 'rrrrrrrrrr')
+          // console.log(res, 'rrrrrrrrrr')
           this.formData = Object.assign(this.formData, res.data)
           console.log(this.formData, 'this.formData')
         }
@@ -133,10 +135,11 @@ export default {
     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')
+          // console.log(params, 'ppppppppppppp')
           itemSave(params).then(res => {
             console.log(res, 'res--save')
             if (res.status + '' === '200') {
@@ -148,6 +151,7 @@ export default {
             } else {
               // this.$message.warning(res.message)
             }
+            this.loading = false
           })
         }
       })

+ 15 - 9
src/views/evaluation/evaluationItem/EvaluationItem.vue

@@ -5,24 +5,30 @@
         <a-row :gutter="48">
           <a-col :span="6">
             <a-form-item label="考评项目名称">
-              <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入企业名称" />
+              <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 ref="status" allowClear placeholder="状态" v-model="queryParam.status" code="CHECK_ENABLE_STATE"></v-select>
+              <v-select
+                id="evaluationItem-status"
+                ref="status"
+                allowClear
+                placeholder="状态"
+                v-model="queryParam.status"
+                code="CHECK_ENABLE_STATE"></v-select>
             </a-form-item>
           </a-col>
           <a-col :span="6">
-            <a-button type="primary" style="margin-right: 10px;" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button type="" @click="reset">重置</a-button>
+            <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 type="primary" icon="plus" @click="openModal">新建</a-button>
+      <a-button id="evaluationItem-add" type="primary" icon="plus" @click="openModal">新建</a-button>
     </div>
     <s-table
       ref="table"
@@ -33,13 +39,13 @@
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-icon type="edit" class="actionBtn blue" v-if="record.status == '0'" @click="openModal(record)" />
-        <a-icon type="delete" class="actionBtn red" v-if="record.status == '0'" @click="delect(record)" />
-        <a-icon type="setting" class="actionBtn orange" @click="handleSet(record)" />
+        <a-icon id="evaluationItem-edit" type="edit" class="actionBtn blue" v-if="record.status == '0'" @click="openModal(record)" />
+        <a-icon id="evaluationItem-delete" type="delete" class="actionBtn red" v-if="record.status == '0'" @click="delect(record)" />
+        <a-icon id="evaluationItem-setting" type="setting" class="actionBtn orange" @click="handleSet(record)" />
       </template>
       <!-- 启用禁用 -->
       <template slot="enable" slot-scope="text, row">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)"/>
+        <a-switch id="evaluationItem-enableStatus" checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)"/>
       </template>
     </s-table>
     <!-- 新增/编辑 弹窗 -->

+ 3 - 3
src/views/evaluation/evaluationItem/SetEvaItemModal.vue

@@ -3,7 +3,7 @@
     <a-modal class="modalBox" title="设置考评指标" v-model="isshow" @cancle="cancel" :width="'60%'">
       <a-row :gutter="24" class="header">
         <span>请给考评项目为【{{ itemName }}】设置考评指标</span>
-        <a-button type="primary" @click="openModal">新增</a-button>
+        <a-button id="setEvaItemModal-add" type="primary" @click="openModal">新增</a-button>
       </a-row>
       <a-table
         ref="table"
@@ -15,8 +15,8 @@
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-icon type="edit" class="actionBtn blue" @click="openModal(record)" />
-          <a-icon type="delete" class="actionBtn red" @click="delect(record)" />
+          <a-icon id="setEvaItemModal-edit" type="edit" class="actionBtn blue" @click="openModal(record)" />
+          <a-icon id="setEvaItemModal-delete" type="delete" class="actionBtn red" @click="delect(record)" />
         </template>
       </a-table>
       <!-- 新增/编辑 弹窗 -->

+ 9 - 2
src/views/evaluation/evaluationPlan/AddEvaModal.vue

@@ -8,6 +8,7 @@
             <a-form-item label="考评方案名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               <a-input
                 allowClear
+                id="addEvaModal-name"
                 :maxLength="128"
                 v-decorator="[
                   'formData.name',
@@ -25,6 +26,7 @@
             <a-form-item label="适用模式:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
               <!-- <v-select
                 ref="orgType"
+				id="addEvaModal-scopeType"
                 allowClear
                 mode="multiple"
                 @change="scopeTypeChange"
@@ -37,6 +39,7 @@
               <a-select
                 mode="multiple"
                 allowClear
+                id="addEvaModal-scopeType"
                 placeholder="请选择适用模式"
                 @change="scopeTypeChange"
                 v-decorator="[
@@ -57,6 +60,7 @@
             <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}"
@@ -69,10 +73,10 @@
           </a-col>
         </a-row>
         <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button :loading="loading" id="addEvaModal-submit" type="primary" @click="handleSubmit()">
             确定
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button id="addEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
             取消
           </a-button>
         </a-form-item>
@@ -133,6 +137,7 @@ export default {
         scopeType: [], // 适用类型
         desc: '' // 方案说明
       },
+	  loading: false, // 确定按钮loading
       options: [{
         code: 'VIDEO_INSPECTION',
         dispName: '视频巡店',
@@ -188,6 +193,7 @@ export default {
       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
@@ -204,6 +210,7 @@ export default {
             } else {
               // this.$message.warning(res.message)
             }
+            this.loading = false
           })
         }
       })

+ 16 - 10
src/views/evaluation/evaluationPlan/EvaluationPlan.vue

@@ -5,25 +5,31 @@
         <a-row :gutter="48">
           <a-col :span="6">
             <a-form-item label="方案名称">
-              <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入企业名称" />
+              <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 ref="status" allowClear placeholder="状态" v-model="queryParam.status" code="CHECK_ENABLE_STATE"></v-select>
+              <v-select
+                id="evaluationPlan-status"
+                ref="status"
+                allowClear
+                placeholder="状态"
+                v-model="queryParam.status"
+                code="CHECK_ENABLE_STATE"></v-select>
             </a-form-item>
           </a-col>
           <a-col :span="6">
-            <a-button type="primary" style="margin-right: 10px;" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button type="" @click="reset">重置</a-button>
+            <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 type="primary" icon="plus" @click="openModal">新建</a-button>
-      <a-col @click="handleDefaultSet">
+      <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>
@@ -37,13 +43,13 @@
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-icon type="edit" class="actionBtn blue" v-if="record.status == '0'" @click="openModal(record)" />
-        <a-icon type="delete" class="actionBtn red" v-if="record.status == '0'" @click="delect(record)" />
-        <a-icon type="setting" class="actionBtn orange" @click="handleSet(record)" />
+        <a-icon id="evaluationPlan-edit" type="edit" class="actionBtn blue" v-if="record.status == '0'" @click="openModal(record)" />
+        <a-icon id="evaluationPlan-delete" type="delete" class="actionBtn red" v-if="record.status == '0'" @click="delect(record)" />
+        <a-icon id="evaluationPlan-setting" type="setting" class="actionBtn orange" @click="handleSet(record)" />
       </template>
       <!-- 启用禁用 -->
       <template slot="enable" slot-scope="text, row">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)" />
+        <a-switch id="evaluationPlan-enableStatus" checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)" />
       </template>
     </s-table>
     <!-- 新增/编辑 弹窗 -->

+ 8 - 3
src/views/evaluation/evaluationPlan/SetEvaDefaultModal.vue

@@ -7,6 +7,7 @@
             <!-- 视频巡店默认方案 -->
             <a-form-item label="视频巡店默认方案:" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
               <a-select
+                id="setEvaDefaultModal-videoType"
                 @change="videoTypeChange"
                 v-decorator="[
                   'formData.videoType',
@@ -27,6 +28,7 @@
             <!-- 现场巡店默认方案 -->
             <a-form-item label="现场巡店默认方案:" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
               <a-select
+                id="setEvaDefaultModal-spotType"
                 placeholder="请选择考评方案(单选)"
                 @change="spotTypeChange"
                 v-decorator="[
@@ -47,10 +49,10 @@
           </a-col>
         </a-row>
         <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button type="primary" @click="handleSubmit()">
+          <a-button :loading="loading" id="setEvaDefaultModal-submit" type="primary" @click="handleSubmit()">
             确定
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button id="setEvaDefaultModal-cancle" :style="{ marginLeft: '8px' }" @click="handleCancel()">
             取消
           </a-button>
         </a-form-item>
@@ -118,7 +120,8 @@ export default {
         videoType: undefined, // 视频巡店默认方案
         spotType: undefined // 现场巡店默认方案
       },
-      planList: [] // 考评方案列表
+      planList: [], // 考评方案列表
+	  loading: false // 确定按钮loading
     }
   },
   computed: {},
@@ -162,6 +165,7 @@ export default {
       const _this = this
       this.form.validateFields((err, values) => {
         if (!err) {
+          this.loading = true
           const params = [{
             assessId: values.formData.videoType,
             scopeType: 'VIDEO_INSPECTION'
@@ -183,6 +187,7 @@ export default {
             } else {
               // this.$message.warning(res.message)
             }
+            this.loading = false
           })
         }
       })

+ 9 - 2
src/views/evaluation/evaluationPlan/SetEvaModal.vue

@@ -24,6 +24,7 @@
                 <!-- 操作 -->
                 <template slot="action" slot-scope="text, record, index">
                   <a-button
+                    id="setEvaModal-moveUp"
                     type="primary"
                     ghost
                     size="small"
@@ -32,6 +33,7 @@
                     v-if="index>0"
                     icon="arrow-up">上移</a-button>
                   <a-button
+                    id="setEvaModal-moveDown"
                     type="primary"
                     ghost
                     size="small"
@@ -40,6 +42,7 @@
                     v-if="index < checkedList.length-1"
                     icon="arrow-down">下移</a-button>
                   <a-button
+                    id="setEvaModal-moveTop"
                     type="danger"
                     ghost
                     size="small"
@@ -48,6 +51,7 @@
                     v-if="index>0"
                     icon="up">置顶</a-button>
                   <a-button
+                    id="setEvaModal-moveBottom"
                     type="danger"
                     ghost
                     size="small"
@@ -82,10 +86,10 @@
             </a-col>
           </a-card>
           <a-form-item class="footer" :wrapper-col="{ span: 24, offset: 12 }">
-            <a-button type="primary" @click="handleSubmit()">
+            <a-button :loading="loading" id="setEvaModal-submit" type="primary" @click="handleSubmit()">
               保存
             </a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+            <a-button id="setEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
               取消
             </a-button>
           </a-form-item>
@@ -147,6 +151,7 @@ export default {
       form: this.$form.createForm(this, {
         name: 'SetEvaModal'
       }),
+	  loading: false, // 确定按钮loading
       // 已选考评项数据
       checkedList: [], // 已选考评项列表
       // 表头
@@ -309,6 +314,7 @@ export default {
           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') {
@@ -320,6 +326,7 @@ export default {
             } else {
               // this.$message.warning(res.message)
             }
+            this.loading = false
           })
         }
       })

+ 19 - 18
src/views/tenants/tenantsModal.vue

@@ -174,7 +174,7 @@ import {
   VSelect
 } from '@/components'
 import {
-  saveAuth
+  tenantsSave
 } from '@/api/tenants.js'
 import moment from 'moment'
 export default {
@@ -258,6 +258,7 @@ export default {
     // 启用状态切换
     onStatusChange (v) {
       console.log(v, 'vvvvvvvvvv')
+	  this.formData.status = v
     },
     // 快捷时间处理
     timeFilter (time) {
@@ -276,23 +277,23 @@ export default {
       this.form.validateFields((err, values) => {
         if (!err) {
           console.log(values.formData, ' formData.type222222222')
-          // const params = Object.assign({
-          //   id: this.itemData.id
-          // }, values.formData)
-          // params.expireDate = moment(params.expireDate).format('YYYY-MM-DD')
-          // console.log(params, 'ppppppppppppp')
-          // saveAuth(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)
-          //   }
-          // })
+          const params = this.itemId ? Object.assign({
+            id: this.itemId
+          }, values.formData) : values.formData
+          params.expireDate = moment(params.expireDate).format('YYYY-MM-DD')
+          console.log(params, 'ppppppppppppp')
+          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.warning(res.message)
+            }
+          })
         }
       })
     },