wyling 4 лет назад
Родитель
Сommit
cd78467c85

+ 16 - 2
src/views/coach/evaluate/index.vue

@@ -55,7 +55,7 @@
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button v-hasPermi="['coach:evaluate:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+          <el-button v-hasPermi="['coach:evaluate:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)"
             >详情</el-button
           >
           <el-button v-hasPermi="['coach:evaluate:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
@@ -123,7 +123,7 @@
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button v-if="submitFlag" type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -143,6 +143,8 @@ export default {
       dict: {
         dictArr: [{ name: 'data_status_query', type: 1 }]
       },
+      // 详情确定按钮隐藏
+      submitFlag: false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -238,6 +240,17 @@ export default {
       this.reset()
       this.open = true
       this.title = '添加教练评价'
+    },
+     /** 详情按钮操作 */
+    handleDetail(row) {
+      this.reset()
+      const id = row.id || this.ids
+      getEvaluate(id).then(response => {
+        this.form = response.data
+        this.open = true
+        this.title = '教练评价详情'
+        this.submitFlag = false
+      })
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -247,6 +260,7 @@ export default {
         this.form = response.data
         this.open = true
         this.title = '修改教练评价'
+        this.submitFlag = true
       })
     },
     /** 提交按钮 */

+ 16 - 2
src/views/coach/info/index.vue

@@ -135,7 +135,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
+            @click="handleDetail(scope.row)"
           >详情</el-button>
           <el-button
             v-hasPermi="['coach:info:edit']"
@@ -289,7 +289,7 @@
       </el-form>
       
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button v-if="submitFlag" type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -314,6 +314,8 @@ export default {
       dict:{
         dictarr:[],
       },
+       // 详情确定按钮隐藏
+      submitFlag: false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -423,6 +425,17 @@ export default {
       this.open = true
       this.title = '添加教练'
     },
+    /** 详情按钮操作 */
+    handleDetail(row) {
+      this.reset()
+      const coachnum = row.id || this.ids
+      getInfo(coachnum).then(response => {
+        this.form = response.data
+        this.open = true
+        this.title = '教练详情'
+        this.submitFlag = false
+      })
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset()
@@ -431,6 +444,7 @@ export default {
         this.form = response.data
         this.open = true
         this.title = '修改教练'
+        this.submitFlag = true
       })
     },
     /** 提交按钮 */

+ 17 - 3
src/views/school/classType/index.vue

@@ -45,7 +45,7 @@
       <el-table-column label="每分钟多少钱" align="center" prop="minPrice" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button v-hasPermi="['school:classType:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+          <el-button v-hasPermi="['school:classType:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)"
             >详情</el-button
           >
           <el-button v-hasPermi="['school:classType:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
@@ -253,7 +253,7 @@
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button v-if="submitFlag" type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -277,6 +277,8 @@ export default {
           { name: 'school_pxcx', type: 1 },
         ]
       },
+      // 详情确定按钮隐藏
+      submitFlag: false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -386,6 +388,17 @@ export default {
       this.open = true
       this.title = '添加班型管理'
     },
+    /** 详情按钮操作 */
+    handleDetail(row) {
+      this.reset()
+      const id = row.id || this.ids
+      getClassType(id).then(response => {
+        this.form = response.data
+        this.open = true
+        this.title = '班型详情'
+        this.submitFlag = false
+      })
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset()
@@ -393,7 +406,8 @@ export default {
       getClassType(id).then(response => {
         this.form = response.data
         this.open = true
-        this.title = '修改班型管理'
+        this.title = '修改班型'
+        this.submitFlag = true
       })
     },
     /** 提交按钮 */

+ 16 - 2
src/views/school/evaluate/index.vue

@@ -40,7 +40,7 @@
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button v-hasPermi="['school:evaluate:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">详情</el-button>
+          <el-button v-hasPermi="['school:evaluate:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)">详情</el-button>
           <el-button v-hasPermi="['school:evaluate:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
           <el-button v-hasPermi="['school:evaluate:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
         </template>
@@ -103,7 +103,7 @@
       </el-form>
 
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button v-if="submitFlag" type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -119,6 +119,8 @@ export default {
   components: { Editor },
   data() {
     return {
+       // 详情确定按钮隐藏
+      submitFlag: false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -215,6 +217,17 @@ export default {
       this.open = true
       this.title = '添加驾校评价'
     },
+    /** 详情按钮操作 */
+    handleDetail(row) {
+      this.reset()
+      const id = row.id || this.ids
+      getEvaluate(id).then(response => {
+        this.form = response.data
+        this.open = true
+        this.title = '驾校评价详情'
+        this.submitFlag = false
+      })
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset()
@@ -223,6 +236,7 @@ export default {
         this.form = response.data
         this.open = true
         this.title = '修改驾校评价'
+        this.submitFlag = true
       })
     },
     /** 提交按钮 */

+ 30 - 6
src/views/school/region/index.vue

@@ -38,7 +38,7 @@
       <el-table-column label="审核状态" align="center" prop="flag" :formatter="$store.getters.dictObj('school_region_status').formatter" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button v-hasPermi="['school:region:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">详情</el-button>
+          <el-button v-hasPermi="['school:region:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)">详情</el-button>
           <el-button v-hasPermi="['school:region:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
           <el-button v-hasPermi="['school:region:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
             >删除</el-button
@@ -60,7 +60,12 @@
               </el-form-item>
               <el-form-item label="教学类型" prop="field118">
                 <el-select v-model="form.type" placeholder="请选择教学类型" clearable size="small">
-                  <el-option v-for="dict in $store.getters.dictObj('school_region_type').option" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+                  <el-option
+                    v-for="dict in $store.getters.dictObj('school_region_type').option"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  />
                 </el-select>
               </el-form-item>
               <el-form-item label="行政区域" prop="field119">
@@ -75,9 +80,13 @@
             <el-row :gutter="15">
               <el-form-item label="培训车型" prop="field122">
                 <el-checkbox-group v-model="formarr" size="medium">
-                  <el-checkbox v-for="(item, index) in $store.getters.dictObj('school_pxcx').option" :key="index" :label="item.dictLabel" :disabled="item.disabled">{{
-                    item.dictLabel
-                  }}</el-checkbox>
+                  <el-checkbox
+                    v-for="(item, index) in $store.getters.dictObj('school_pxcx').option"
+                    :key="index"
+                    :label="item.dictLabel"
+                    :disabled="item.disabled"
+                    >{{ item.dictLabel }}</el-checkbox
+                  >
                 </el-checkbox-group>
               </el-form-item>
             </el-row>
@@ -92,7 +101,7 @@
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button v-if="submitFlag" type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -153,6 +162,8 @@ export default {
           { name: 'school_region_status', type: 1 }
         ]
       },
+       // 详情确定按钮隐藏
+      submitFlag: false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -270,6 +281,18 @@ export default {
       this.open = true
       this.title = '添加场地管理'
     },
+    /** 详情按钮操作 */
+    handleDetail(row) {
+      this.reset()
+      const id = row.id || this.ids
+      getRegion(id).then(response => {
+        this.formarr = response.data.vehicletype.split(',')
+        this.form = response.data
+        this.open = true
+        this.title = '场地详情'
+        this.submitFlag = false
+      })
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset()
@@ -279,6 +302,7 @@ export default {
         this.form = response.data
         this.open = true
         this.title = '修改场地管理'
+        this.submitFlag = true
       })
     },
     /** 提交按钮 */