| | |
| | | <el-form-item> |
| | | <el-button size="mini" type="primary" icon="el-icon-search" |
| | | @click="changePage(1)">搜索</el-button></el-form-item> |
| | | <!-- <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.WXBody" placeholder="菜单状态" clearable size="small"> |
| | | <el-option v-for="dict in WXBodyType" :key="dict.value" :label="dict.label" :value="dict.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-input placeholder="请输入内容" v-model="searchName" class="input-with-select"> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> --> |
| | | <el-button size="mini" type="primary" icon="el-icon-message-solid" |
| | | @click="openTimeOutModal">超时配置</el-button></el-form-item> |
| | | <el-form-item style="float: right;" v-if="roleKey !== 'admin'"> |
| | | <el-button type="primary" v-hasPermi="['iot:device:add']" plain icon="el-icon-plus" size="mini" |
| | | @click="openAZModal">新增</el-button> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="上传图片" v-if="form.state == 3 && !view" :label-width="formLabelWidth"> |
| | | <el-upload ref="uploadImg" action="#" :on-change="handleChange" list-type="picture-card" |
| | | :multiple="false" :auto-upload="false" :on-preview="handlePictureCardPreview" |
| | | :headers="headerObj" :limit="1" :on-exceed="exceed" :on-remove="handleRemove"> |
| | | :multiple="false" :auto-upload="false" :on-preview="handlePictureCardPreview" :headers="headerObj" |
| | | :limit="1" :on-exceed="exceed" :on-remove="handleRemove"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | |
| | | <el-button type="primary" @click="add" size="mini">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="超时配置" :visible.sync="timeOutModal"> |
| | | <el-form :model="timeForm" :rules="timeRules" ref="timeForm"> |
| | | <el-form-item label="派单接单超时间隔(单位:分钟)" :label-width="timeformLabelWidth" prop="ReceiveTimeout"> |
| | | <el-input v-model="timeForm.ReceiveTimeout" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="接单完成超时间隔(单位:分钟)" :label-width="timeformLabelWidth" prop="FinishTimeout"> |
| | | <el-input v-model="timeForm.FinishTimeout" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="timeOutModal = false" size="mini">取 消</el-button> |
| | | <el-button type="primary" @click="submitTimeForm('timeForm')" size="mini">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | timeForm: { |
| | | ReceiveTimeout: 0, |
| | | FinishTimeout: 0, |
| | | }, |
| | | timeRules: { |
| | | ReceiveTimeout: [ |
| | | { type: Number, required: true, message: "派单接单超时间隔不能为空", trigger: "blur" } |
| | | ], |
| | | FinishTimeout: [ |
| | | { type: Number, required: true, message: "接单完成超时间隔不能为空", trigger: "blur" } |
| | | ], |
| | | }, |
| | | timeOutModal: false, |
| | | nickName: localStorage.getItem('nickName'), |
| | | headerObj: { |
| | | Authorization: "Bearer " + getToken() |
| | |
| | | form: {}, |
| | | tableData: [ |
| | | ], |
| | | timeformLabelWidth: '215px', |
| | | formLabelWidth: '120px', |
| | | AZModal: false, |
| | | deviceList: [], |
| | |
| | | this.getList(); |
| | | this.getErectoList() |
| | | this.getErectoListLevel() |
| | | // this.getNumInfo() |
| | | // this.selecttimeout() |
| | | }, |
| | | methods: { |
| | | getNumInfo() { |
| | | submitTimeForm() { |
| | | this.$refs['timeForm'].validate((valid) => { |
| | | if (valid) { |
| | | this.editTimeOut() |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | editTimeOut() { |
| | | let data = { |
| | | receiveTimeout: this.timeForm.ReceiveTimeout, |
| | | finishTimeout: this.timeForm.FinishTimeout, |
| | | orderType: 1, |
| | | userId: localStorage.getItem('userID') |
| | | } |
| | | request({ |
| | | url: `/iot/deviceOrder/get/${localStorage.getItem('userID')}/1`, |
| | | method: "get", |
| | | url: `/iot/deviceOrder/updatetimeout`, |
| | | method: "put", |
| | | params: data, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: '修改成功', |
| | | type: 'success' |
| | | }); |
| | | this.timeOutModal = false |
| | | } else { |
| | | this.$message({ |
| | | message: '修改失败', |
| | | type: 'error' |
| | | }); |
| | | } |
| | | }).catch((res) => { |
| | | |
| | | this.$message({ |
| | | message: '修改失败', |
| | | type: 'error' |
| | | }); |
| | | }) |
| | | |
| | | }, |
| | | getTimeOut() { |
| | | let data = { |
| | | orderType: 1, |
| | | userId: localStorage.getItem('userID') |
| | | } |
| | | request({ |
| | | url: `/iot/deviceOrder/selecttimeout`, |
| | | method: "get", |
| | | params: data, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | this.timeForm.ReceiveTimeout = res.data.receiveTimeout[0]?res.data.receiveTimeout[0]:0 |
| | | this.timeForm.FinishTimeout = res.data.finishTimeout[0]?res.data.finishTimeout[0]:0 |
| | | } else { |
| | | this.timeForm.ReceiveTimeout = 0 |
| | | this.timeForm.FinishTimeout = 0 |
| | | } |
| | | }).catch((res) => { |
| | | this.timeForm.ReceiveTimeout = 0 |
| | | this.timeForm.FinishTimeout = 0 |
| | | return false |
| | | }) |
| | | }, |
| | | openTimeOutModal() { |
| | | this.getTimeOut() |
| | | this.timeOutModal = true |
| | | |
| | | }, |
| | | exceed(e) { |
| | | console.log(e); |
| | |
| | | console.log(3, e); |
| | | }, |
| | | changePage(e) { |
| | | this.getNumInfo() |
| | | this.pageIndex = e |
| | | this.getList() |
| | | |
| | | }, |
| | | openAZModal() { |
| | | this.getDeviceList(); |
| | |
| | | }, |
| | | // 接单 |
| | | JDModal(item) { |
| | | if (!item.appointmentTime) { |
| | | this.$message({ |
| | | message: '请和客户确认预约时间并录入系统再接单!', |
| | | type: 'error' |
| | | }); |
| | | return false |
| | | } |
| | | this.title = '修改安装单' |
| | | this.form = JSON.parse(JSON.stringify(item)) |
| | | this.form.state = 2 |
| | |
| | | this.form.state = 1 |
| | | } |
| | | } |
| | | |
| | | }, |
| | | deep: true, |
| | | }, |