|
|
@@ -1,318 +1,356 @@
|
|
|
<template>
|
|
|
- <div class="con" v-loading.fullscreen.lock="loading">
|
|
|
- <el-dialog title="场景获取" :close-on-click-modal="false" :visible.sync="downloadingVisible" width="400px">
|
|
|
- <el-form :model="downloading" :label-position="'right'" label-width="100px">
|
|
|
- <div style="padding: 0 30px">
|
|
|
- <div class="add-l">
|
|
|
- <el-form-item label="场景名称:">
|
|
|
- <span>{{downloading.sceneName}}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="下载进度:" prop="percent" v-if="downloading.status != 1003">
|
|
|
- <!-- <span style="color:#0175dc">100%</span> -->
|
|
|
- <span style="color:#0175dc">{{downloading.percent}}%</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="状态:" prop="status">
|
|
|
- <span v-if="downloading.status == 1002" style="color:#0175dc">获取成功</span>
|
|
|
- <span v-if="downloading.status == 1000 || downloading.status == 1001" style="color:#0175dc">获取中</span>
|
|
|
- <span v-if="downloading.status == 1003" style="color:red">获取失败</span>
|
|
|
- <!-- <span style="color:#0175dc">下载成功</span> -->
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
- <div style="text-align: center" class="dialog-footer">
|
|
|
- <div>
|
|
|
- <el-button v-if="downloading.status == 1002 || downloading.status == 1003" size="small" type="primary" @click="downloadingVisible = false">确 定</el-button>
|
|
|
+ <div class="con" v-loading.fullscreen.lock="loading">
|
|
|
+ <el-dialog
|
|
|
+ title="场景获取"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :visible.sync="downloadingVisible"
|
|
|
+ width="400px"
|
|
|
+ >
|
|
|
+ <el-form :model="downloading" :label-position="'right'" label-width="100px">
|
|
|
+ <div style="padding: 0 30px">
|
|
|
+ <div class="add-l">
|
|
|
+ <el-form-item label="场景名称:">
|
|
|
+ <span>{{ downloading.sceneName }}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="下载进度:"
|
|
|
+ prop="percent"
|
|
|
+ v-if="downloading.status != 1003"
|
|
|
+ >
|
|
|
+ <!-- <span style="color:#0175dc">100%</span> -->
|
|
|
+ <span style="color: #0175dc">{{ downloading.percent }}%</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态:" prop="status">
|
|
|
+ <span v-if="downloading.status == 1002" style="color: #0175dc"
|
|
|
+ >获取成功</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ v-if="downloading.status == 1000 || downloading.status == 1001"
|
|
|
+ style="color: #0175dc"
|
|
|
+ >获取中</span
|
|
|
+ >
|
|
|
+ <span v-if="downloading.status == 1003" style="color: red">获取失败</span>
|
|
|
+ <!-- <span style="color:#0175dc">下载成功</span> -->
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
- <div class="h-header">
|
|
|
- <vcenter>
|
|
|
- <div class="h-input">
|
|
|
- <el-input v-model="CompanyName" placeholder="请输入公司名称"></el-input>
|
|
|
- </div>
|
|
|
- <div class="h-input">
|
|
|
- <el-input v-model="SceneName" placeholder="请输入场景名称"></el-input>
|
|
|
- </div>
|
|
|
- <div class="h-input">
|
|
|
- <el-input v-model="ShebeiID" placeholder="请输入设备ID"></el-input>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-button type="primary" @click="search">搜索</el-button>
|
|
|
- </div>
|
|
|
- </vcenter>
|
|
|
+ </el-form>
|
|
|
+ <div style="text-align: center" class="dialog-footer">
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ v-if="downloading.status == 1002 || downloading.status == 1003"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ @click="downloadingVisible = false"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <div class="h-header">
|
|
|
+ <vcenter>
|
|
|
+ <div class="h-input">
|
|
|
+ <el-input v-model="CompanyName" placeholder="请输入公司名称"></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="h-input">
|
|
|
+ <el-input v-model="SceneName" placeholder="请输入场景名称"></el-input>
|
|
|
</div>
|
|
|
+ <div class="h-input">
|
|
|
+ <el-input v-model="ShebeiID" placeholder="请输入设备ID"></el-input>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-button type="primary" @click="search">搜索</el-button>
|
|
|
+ </div>
|
|
|
+ </vcenter>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="h-body">
|
|
|
- <div style="padding-left:20px;">
|
|
|
- <vcenter>
|
|
|
+ <div class="h-body">
|
|
|
+ <div style="padding-left: 20px">
|
|
|
+ <vcenter>
|
|
|
<!--<el-tabs>
|
|
|
<el-tab-pane @click="" label="新场景"></el-tab-pane>
|
|
|
<el-tab-pane @click="" label="旧场景"></el-tab-pane>
|
|
|
</el-tabs>-->
|
|
|
- </vcenter>
|
|
|
- </div>
|
|
|
- <el-table height="520" :data="tableData" style="width: 100%;padding:0 20px;" :default-sort="{prop:'createTime',order:'descending'}">
|
|
|
- <el-table-column
|
|
|
- v-for="(item,i) in tableHeader"
|
|
|
- :key="i"
|
|
|
- :prop="item.name"
|
|
|
- :label="item.label"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span @click="_S_download(scope.row)" style="cursor:pointer;color:#0175dc;">下载场景</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div class="p-con">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page.sync="currentPage"
|
|
|
- :page-size="size"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- ></el-pagination>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
+ </vcenter>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ height="520"
|
|
|
+ :data="tableData"
|
|
|
+ style="width: 100%; padding: 0 20px"
|
|
|
+ :default-sort="{ prop: 'createTime', order: 'descending' }"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, i) in tableHeader"
|
|
|
+ :key="i"
|
|
|
+ :prop="item.name"
|
|
|
+ :label="item.label"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span @click="_S_download(scope.row)" style="cursor: pointer; color: #0175dc"
|
|
|
+ >下载场景</span
|
|
|
+ ><br />
|
|
|
+ <span @click="_openEdit(scope.row)" style="cursor: pointer; color: #0175dc"
|
|
|
+ >打开编辑器</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="p-con">
|
|
|
+ <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="size" :page-sizes="[10, 30, 50, 100]" layout="total, prev, pager, next, jumper" :total="total"></el-pagination> -->
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page.sync="currentPage"
|
|
|
+ :page-sizes="[10, 30, 50, 100]"
|
|
|
+ :page-size="size"
|
|
|
+ layout="sizes, prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import vcenter from '@/components/vcenter'
|
|
|
-import Vue from 'vue'
|
|
|
+import vcenter from "@/components/vcenter";
|
|
|
+import Vue from "vue";
|
|
|
export default {
|
|
|
- components:{vcenter},
|
|
|
- data(){
|
|
|
- return{
|
|
|
- CompanyName:'',
|
|
|
- SceneName:'',
|
|
|
- ShebeiID:'',
|
|
|
- currentPage:1,
|
|
|
- size:10,
|
|
|
- total:0,
|
|
|
- tableHeader:[
|
|
|
- {name:'sceneName',label:'场景名称'},{name:'webSite',label:'场景链接'},
|
|
|
- {name:'companyName',label:'企业名称'},{name:'childName',label:'拍摄设备ID'},
|
|
|
- {name:'createTime',label:'拍摄时间'},{name:'viewCount',label:'场景访问量'},
|
|
|
- {name:'num',label:'场景码'}
|
|
|
- ],
|
|
|
- tableData:[],
|
|
|
- loading: false,
|
|
|
- type:'',
|
|
|
- downloading:{
|
|
|
- sceneName:'',
|
|
|
- status:'',
|
|
|
- percent:''
|
|
|
- },
|
|
|
- downloadingVisible: false
|
|
|
- }
|
|
|
+ components: { vcenter },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ CompanyName: "",
|
|
|
+ SceneName: "",
|
|
|
+ ShebeiID: "",
|
|
|
+ currentPage: 1,
|
|
|
+ size: 10,
|
|
|
+ total: 0,
|
|
|
+ tableHeader: [
|
|
|
+ { name: "sceneName", label: "场景名称" },
|
|
|
+ { name: "webSite", label: "场景链接" },
|
|
|
+ { name: "companyName", label: "企业名称" },
|
|
|
+ { name: "childName", label: "拍摄设备ID" },
|
|
|
+ { name: "createTime", label: "拍摄时间" },
|
|
|
+ { name: "viewCount", label: "场景访问量" },
|
|
|
+ { name: "num", label: "场景码" },
|
|
|
+ ],
|
|
|
+ tableData: [],
|
|
|
+ loading: false,
|
|
|
+ type: "",
|
|
|
+ downloading: {
|
|
|
+ sceneName: "",
|
|
|
+ status: "",
|
|
|
+ percent: "",
|
|
|
+ },
|
|
|
+ downloadingVisible: false,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // S_download(row){
|
|
|
+ // let webSite = row.num
|
|
|
+ // /*let i = webSite.indexOf('=')
|
|
|
+ // let sceneCode = webSite.slice(i+1)*/
|
|
|
+ // this.loading = true
|
|
|
+ // this.$http({
|
|
|
+ // method: 'get',
|
|
|
+ // url:`/scene/downloadSceneData?sceneNum=${webSite}`,
|
|
|
+ // headers:{
|
|
|
+ // token: window.localStorage.getItem('zfb_token')
|
|
|
+ // }
|
|
|
+ // }).then(res =>{
|
|
|
+ // this.loading = false
|
|
|
+ // if (res.code === 200){
|
|
|
+ // window.open(`/${res.message}`, '_blank')
|
|
|
+ // } else {
|
|
|
+ // return this.$alert(res.message, '提示', {
|
|
|
+ // confirmButtonText: '确定'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // sleep(millisecond){
|
|
|
+ // return new Promise(resolve => {
|
|
|
+ // setTimeout(()=>{
|
|
|
+ // resolve()
|
|
|
+ // },millisecond)
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ _openEdit(row) {
|
|
|
+ let url = row.webSite.replace("smobile", "epc");
|
|
|
+ window.open(url);
|
|
|
},
|
|
|
- methods:{
|
|
|
- // S_download(row){
|
|
|
- // let webSite = row.num
|
|
|
- // /*let i = webSite.indexOf('=')
|
|
|
- // let sceneCode = webSite.slice(i+1)*/
|
|
|
- // this.loading = true
|
|
|
- // this.$http({
|
|
|
- // method: 'get',
|
|
|
- // url:`/scene/downloadSceneData?sceneNum=${webSite}`,
|
|
|
- // headers:{
|
|
|
- // token: window.localStorage.getItem('zfb_token')
|
|
|
- // }
|
|
|
- // }).then(res =>{
|
|
|
- // this.loading = false
|
|
|
- // if (res.code === 200){
|
|
|
- // window.open(`/${res.message}`, '_blank')
|
|
|
- // } else {
|
|
|
- // return this.$alert(res.message, '提示', {
|
|
|
- // confirmButtonText: '确定'
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },
|
|
|
- // sleep(millisecond){
|
|
|
- // return new Promise(resolve => {
|
|
|
- // setTimeout(()=>{
|
|
|
- // resolve()
|
|
|
- // },millisecond)
|
|
|
- // })
|
|
|
- // },
|
|
|
- _S_download(row){
|
|
|
- let webSite = row.num
|
|
|
- this.downloading.sceneName = row.sceneName
|
|
|
- this.loading = true
|
|
|
- this.$http({
|
|
|
- method: 'get',
|
|
|
- url: `/scene/downloadSceneData?sceneNum=${webSite}`,
|
|
|
- headers:{
|
|
|
- token: window.localStorage.getItem('zfb_token')
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- this.loading = false
|
|
|
- if(res.code === 200){
|
|
|
- //链接存在时直接下载
|
|
|
- if(res.message.indexOf('zip') != -1 && res.message.indexOf('http') == -1){
|
|
|
- window.open(`/zfb/${res.message}`,'_blank')
|
|
|
- }
|
|
|
- //如果是完整的链接则直接下载
|
|
|
- else if(res.message.indexOf('http') != -1){
|
|
|
- window.open(res.message , '_blank')
|
|
|
- }
|
|
|
- //设置定时器实时获取下载链接的status和percent
|
|
|
- else if(res.message == 'success'){
|
|
|
- // setTimeout(()=>{
|
|
|
- // var get_process = setInterval(()=>{
|
|
|
- // this.getProcess(row , get_process)
|
|
|
- // },2000)
|
|
|
- // },3000)
|
|
|
- var get_process = setInterval(()=>{
|
|
|
- this.getProcess(row , get_process)
|
|
|
- },2000)
|
|
|
- }
|
|
|
- else{
|
|
|
- return this.$alert(res.error, '提示', {
|
|
|
- confirmButtonText: '确定'
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- else if(res.code === 400){
|
|
|
- return this.$alert(res.message, '提示', {
|
|
|
- confirmButtonText: '确定'
|
|
|
- })
|
|
|
+ _S_download(row) {
|
|
|
+ let webSite = row.num;
|
|
|
+ this.downloading.sceneName = row.sceneName;
|
|
|
+ this.loading = true;
|
|
|
+ this.$http({
|
|
|
+ method: "get",
|
|
|
+ url: `/scene/downloadSceneData?sceneNum=${webSite}`,
|
|
|
+ headers: {
|
|
|
+ token: window.localStorage.getItem("zfb_token"),
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.code === 200) {
|
|
|
+ //链接存在时直接下载
|
|
|
+ if (res.message.indexOf("zip") != -1 && res.message.indexOf("http") == -1) {
|
|
|
+ window.open(`/zfb/${res.message}`, "_blank");
|
|
|
}
|
|
|
- else{
|
|
|
- return this.$alert(res.error, '提示', {
|
|
|
- confirmButtonText: '确定'
|
|
|
- })
|
|
|
+ //如果是完整的链接则直接下载
|
|
|
+ else if (res.message.indexOf("http") != -1) {
|
|
|
+ window.open(res.message, "_blank");
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- getProcess(row , get_process){
|
|
|
- // let params = {
|
|
|
- // sceneNum: row.num
|
|
|
- // }
|
|
|
- this.$http({
|
|
|
- method: 'get',
|
|
|
- url: `/scene/getDownloadProcess?sceneNum=${row.num}`,
|
|
|
- // data: params,
|
|
|
- headers: {
|
|
|
- token: window.localStorage.getItem('zfb_token')
|
|
|
+ //设置定时器实时获取下载链接的status和percent
|
|
|
+ else if (res.message == "success") {
|
|
|
+ // setTimeout(()=>{
|
|
|
+ // var get_process = setInterval(()=>{
|
|
|
+ // this.getProcess(row , get_process)
|
|
|
+ // },2000)
|
|
|
+ // },3000)
|
|
|
+ var get_process = setInterval(() => {
|
|
|
+ this.getProcess(row, get_process);
|
|
|
+ }, 2000);
|
|
|
+ } else {
|
|
|
+ return this.$alert(res.error, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ });
|
|
|
}
|
|
|
- }).then(res => {
|
|
|
- if(res.code === 200){
|
|
|
- this.downloadingVisible = true
|
|
|
- this.downloading.status = res.message.status
|
|
|
- this.downloading.percent = res.message.percent
|
|
|
- if(this.downloading.status == 1002 || this.downloading.status == 1003){
|
|
|
- clearInterval(get_process)
|
|
|
- if(res.message.url && this.downloading.status == 1002){
|
|
|
- window.open(res.message.url,'_blank')
|
|
|
- }
|
|
|
+ } else if (res.code === 400) {
|
|
|
+ return this.$alert(res.message, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return this.$alert(res.error, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getProcess(row, get_process) {
|
|
|
+ // let params = {
|
|
|
+ // sceneNum: row.num
|
|
|
+ // }
|
|
|
+ this.$http({
|
|
|
+ method: "get",
|
|
|
+ url: `/scene/getDownloadProcess?sceneNum=${row.num}`,
|
|
|
+ // data: params,
|
|
|
+ headers: {
|
|
|
+ token: window.localStorage.getItem("zfb_token"),
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.downloadingVisible = true;
|
|
|
+ this.downloading.status = res.message.status;
|
|
|
+ this.downloading.percent = res.message.percent;
|
|
|
+ if (this.downloading.status == 1002 || this.downloading.status == 1003) {
|
|
|
+ clearInterval(get_process);
|
|
|
+ if (res.message.url && this.downloading.status == 1002) {
|
|
|
+ window.open(res.message.url, "_blank");
|
|
|
}
|
|
|
}
|
|
|
- else{
|
|
|
- return this.$alert(res.error, '提示', {
|
|
|
- confirmButtonText: '确定'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- handleSizeChange(val){
|
|
|
- console.log(`每页 ${val} 条`)
|
|
|
- },
|
|
|
- handleCurrentChange(val){
|
|
|
- // this.loading = true
|
|
|
- console.log(`当前页: ${val}`)
|
|
|
+ } else {
|
|
|
+ return this.$alert(res.error, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.size = val;
|
|
|
+ this.refresh();
|
|
|
+ console.log(`每页 ${val} 条`);
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ // this.loading = true
|
|
|
+ console.log(`当前页: ${val}`);
|
|
|
+ },
|
|
|
+ async getData() {
|
|
|
+ this.loading = true;
|
|
|
+ let params = {
|
|
|
+ companyName: this.CompanyName || "",
|
|
|
+ childName: this.ShebeiID || "",
|
|
|
+ sceneName: this.SceneName || "",
|
|
|
+ //startTime: this.value5 ? this.value5[0] : '',
|
|
|
+ //endTime: this.value5 ? this.value5[1] : '',
|
|
|
+ //state: this.dropdown_active.id !== '' ? this.dropdown_active.id : '',
|
|
|
+ type: this.type,
|
|
|
+ };
|
|
|
+ let result = await this.$http({
|
|
|
+ method: "post",
|
|
|
+ data: params,
|
|
|
+ url: "/scene/pageList",
|
|
|
+ headers: {
|
|
|
+ token: window.localStorage.getItem("zfb_token"),
|
|
|
+ pageNum: this.currentPage,
|
|
|
+ pageSize: this.size,
|
|
|
},
|
|
|
- async getData () {
|
|
|
- this.loading = true
|
|
|
- let params = {
|
|
|
- companyName: this.CompanyName || '',
|
|
|
- childName: this.ShebeiID || '',
|
|
|
- sceneName: this.SceneName || '',
|
|
|
- //startTime: this.value5 ? this.value5[0] : '',
|
|
|
- //endTime: this.value5 ? this.value5[1] : '',
|
|
|
- //state: this.dropdown_active.id !== '' ? this.dropdown_active.id : '',
|
|
|
- type: this.type
|
|
|
- }
|
|
|
- let result = await this.$http({
|
|
|
- method: 'post',
|
|
|
- data: params,
|
|
|
- url: '/scene/pageList',
|
|
|
- headers: {
|
|
|
- token: window.localStorage.getItem('zfb_token'),
|
|
|
- pageNum: this.currentPage,
|
|
|
- pageSize: this.size
|
|
|
- }
|
|
|
- })
|
|
|
- //发布日期和状态格式规范
|
|
|
- /*for (let i = 0; i < result.message.list.length; i++) {
|
|
|
+ });
|
|
|
+ //发布日期和状态格式规范
|
|
|
+ /*for (let i = 0; i < result.message.list.length; i++) {
|
|
|
result.message.list[i].createTime = this.$base.dateFormat('yyyy-MM-dd hh:mm', new Date(result.message.list[i].createTime))
|
|
|
result.message.list[i].state = this.fixState(result.message.list[i].state)
|
|
|
}*/
|
|
|
- if (result.code === 200){
|
|
|
- this.tableData = result.message.list
|
|
|
- }else{
|
|
|
- return this.$alert(result.error, '提示', {
|
|
|
- confirmButtonText: '确定'
|
|
|
- })
|
|
|
- }
|
|
|
+ if (result.code === 200) {
|
|
|
+ this.tableData = result.message.list;
|
|
|
+ } else {
|
|
|
+ return this.$alert(result.error, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- this.total = result.message.total
|
|
|
- this.currentPage = result.message.pageNum
|
|
|
+ this.total = result.message.total;
|
|
|
+ this.currentPage = result.message.pageNum;
|
|
|
|
|
|
- this.loading = false
|
|
|
- },
|
|
|
- refresh () {
|
|
|
- // this.loading = true
|
|
|
- this.getData()
|
|
|
- // this.loading = false
|
|
|
- },
|
|
|
- search(){
|
|
|
- this.currentPage === 1 ? this.refresh() : this.currentPage = 1
|
|
|
- }
|
|
|
+ this.loading = false;
|
|
|
},
|
|
|
- mounted(){
|
|
|
- this.refresh()
|
|
|
+ refresh() {
|
|
|
+ // this.loading = true
|
|
|
+ this.getData();
|
|
|
+ // this.loading = false
|
|
|
},
|
|
|
- watch:{
|
|
|
- currentPage(){
|
|
|
- this.refresh()
|
|
|
- },
|
|
|
- // size(){
|
|
|
- // this.refresh()
|
|
|
- // },
|
|
|
- num (newVal, oldVal) {
|
|
|
+ search() {
|
|
|
+ this.currentPage === 1 ? this.refresh() : (this.currentPage = 1);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.refresh();
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ currentPage() {
|
|
|
+ this.refresh();
|
|
|
+ },
|
|
|
+ // size(){
|
|
|
+ // this.refresh()
|
|
|
+ // },
|
|
|
+ num(newVal, oldVal) {
|
|
|
if (newVal > oldVal) {
|
|
|
this.addDevies.push({
|
|
|
- value: '',
|
|
|
+ value: "",
|
|
|
isAvailable: false,
|
|
|
- hasCheck: false
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.addDevies.pop()
|
|
|
- }
|
|
|
+ hasCheck: false,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.addDevies.pop();
|
|
|
}
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.con {
|
|
|
- .time-data{
|
|
|
+ .time-data {
|
|
|
position: relative;
|
|
|
- .select-data{
|
|
|
+ .select-data {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
opacity: 0;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- >span{
|
|
|
+ > span {
|
|
|
color: #0175dc;
|
|
|
}
|
|
|
}
|
|
|
@@ -431,8 +469,8 @@ export default {
|
|
|
box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
border-radius: 3px;
|
|
|
background-color: #fff;
|
|
|
-
|
|
|
- .tabs{
|
|
|
+
|
|
|
+ .tabs {
|
|
|
padding-left: 100px;
|
|
|
}
|
|
|
|
|
|
@@ -501,12 +539,11 @@ export default {
|
|
|
text-align: center;
|
|
|
display: inline-block;
|
|
|
width: 24%;
|
|
|
-
|
|
|
}
|
|
|
- .unbind{
|
|
|
+ .unbind {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|