| | |
| | | <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 label="委托编号:" class="sermargin"> |
| | | <el-input v-model="searchData.code" class="input-form" placeholder="请输入"> |
| | | <el-input size="small" v-model="searchData.code" class="input-form" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="样品名称:" class="sermargin"> |
| | | <el-input v-model="searchData.name" class="input-form" placeholder="请输入"> |
| | | <el-input size="small" v-model="searchData.name" class="input-form" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="委托单位:" style="margin-right: 20px;"> |
| | | <el-select v-model="searchData.department" placeholder="全部"> |
| | | <el-select v-model="searchData.department" placeholder="全部" size="small"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="search">查询</el-button> |
| | | <el-button type="primary" plain @click="reset">重置</el-button> |
| | | <el-button type="primary" size="small" @click="search">查询</el-button> |
| | | <el-button type="primary" size="small" plain @click="reset">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form> |
| | | <el-popover placement="left" width="350" trigger="click"> |
| | | <el-popover placement="left" width="410" 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> |
| | | <el-button size="small" slot="reference" class="rightBtn" type="primary" @click="goToaddCommision">新增委托</el-button> |
| | | </el-popover> |
| | | </el-form> |
| | | </div> |
| | |
| | | <el-table-column prop="contacts" label="委托编制人" min-width="8%" /> |
| | | <el-table-column prop="inspection_status" label="状态" min-width="8%"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="scope.row.inspection_status === 0"> |
| | | <div v-if="scope.row.inspection_status === 2"> |
| | | <span style="color: green;">已报检</span> |
| | | </div> |
| | | <div v-else> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <router-view /> |
| | | </div> |
| | | <el-dialog title="链接时长设置" :visible.sync="viewDia" width="30%"> |
| | | <div> |
| | |
| | | value: null |
| | | }, |
| | | { |
| | | label: '已检验', |
| | | value: 0 |
| | | label: '已报检', |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: '待检验', |
| | | label: '未报检', |
| | | value: 1 |
| | | } |
| | | ], |
| | |
| | | view: null, |
| | | viewId: null, |
| | | viewTime: 1, |
| | | viewTime2: 1, |
| | | viewDia: false |
| | | } |
| | | }, |
| | | watch:{ |
| | | addReportDialog(newVal){ |
| | | if(newVal === false){ |
| | | this.resetForm("addInspectionForm"); |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | selectViewUUID({ |
| | | day: this.day |
| | | }).then(res => { |
| | | this.view = `${this.vueIp}addCommision/${res.data.id}` |
| | | this.view = `${this.vueIp}/#/addCommision/${res.data.id}` |
| | | this.viewId = res.data.id |
| | | this.viewTime = res.data.time |
| | | this.viewTime2 = res.data.time |
| | | }) |
| | | }, |
| | | getViewId() { |
| | |
| | | day: this.viewTime == null ? 1 : this.viewTime |
| | | }).then(res => { |
| | | this.viewId = res.data |
| | | this.view = `${this.vueIp}addCommision/${res.data.id}` |
| | | this.view = `${this.vueIp}/#/addCommision/${res.data.id}` |
| | | this.viewDia = false |
| | | this.$message.success('链接已生成,点击复制按钮进行复制') |
| | | }) |