|
@@ -14,8 +14,9 @@
|
|
<el-select v-model="ruleForm.type" placeholder="请选择相机类型">
|
|
<el-select v-model="ruleForm.type" placeholder="请选择相机类型">
|
|
<el-option label="四维看看Pro八目相机" value="1"></el-option>
|
|
<el-option label="四维看看Pro八目相机" value="1"></el-option>
|
|
<el-option label="四维看看Lite双目相机" value="0"></el-option>
|
|
<el-option label="四维看看Lite双目相机" value="0"></el-option>
|
|
- <el-option label="四维看看双目转台相机" value="3"></el-option>
|
|
|
|
- <el-option label="四维看看激光相机" value="4"></el-option>
|
|
|
|
|
|
+ <el-option label="四维看看双目转台相机" value="9"></el-option>
|
|
|
|
+ <el-option label="四维看看激光相机" value="10"></el-option>
|
|
|
|
+ <el-option label="第三方相机" value="6"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="wifi名称">
|
|
<el-form-item label="wifi名称">
|
|
@@ -24,8 +25,8 @@
|
|
<el-form-item label="物理地址">
|
|
<el-form-item label="物理地址">
|
|
<el-input v-model="ruleForm.address"></el-input>
|
|
<el-input v-model="ruleForm.address"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="sn码">
|
|
|
|
- <el-input v-model="ruleForm.snCode"></el-input>
|
|
|
|
|
|
+ <el-form-item v-if="ruleForm.type != 6" label="*sn码">
|
|
|
|
+ <el-input v-model="ruleForm.snCode" required></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="初始点数">
|
|
<el-form-item label="初始点数">
|
|
<el-input v-model="ruleForm.initPoint"></el-input>
|
|
<el-input v-model="ruleForm.initPoint"></el-input>
|
|
@@ -35,7 +36,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="客户名称">
|
|
<el-form-item label="客户名称">
|
|
<el-select v-model="ruleForm.companyId" placeholder="请选择">
|
|
<el-select v-model="ruleForm.companyId" placeholder="请选择">
|
|
- <el-option></el-option>
|
|
|
|
|
|
+ <el-option v-for="(item,i) in companyList" :key="i" :label="item.name" :value="item.id">{{item.name}}</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -51,7 +52,7 @@
|
|
<el-input v-model="userName" placeholder="请输入用户名"></el-input>
|
|
<el-input v-model="userName" placeholder="请输入用户名"></el-input>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <el-button type="primary" @click="search">搜索</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="getData">搜索</el-button>
|
|
</div>
|
|
</div>
|
|
<div style="float: right; padding-right: 20px">
|
|
<div style="float: right; padding-right: 20px">
|
|
<el-button type="primary" @click="cameraVisible = true"
|
|
<el-button type="primary" @click="cameraVisible = true"
|
|
@@ -77,20 +78,21 @@
|
|
:label="item.label"
|
|
:label="item.label"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="操作">
|
|
|
|
|
|
+ <!-- <el-table-column label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <div>点数</div>
|
|
|
|
- <div>解绑</div>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <span>点数</span>
|
|
|
|
+ <span>解绑</span>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
|
|
+ </el-table-column> -->
|
|
</el-table>
|
|
</el-table>
|
|
<div class="p-con">
|
|
<div class="p-con">
|
|
<el-pagination
|
|
<el-pagination
|
|
- @size-change="handleSizeChange"
|
|
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
:current-page.sync="currentPage"
|
|
:current-page.sync="currentPage"
|
|
:page-size="size"
|
|
:page-size="size"
|
|
- layout="prev, pager, next, jumper"
|
|
|
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
:total="total"
|
|
:total="total"
|
|
></el-pagination>
|
|
></el-pagination>
|
|
</div>
|
|
</div>
|
|
@@ -153,50 +155,54 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- handleSizeChange(val) {
|
|
|
|
- console.log(`每页 ${val} 条`);
|
|
|
|
- },
|
|
|
|
- handleCurrentChange(val) {
|
|
|
|
- console.log(`当前页: ${val}`);
|
|
|
|
- },
|
|
|
|
|
|
+ // handleSizeChange(val) {
|
|
|
|
+ // console.log(`每页 ${val} 条`);
|
|
|
|
+ // },
|
|
|
|
+ // handleCurrentChange(val) {
|
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
|
+ // },
|
|
getData() {
|
|
getData() {
|
|
- let result;
|
|
|
|
|
|
+ if (!Number(this.currentPage)) this.currentPage = 1
|
|
let params = {
|
|
let params = {
|
|
userName: this.userName || "",
|
|
userName: this.userName || "",
|
|
- // userName: this.userName || '',
|
|
|
|
- // childName: this.childName || ''
|
|
|
|
};
|
|
};
|
|
this.$http({
|
|
this.$http({
|
|
method: "post",
|
|
method: "post",
|
|
data: params,
|
|
data: params,
|
|
url: "/camera/pageList",
|
|
url: "/camera/pageList",
|
|
- header: {
|
|
|
|
|
|
+ headers: {
|
|
token: window.localStorage.getItem("zfb_token"),
|
|
token: window.localStorage.getItem("zfb_token"),
|
|
pageNum: this.currentPage,
|
|
pageNum: this.currentPage,
|
|
pageSize: this.size,
|
|
pageSize: this.size,
|
|
},
|
|
},
|
|
}).then( res => {
|
|
}).then( res => {
|
|
- this.tabelData = res.message;
|
|
|
|
- // this.total = result.message.total
|
|
|
|
- // this.currentPage = result.message.pageNum
|
|
|
|
|
|
+ this.tableData = res.message.list;
|
|
|
|
+ this.total = res.message.total
|
|
|
|
+ // this.currentPage = res.message.pageNum
|
|
});
|
|
});
|
|
},
|
|
},
|
|
addCamera() {
|
|
addCamera() {
|
|
|
|
+ if(this.ruleForm.type != 6 && this.ruleForm.snCode == ''){
|
|
|
|
+ this.$alert('sn码不能为空!','提示',{
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
let params = {
|
|
let params = {
|
|
- wifi: "",
|
|
|
|
- address: "",
|
|
|
|
- initPoint: "",
|
|
|
|
- type: [],
|
|
|
|
- own: [],
|
|
|
|
- snCode: "",
|
|
|
|
- orderNum: "",
|
|
|
|
- companyId: "",
|
|
|
|
|
|
+ wifi: this.ruleForm.wifi,
|
|
|
|
+ address: this.ruleForm.address,
|
|
|
|
+ initPoint: this.ruleForm.initPoint,
|
|
|
|
+ type: this.ruleForm.type,
|
|
|
|
+ own: this.ruleForm.own,
|
|
|
|
+ snCode: this.ruleForm.snCode,
|
|
|
|
+ orderNum: this.ruleForm.orderNum,
|
|
|
|
+ companyId: this.ruleForm.companyId,
|
|
};
|
|
};
|
|
this.$http({
|
|
this.$http({
|
|
method: "post",
|
|
method: "post",
|
|
url: "/camera/add",
|
|
url: "/camera/add",
|
|
data: params,
|
|
data: params,
|
|
- header: {
|
|
|
|
|
|
+ headers: {
|
|
token: window.localStorage.getItem("zfb_token"),
|
|
token: window.localStorage.getItem("zfb_token"),
|
|
pageNum: this.currentPage,
|
|
pageNum: this.currentPage,
|
|
pageSize: this.size,
|
|
pageSize: this.size,
|
|
@@ -206,7 +212,8 @@ export default {
|
|
this.$alert('相机添加成功','提示',{
|
|
this.$alert('相机添加成功','提示',{
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
callback: action => {
|
|
callback: action => {
|
|
-
|
|
|
|
|
|
+ this.getCompanyList()
|
|
|
|
+ this.cameraVisible = false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
@@ -221,17 +228,20 @@ export default {
|
|
},
|
|
},
|
|
async getCompanyList(){
|
|
async getCompanyList(){
|
|
let result = await this.$http.post('/company/listAll')
|
|
let result = await this.$http.post('/company/listAll')
|
|
- this.companyList = result
|
|
|
|
|
|
+ this.companyList = result.message
|
|
|
|
+ },
|
|
|
|
+ handleCurrentChange (val) {
|
|
|
|
+ this.currentPage = val
|
|
},
|
|
},
|
|
refresh() {
|
|
refresh() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
this.getData();
|
|
this.getData();
|
|
this.loading = false;
|
|
this.loading = false;
|
|
},
|
|
},
|
|
- search() {
|
|
|
|
- this.currentPage === 1 ? this.refresh() : (this.currentPage = 1);
|
|
|
|
- this.getData()
|
|
|
|
- },
|
|
|
|
|
|
+ // search() {
|
|
|
|
+ // this.currentPage === 1 ? this.refresh() : (this.currentPage = 1);
|
|
|
|
+ // this.getData()
|
|
|
|
+ // },
|
|
checkLegal(item) {
|
|
checkLegal(item) {
|
|
if (item.value) {
|
|
if (item.value) {
|
|
let params = {
|
|
let params = {
|
|
@@ -267,11 +277,11 @@ export default {
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
currentPage() {
|
|
currentPage() {
|
|
- this.refresh();
|
|
|
|
- },
|
|
|
|
- size() {
|
|
|
|
- this.refresh();
|
|
|
|
|
|
+ this.getData()
|
|
},
|
|
},
|
|
|
|
+ // size() {
|
|
|
|
+ // this.refresh();
|
|
|
|
+ // },
|
|
num(newVal, oldVal) {
|
|
num(newVal, oldVal) {
|
|
if (newVal > oldVal) {
|
|
if (newVal > oldVal) {
|
|
this.addDevies.push({
|
|
this.addDevies.push({
|