| | |
| | | <template> |
| | | <div> |
| | | <div v-if="!showDetail"> |
| | | <div> |
| | | <div class="content-main"> |
| | | <div class="top-bar"> |
| | | <el-form ref="form" :inline="true" :model="searchData"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form> |
| | | <el-popover placement="left" width="350" trigger="click"> |
| | | <el-popover placement="left" width="400" trigger="click"> |
| | | <div class="vue_qr_div"> |
| | | <el-row> |
| | | <el-col> |
| | | <el-input v-model="view" readonly size="medium" style="width: 250px;margin-right: 10px;"></el-input> |
| | | <el-button size="small" type="primary" v-if="viewId==null" @click="viewDia=true">生成</el-button> |
| | | <el-button size="small" type="primary" v-else-if="viewId!=null" @click="copy">复制</el-button> |
| | | <el-button size="small" type="primary" @click="viewDia=true">生成</el-button> |
| | | <el-button size="small" type="primary" @click="copy">复制</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col v-if="viewId==null">当前链接已过期,请点击生成按钮重新生成</el-col> |
| | | <el-col |
| | | v-else-if="viewId!=null">当前链接将在{{(parseInt(viewTime)/60/60)>1?(parseInt(viewTime)/60/60).toFixed(1)+'小时':Math.round(parseInt(viewTime)/60)+'分钟'}}后过期</el-col> |
| | | v-else-if="viewId!=null">当前链接将在{{(parseInt(viewTime2)/60/60)>1?(parseInt(viewTime2)/60/60).toFixed(1)+'小时':Math.round(parseInt(viewTime2)/60)+'分钟'}}后过期</el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-button slot="reference" class="rightBtn" type="primary" @click="goToaddCommision">新增委托</el-button> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <router-view /> |
| | | </div> |
| | | <el-dialog title="链接时长设置" :visible.sync="viewDia" width="30%"> |
| | | <div> |
| | |
| | | view: null, |
| | | viewId: null, |
| | | viewTime: 1, |
| | | viewTime2: 1, |
| | | viewDia: false |
| | | } |
| | | }, |
| | | watch:{ |
| | | addReportDialog(newVal){ |
| | | if(newVal === false){ |
| | | this.resetForm("addInspectionForm"); |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }).then(res => { |
| | | this.view = `${this.vueIp}addCommision/${res.data.id}` |
| | | this.viewId = res.data.id |
| | | this.viewTime = res.data.time |
| | | this.viewTime2 = res.data.time |
| | | }) |
| | | }, |
| | | getViewId() { |