设备管理,人员管理接口修改
This commit is contained in:
		
							parent
							
								
									cd1e57cba4
								
							
						
					
					
						commit
						64bb645bbe
					
				| 
						 | 
					@ -76,4 +76,73 @@ export function getKitchenDeviceUsageApi(data) {
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        params: data
 | 
					        params: data
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 查询设备位置列表
 | 
				
			||||||
 | 
					export function getKitchenSubPlaceListApi(data) {
 | 
				
			||||||
 | 
					    return request({
 | 
				
			||||||
 | 
					        url: '/smart-canteen/kitchen_sub_place/list',
 | 
				
			||||||
 | 
					        method: 'get',
 | 
				
			||||||
 | 
					        headers: {
 | 
				
			||||||
 | 
					            "merchant-id":"378915229716713472",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        params: data
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 查询设备位置列表-全量
 | 
				
			||||||
 | 
					export function getKitchenSubPlaceListAllApi(data) {
 | 
				
			||||||
 | 
					    return request({
 | 
				
			||||||
 | 
					        url: '/smart-canteen/kitchen_sub_place/listAll',
 | 
				
			||||||
 | 
					        method: 'get',
 | 
				
			||||||
 | 
					        headers: {
 | 
				
			||||||
 | 
					            "merchant-id":"378915229716713472",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        params: data
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					// 设备新增位置
 | 
				
			||||||
 | 
					export function addKitchenSubPlaceApi(data) {
 | 
				
			||||||
 | 
					    return request({
 | 
				
			||||||
 | 
					        url: '/smart-canteen/kitchen_sub_place',
 | 
				
			||||||
 | 
					        method: 'post',
 | 
				
			||||||
 | 
					        headers: {
 | 
				
			||||||
 | 
					            "merchant-id":"378915229716713472",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        data: data
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 修改设备位置
 | 
				
			||||||
 | 
					export function editKitchenSubPlaceApi(data) {
 | 
				
			||||||
 | 
					    return request({
 | 
				
			||||||
 | 
					        url: '/smart-canteen/kitchen_sub_place/edit',
 | 
				
			||||||
 | 
					        method: 'post',
 | 
				
			||||||
 | 
					        headers: {
 | 
				
			||||||
 | 
					            "merchant-id":"378915229716713472",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        data: data
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 删除设备位置
 | 
				
			||||||
 | 
					export function delKitchenSubPlaceApi(Id) {
 | 
				
			||||||
 | 
					    return request({
 | 
				
			||||||
 | 
					        url: '/smart-canteen/kitchen_sub_place/del/'+Id,
 | 
				
			||||||
 | 
					        method: 'post',
 | 
				
			||||||
 | 
					        headers: {
 | 
				
			||||||
 | 
					            "merchant-id":"378915229716713472",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,7 +51,7 @@
 | 
				
			||||||
      <el-table-column label="设备名称" align="center" prop="deviceName" :show-overflow-tooltip="true" />
 | 
					      <el-table-column label="设备名称" align="center" prop="deviceName" :show-overflow-tooltip="true" />
 | 
				
			||||||
      <el-table-column label="设备SN码" align="center" prop="deviceSn" :show-overflow-tooltip="true" />
 | 
					      <el-table-column label="设备SN码" align="center" prop="deviceSn" :show-overflow-tooltip="true" />
 | 
				
			||||||
      <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"  />  
 | 
					      <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"  />  
 | 
				
			||||||
      <el-table-column label="位置" align="center" prop="subPlace" :show-overflow-tooltip="true"  />  
 | 
					      <el-table-column label="位置" align="center" prop="subPlaceName" :show-overflow-tooltip="true"  />  
 | 
				
			||||||
      <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
 | 
					      <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
 | 
				
			||||||
        <template slot-scope="scope"> 
 | 
					        <template slot-scope="scope"> 
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
| 
						 | 
					@ -123,11 +123,15 @@
 | 
				
			||||||
                </el-form-item>
 | 
					                </el-form-item>
 | 
				
			||||||
            </el-col>
 | 
					            </el-col>
 | 
				
			||||||
            <el-col :span="12">
 | 
					            <el-col :span="12">
 | 
				
			||||||
                <el-form-item label="位置:" prop="subPlace">
 | 
					                <el-form-item label="设备位置:" prop="subPlace">
 | 
				
			||||||
                    <el-input v-model="form.subPlace"
 | 
					                    <el-select v-model="form.subPlace" style="width: 100%;" placeholder="请选择设备位置">
 | 
				
			||||||
                        placeholder="请输入位置"
 | 
					                        <el-option
 | 
				
			||||||
                        maxlength="11"
 | 
					                            v-for="item in subPlaceOptions"
 | 
				
			||||||
                    />
 | 
					                            :key="item.subPlaceId"
 | 
				
			||||||
 | 
					                            :label="item.subPlaceName"
 | 
				
			||||||
 | 
					                            :value="item.subPlaceId" 
 | 
				
			||||||
 | 
					                        ></el-option>
 | 
				
			||||||
 | 
					                    </el-select>
 | 
				
			||||||
                </el-form-item>
 | 
					                </el-form-item>
 | 
				
			||||||
            </el-col> 
 | 
					            </el-col> 
 | 
				
			||||||
            <el-col :span="24">
 | 
					            <el-col :span="24">
 | 
				
			||||||
| 
						 | 
					@ -146,7 +150,7 @@
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script> 
 | 
					<script> 
 | 
				
			||||||
import { getKitchenDeviceTypeApi, getKitchenDeviceListApi, addKitchenDeviceApi, editKitchenDeviceApi, delKitchenDeviceApi } from "@/api/kitchen/devices";
 | 
					import { getKitchenDeviceTypeApi, getKitchenDeviceListApi, addKitchenDeviceApi, editKitchenDeviceApi, delKitchenDeviceApi,getKitchenSubPlaceListAllApi } from "@/api/kitchen/devices";
 | 
				
			||||||
import { getCanteenByAreaApi } from "@/api/base/stall"; 
 | 
					import { getCanteenByAreaApi } from "@/api/base/stall"; 
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "",
 | 
					  name: "",
 | 
				
			||||||
| 
						 | 
					@ -169,6 +173,7 @@ export default {
 | 
				
			||||||
      tableListData: [],
 | 
					      tableListData: [],
 | 
				
			||||||
      deviceTypeList: [],
 | 
					      deviceTypeList: [],
 | 
				
			||||||
      canteenOptions: [],
 | 
					      canteenOptions: [],
 | 
				
			||||||
 | 
					      subPlaceOptions: [],
 | 
				
			||||||
      // 弹出层标题
 | 
					      // 弹出层标题
 | 
				
			||||||
      title: "",
 | 
					      title: "",
 | 
				
			||||||
      // 是否显示弹出层
 | 
					      // 是否显示弹出层
 | 
				
			||||||
| 
						 | 
					@ -195,6 +200,7 @@ export default {
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() { 
 | 
					  created() { 
 | 
				
			||||||
 | 
					    this.getKitchenSubPlaceList();
 | 
				
			||||||
    this.getCanteenList();
 | 
					    this.getCanteenList();
 | 
				
			||||||
    this.getKitchenDeviceType();
 | 
					    this.getKitchenDeviceType();
 | 
				
			||||||
    this.getList();
 | 
					    this.getList();
 | 
				
			||||||
| 
						 | 
					@ -212,6 +218,12 @@ export default {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 设备类型选项
 | 
				
			||||||
 | 
					      getKitchenSubPlaceList(){
 | 
				
			||||||
 | 
					          getKitchenSubPlaceListAllApi({canteenId:this.form.canteenId}).then((response) => {
 | 
				
			||||||
 | 
					            this.subPlaceOptions = response.rows 
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      // 食堂选项
 | 
					      // 食堂选项
 | 
				
			||||||
      getCanteenList(){
 | 
					      getCanteenList(){
 | 
				
			||||||
          getCanteenByAreaApi({}).then((response) => {
 | 
					          getCanteenByAreaApi({}).then((response) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,298 @@
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="app-container"> 
 | 
				
			||||||
 | 
					    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
 | 
				
			||||||
 | 
					      <el-form-item label="所属区域" prop="areaId">
 | 
				
			||||||
 | 
					        <el-cascader v-model="queryParams.areaId"
 | 
				
			||||||
 | 
					            :options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
 | 
				
			||||||
 | 
					            :props="{ 
 | 
				
			||||||
 | 
					              emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
 | 
				
			||||||
 | 
					              checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
 | 
				
			||||||
 | 
					              value:'id',label:'label'
 | 
				
			||||||
 | 
					            }" clearable @change="handleTreeChange">
 | 
				
			||||||
 | 
					          </el-cascader>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="所属食堂" prop="canteenId">
 | 
				
			||||||
 | 
					        <el-select v-model="queryParams.canteenId" placeholder="请选择所属食堂" clearable style="width: 100%;">
 | 
				
			||||||
 | 
					            <el-option v-for="item in canteenOptions"
 | 
				
			||||||
 | 
					                :key="item.canteenId"
 | 
				
			||||||
 | 
					                :label="item.canteenName"
 | 
				
			||||||
 | 
					                :value="item.canteenId"
 | 
				
			||||||
 | 
					            ></el-option>
 | 
				
			||||||
 | 
					        </el-select> 
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item>
 | 
				
			||||||
 | 
					        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
 | 
				
			||||||
 | 
					        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					    </el-form> 
 | 
				
			||||||
 | 
					    <el-row :gutter="10" class="mb8"> 
 | 
				
			||||||
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
 | 
					        <el-button
 | 
				
			||||||
 | 
					          type="primary"
 | 
				
			||||||
 | 
					          plain
 | 
				
			||||||
 | 
					          icon="el-icon-plus"
 | 
				
			||||||
 | 
					          size="mini"
 | 
				
			||||||
 | 
					          @click="handleAdd"
 | 
				
			||||||
 | 
					        >新增</el-button>
 | 
				
			||||||
 | 
					      </el-col>
 | 
				
			||||||
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
 | 
					    </el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <el-table v-loading="loading" :data="tableListData" height="800">
 | 
				
			||||||
 | 
					      <el-table-column label="序号" align="center" width="80" type="index">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"  />  
 | 
				
			||||||
 | 
					      <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"  />  
 | 
				
			||||||
 | 
					      <el-table-column label="位置名称" align="center" prop="subPlaceName" :show-overflow-tooltip="true"  />  
 | 
				
			||||||
 | 
					      <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
 | 
				
			||||||
 | 
					        <template slot-scope="scope"> 
 | 
				
			||||||
 | 
					          <el-button
 | 
				
			||||||
 | 
					            size="mini"
 | 
				
			||||||
 | 
					            type="text"
 | 
				
			||||||
 | 
					            icon="el-icon-edit"
 | 
				
			||||||
 | 
					            @click="handleUpdate(scope.row)" 
 | 
				
			||||||
 | 
					          >编辑</el-button>
 | 
				
			||||||
 | 
					          <el-button
 | 
				
			||||||
 | 
					            size="mini"
 | 
				
			||||||
 | 
					            type="text"
 | 
				
			||||||
 | 
					            icon="el-icon-delete"
 | 
				
			||||||
 | 
					            @click="handleDelete(scope.row)" 
 | 
				
			||||||
 | 
					          >删除</el-button>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					    </el-table> 
 | 
				
			||||||
 | 
					    <pagination
 | 
				
			||||||
 | 
					      v-show="total>0"
 | 
				
			||||||
 | 
					      :total="total"
 | 
				
			||||||
 | 
					      :page.sync="queryParams.pageNum"
 | 
				
			||||||
 | 
					      :limit.sync="queryParams.pageSize"
 | 
				
			||||||
 | 
					      @pagination="getList"
 | 
				
			||||||
 | 
					    />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 添加或修改参数配置对话框 -->
 | 
				
			||||||
 | 
					    <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
 | 
				
			||||||
 | 
					      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
 | 
				
			||||||
 | 
					        <el-row> 
 | 
				
			||||||
 | 
					            <el-col :span="12">
 | 
				
			||||||
 | 
					                <el-form-item label="所属区域" prop="areaId">
 | 
				
			||||||
 | 
					                  <el-cascader v-model="form.areaId"
 | 
				
			||||||
 | 
					                    :options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
 | 
				
			||||||
 | 
					                    :props="{ 
 | 
				
			||||||
 | 
					                      emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
 | 
				
			||||||
 | 
					                      checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
 | 
				
			||||||
 | 
					                      value:'id',label:'label'
 | 
				
			||||||
 | 
					                    }"
 | 
				
			||||||
 | 
					                    clearable @change="handleTreeChange2" >
 | 
				
			||||||
 | 
					                  </el-cascader>
 | 
				
			||||||
 | 
					                </el-form-item>
 | 
				
			||||||
 | 
					              </el-col> 
 | 
				
			||||||
 | 
					              <el-col :span="12">
 | 
				
			||||||
 | 
					                <el-form-item label="所属食堂" prop="canteenId">
 | 
				
			||||||
 | 
					                  <el-select v-model="form.canteenId" placeholder="请选择所属食堂" style="width: 100%;">
 | 
				
			||||||
 | 
					                      <el-option v-for="item in canteenOptions2"
 | 
				
			||||||
 | 
					                          :key="item.canteenId"
 | 
				
			||||||
 | 
					                          :label="item.canteenName"
 | 
				
			||||||
 | 
					                          :value="item.canteenId"
 | 
				
			||||||
 | 
					                      ></el-option>
 | 
				
			||||||
 | 
					                  </el-select> 
 | 
				
			||||||
 | 
					                </el-form-item>
 | 
				
			||||||
 | 
					              </el-col>  
 | 
				
			||||||
 | 
					            <el-col :span="12">
 | 
				
			||||||
 | 
					                <el-form-item label="位置名称:" prop="subPlaceName">
 | 
				
			||||||
 | 
					                    <el-input v-model="form.subPlaceName"
 | 
				
			||||||
 | 
					                        placeholder="请输入位置名称"
 | 
				
			||||||
 | 
					                        maxlength="30"
 | 
				
			||||||
 | 
					                    />
 | 
				
			||||||
 | 
					                </el-form-item>
 | 
				
			||||||
 | 
					            </el-col> 
 | 
				
			||||||
 | 
					          </el-row> 
 | 
				
			||||||
 | 
					      </el-form>
 | 
				
			||||||
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
 | 
					        <el-button type="primary" @click="submitForm">确 定</el-button>
 | 
				
			||||||
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script> 
 | 
				
			||||||
 | 
					import { getKitchenSubPlaceListApi, addKitchenSubPlaceApi, editKitchenSubPlaceApi, delKitchenSubPlaceApi } from "@/api/kitchen/devices";
 | 
				
			||||||
 | 
					import { systemAreaTreeApi,getCanteenByAreaApi } from "@/api/base/stall"; 
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "",
 | 
				
			||||||
 | 
					  dicts: [],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      // 遮罩层
 | 
				
			||||||
 | 
					      loading: true,
 | 
				
			||||||
 | 
					      // 选中数组
 | 
				
			||||||
 | 
					      ids: [],
 | 
				
			||||||
 | 
					      // 非单个禁用
 | 
				
			||||||
 | 
					      single: true,
 | 
				
			||||||
 | 
					      // 非多个禁用
 | 
				
			||||||
 | 
					      multiple: true,
 | 
				
			||||||
 | 
					      // 显示搜索条件
 | 
				
			||||||
 | 
					      showSearch: true,
 | 
				
			||||||
 | 
					      // 总条数
 | 
				
			||||||
 | 
					      total: 0,
 | 
				
			||||||
 | 
					      //表格数据
 | 
				
			||||||
 | 
					      tableListData: [], 
 | 
				
			||||||
 | 
					      treeOptions:[],//区域树
 | 
				
			||||||
 | 
					      treeProps:{
 | 
				
			||||||
 | 
					        multiple: true,
 | 
				
			||||||
 | 
					        value:"id",
 | 
				
			||||||
 | 
					        label:"label",
 | 
				
			||||||
 | 
					        children:"children",
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      canteenOptions: [],
 | 
				
			||||||
 | 
					      canteenOptions2: [],
 | 
				
			||||||
 | 
					      // 弹出层标题
 | 
				
			||||||
 | 
					      title: "",
 | 
				
			||||||
 | 
					      // 是否显示弹出层
 | 
				
			||||||
 | 
					      open: false, 
 | 
				
			||||||
 | 
					      // 查询参数
 | 
				
			||||||
 | 
					      queryParams: {
 | 
				
			||||||
 | 
					        pageNum: 1,
 | 
				
			||||||
 | 
					        pageSize: 10,
 | 
				
			||||||
 | 
					        canteenName: undefined,
 | 
				
			||||||
 | 
					        areaNameStr: undefined, 
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					      activeName:"1",
 | 
				
			||||||
 | 
					      // 表单参数
 | 
				
			||||||
 | 
					      form: {},
 | 
				
			||||||
 | 
					      // 表单校验
 | 
				
			||||||
 | 
					      rules: {
 | 
				
			||||||
 | 
					        areaId: [
 | 
				
			||||||
 | 
					          { required: true, message: "所属区域不能为空", trigger: "change" }
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        canteenId: [
 | 
				
			||||||
 | 
					          { required: true, message: "所属食堂不能为空", trigger: "change" }
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        subPlaceName: [
 | 
				
			||||||
 | 
					          { required: true, message: "位置名称不能为空", trigger: "blur" }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  created() { 
 | 
				
			||||||
 | 
					    this.getTreeData(); 
 | 
				
			||||||
 | 
					    this.getList();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: { 
 | 
				
			||||||
 | 
					      //区域树
 | 
				
			||||||
 | 
					      getTreeData() {
 | 
				
			||||||
 | 
					        systemAreaTreeApi({}).then((response) => {
 | 
				
			||||||
 | 
					          this.treeOptions = response.data;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      handleTreeChange(e){ 
 | 
				
			||||||
 | 
					        let param= {
 | 
				
			||||||
 | 
					          "areaId":e,
 | 
				
			||||||
 | 
					          "canteenType":1
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        getCanteenByAreaApi(param).then((response) => {
 | 
				
			||||||
 | 
					          this.canteenOptions=response.rows||[]
 | 
				
			||||||
 | 
					          this.queryParams.canteenId=null
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      /** 搜索按钮操作 */
 | 
				
			||||||
 | 
					      handleQuery() {
 | 
				
			||||||
 | 
					          this.queryParams.pageNum = 1;
 | 
				
			||||||
 | 
					          this.getList();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      /** 重置按钮操作 */
 | 
				
			||||||
 | 
					      resetQuery() { 
 | 
				
			||||||
 | 
					          this.resetForm("queryForm");
 | 
				
			||||||
 | 
					          this.handleQuery();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      handleTabClick(tab, event) { 
 | 
				
			||||||
 | 
					            console.log(tab.name,tab.label)
 | 
				
			||||||
 | 
					            this.handleQuery()
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      /** 查询列表 */
 | 
				
			||||||
 | 
					      getList() {
 | 
				
			||||||
 | 
					          this.loading = true;
 | 
				
			||||||
 | 
					          let param = {
 | 
				
			||||||
 | 
					            "deviceType":this.activeName,
 | 
				
			||||||
 | 
					            "keyWord":this.queryParams.keyWord,
 | 
				
			||||||
 | 
					            "deviceNetworkState":this.queryParams.deviceNetworkState,
 | 
				
			||||||
 | 
					            "pageNum": this.queryParams.pageNum, 
 | 
				
			||||||
 | 
					            "pageSize": this.queryParams.pageSize,  
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          getKitchenSubPlaceListApi(param).then(response => {
 | 
				
			||||||
 | 
					              this.tableListData = response.rows;
 | 
				
			||||||
 | 
					              this.total = Number(response.total);
 | 
				
			||||||
 | 
					              this.loading = false;
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					      },  
 | 
				
			||||||
 | 
					      /** 新增按钮操作 */
 | 
				
			||||||
 | 
					      handleAdd() {
 | 
				
			||||||
 | 
					          this.reset();
 | 
				
			||||||
 | 
					          this.open = true;
 | 
				
			||||||
 | 
					          this.title = "新增";
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      /** 修改按钮操作 */
 | 
				
			||||||
 | 
					      handleUpdate(row) {
 | 
				
			||||||
 | 
					          this.reset(); 
 | 
				
			||||||
 | 
					          this.form = Object.assign({}, row)
 | 
				
			||||||
 | 
					          this.open = true;
 | 
				
			||||||
 | 
					          this.title = "修改"; 
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      //基础设置-选择区域
 | 
				
			||||||
 | 
					      handleTreeChange2(val){  
 | 
				
			||||||
 | 
					          if(val){ 
 | 
				
			||||||
 | 
					            let param= {"areaId":val,"canteenType": 1}
 | 
				
			||||||
 | 
					            // 选择区域后获取相应食堂
 | 
				
			||||||
 | 
					            getCanteenByAreaApi(param).then((response) => {
 | 
				
			||||||
 | 
					                this.canteenOptions2=response.rows||[] 
 | 
				
			||||||
 | 
					                this.$set(this.form,"canteenId",null)
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          }   
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      // 取消按钮
 | 
				
			||||||
 | 
					      cancel() {
 | 
				
			||||||
 | 
					          this.open = false;
 | 
				
			||||||
 | 
					          this.reset();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      // 表单重置
 | 
				
			||||||
 | 
					      reset() {
 | 
				
			||||||
 | 
					          this.form = {};
 | 
				
			||||||
 | 
					          this.resetForm("form");
 | 
				
			||||||
 | 
					      }, 
 | 
				
			||||||
 | 
					      /** 提交按钮 */
 | 
				
			||||||
 | 
					      submitForm: function() {
 | 
				
			||||||
 | 
					          this.$refs["form"].validate(valid => {
 | 
				
			||||||
 | 
					            if (valid) {
 | 
				
			||||||
 | 
					              this.form.deviceType = this.activeName
 | 
				
			||||||
 | 
					              if (this.form.subPlaceId != undefined) {
 | 
				
			||||||
 | 
					                  editKitchenSubPlaceApi(this.form).then(response => {
 | 
				
			||||||
 | 
					                      this.$modal.msgSuccess("修改成功");
 | 
				
			||||||
 | 
					                      this.open = false;
 | 
				
			||||||
 | 
					                      this.getList();
 | 
				
			||||||
 | 
					                  });
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                  addKitchenSubPlaceApi(this.form).then(response => {
 | 
				
			||||||
 | 
					                      this.$modal.msgSuccess("新增成功");
 | 
				
			||||||
 | 
					                      this.open = false;
 | 
				
			||||||
 | 
					                      this.getList();
 | 
				
			||||||
 | 
					                  });
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      /** 删除按钮操作 */
 | 
				
			||||||
 | 
					      handleDelete(row) { 
 | 
				
			||||||
 | 
					          this.$modal.confirm('是否确认删除数据项?').then(function() {
 | 
				
			||||||
 | 
					              return delKitchenSubPlaceApi(row.subPlaceId);
 | 
				
			||||||
 | 
					          }).then(() => {
 | 
				
			||||||
 | 
					              this.getList();
 | 
				
			||||||
 | 
					              this.$modal.msgSuccess("删除成功");
 | 
				
			||||||
 | 
					          }).catch(() => {});
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
| 
						 | 
					@ -21,10 +21,10 @@
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item label="健康证" prop="healthCertStatus">
 | 
					        <el-form-item label="健康证" prop="healthCertStatus">
 | 
				
			||||||
            <el-select v-model="queryParams.healthCertStatus" placeholder="健康证状态" style="width: 240px" clearable> 
 | 
					            <el-select v-model="queryParams.healthCertStatus" placeholder="健康证状态" style="width: 240px" clearable> 
 | 
				
			||||||
                <el-option label="正常" value="0"></el-option>
 | 
					                <el-option label="正常" value="1"></el-option>
 | 
				
			||||||
                <el-option label="过期" value="1"></el-option>  
 | 
					                <el-option label="过期" value="2"></el-option>  
 | 
				
			||||||
                <el-option label="缺失" value="2"></el-option>  
 | 
					                <el-option label="缺失" value="3"></el-option>  
 | 
				
			||||||
                <el-option label="临期" value="3"></el-option>  
 | 
					                <el-option label="临期" value="4"></el-option>  
 | 
				
			||||||
            </el-select>   
 | 
					            </el-select>   
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
      <el-form-item>
 | 
					      <el-form-item>
 | 
				
			||||||
| 
						 | 
					@ -661,7 +661,7 @@ export default {
 | 
				
			||||||
            this.accessAuthorityList[index2].deviceName = this.devicesOptions[index].deviceName;
 | 
					            this.accessAuthorityList[index2].deviceName = this.devicesOptions[index].deviceName;
 | 
				
			||||||
            this.accessAuthorityList[index2].deviceType = this.devicesOptions[index].deviceType;
 | 
					            this.accessAuthorityList[index2].deviceType = this.devicesOptions[index].deviceType;
 | 
				
			||||||
            this.accessAuthorityList[index2].privilegeValue = 1;
 | 
					            this.accessAuthorityList[index2].privilegeValue = 1;
 | 
				
			||||||
            this.accessAuthorityList[index2].location = this.devicesOptions[index].subPlace;
 | 
					            this.accessAuthorityList[index2].location = this.devicesOptions[index].subPlaceName;
 | 
				
			||||||
            this.loading2=true
 | 
					            this.loading2=true
 | 
				
			||||||
            this.setDisabled()
 | 
					            this.setDisabled()
 | 
				
			||||||
            this.loading2=false
 | 
					            this.loading2=false
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue