lancer 3 лет назад
Родитель
Сommit
303bae2bd6
3 измененных файлов: 186 добавлений и 58 удалений
  1. +26
    -2
      src/api/modules/api.js
  2. +17
    -16
      src/views/Equipment/equipmentOnlineRecordList.vue
  3. +143
    -40
      src/views/Equipment/index.vue

+ 26
- 2
src/api/modules/api.js Просмотреть файл

@@ -523,9 +523,33 @@ export function zkequipmentbatchList(query) {
}

// 添加设备
export function zkequipmentbatchInsert(data) {
export function equipmentAdd(data) {
return request({
url: '/autoSR/zkequipmentbatch/insert',
url: 'autoSR/zk/equipment/add',
method:'post',
data
})
}
// 归还设备
export function equipmentUnbind(data) {
return request({
url: 'autoSR/zk/equipment/unbind',
method:'post',
data
})
}
// 恢复正常
export function backToNormal(data) {
return request({
url: 'autoSR/zk/equipment/backToNormal',
method:'post',
data
})
}
//转写方式修改
export function updateTranslationMethod(data) {
return request({
url: 'autoSR/zk/equipment/updateTranslationMethod',
method:'post',
data
})


+ 17
- 16
src/views/Equipment/equipmentOnlineRecordList.vue Просмотреть файл

@@ -310,7 +310,7 @@ export default {
};
},
mounted() {
return
// return
let theRequest=this.$route.query
console.log(theRequest, "123"); //此时的theRequest就是我们需要的参数;
if (theRequest.houseId) {
@@ -378,6 +378,7 @@ export default {
},
goinfo(row) {
console.log(row);
return
location.href = "${jypath}/zk/file/receptionDetails";
localStorage.setItem("AudioListId", row.id);
localStorage.setItem("AudioIdx", 0);
@@ -419,14 +420,14 @@ export default {
//获取楼盘数据
getHouseList() {
axios({
url: `${jypath}/equipment/onlinerecord/findAllProperties`,
url: `/autoSR/zkhouse/findHouseByUser?orgType=0`,
method: "get",
}).then((res) => {
// console.log(res.data.obj)
if (res.data.res == 1) {
this.houseList = res.data.obj;
this.houseList = res.data;
if (!this.flag) {
this.page.houseName = res.data.obj[0].id;
this.page.houseName = res.data[0].id;
}
this.getTableList();
// res.data.obj.results.forEach((item,index)=>{
@@ -434,7 +435,7 @@ export default {
// })
// this.tableData=res.data.obj.results;
// this.page.total = res.data.obj.totalRecord;
}
});
},
//获取table数据、
@@ -448,13 +449,13 @@ export default {
};
this.tableData = [];
if (this.activeTotal == 0) {
url = `${jypath}/equipment/onlinerecord/findByPage`;
url = `autoSR/zk/equipment/onlineRecordList`;
obj.openTime = this.page.openTime;
obj.closeTime = this.page.closeTime;
obj.houseId = this.page.houseName;
obj.accountName = this.page.accountName;
} else {
url = `${jypath}/equipment/onlinerecord/assignmentRecord`;
url = `autoSR/zk/equipment/assignmentRecordList`;
obj.staDate = this.page.openTime;
obj.endDate = this.page.closeTime;
obj.projectId = this.page.houseName;
@@ -463,18 +464,18 @@ export default {
}
axios({
url: url,
method: "post",
data: obj,
method: "get",
params: obj,
}).then((res) => {
// console.log(res)
if (res.data.res == 1) {
if (!res.data.obj.results) return;
res.data.obj.results.forEach((item, index) => {
if (!res.data.records) return;
res.data.records.forEach((item, index) => {
item.index = index + 1;
});
this.tableData = res.data.obj.results;
this.page.total = res.data.obj.totalRecord;
}
this.tableData = res.data.records;
this.page.total = res.data.total;
});
},
},


+ 143
- 40
src/views/Equipment/index.vue Просмотреть файл

@@ -102,7 +102,7 @@
</el-option>
</el-select>
</div>
<!--
<!--
<div class="div-lab">
<div class="label">录音状态</div>
<el-select
@@ -235,7 +235,13 @@
</el-table-column>
<el-table-column prop="receiveType" label="领用状态" align="center">
<template slot-scope="{ row }">
{{row.receiveType==1?'未领用':row.receiveType==2?'使用中':'已归还'}}
{{
row.receiveType == 1
? "未领用"
: row.receiveType == 2
? "使用中"
: "已归还"
}}
</template>
</el-table-column>
<!-- <el-table-column prop="date" label="在线状态" align="center">
@@ -244,9 +250,23 @@
</el-table-column>
<el-table-column prop="name" label="上传状态" align="center">
</el-table-column> -->
<el-table-column prop="acceptanceStatus" label="设备状态" align="center">
<el-table-column
prop="acceptanceStatus"
label="设备状态"
align="center"
>
<template slot-scope="{ row }">
{{row.acceptanceStatus==0?'已验收':row.acceptanceStatus==1?'未验收':row.acceptanceStatus==2?'维修中':row.acceptanceStatus==3?'维修中':'已报损'}}
{{
row.acceptanceStatus == 0
? "已验收"
: row.acceptanceStatus == 1
? "未验收"
: row.acceptanceStatus == 2
? "维修中"
: row.acceptanceStatus == 3
? "维修中"
: "已报损"
}}
</template>
</el-table-column>

@@ -277,18 +297,33 @@
</el-table-column>
<el-table-column prop="name" label="关机类型" align="center">
</el-table-column> -->
<el-table-column prop="createTime" label="添加时间" align="center" width="150">
<el-table-column
prop="createTime"
label="添加时间"
align="center"
width="150"
>
</el-table-column>
<!-- <el-table-column prop="name" label="购买时间" align="center">
</el-table-column> -->
<el-table-column prop="name" label="绑定公司时间" align="center" width="150">
<el-table-column
prop="name"
label="绑定公司时间"
align="center"
width="150"
>
</el-table-column>
<el-table-column prop="name" label="绑定代理时间" align="center" width="150">
<el-table-column
prop="name"
label="绑定代理时间"
align="center"
width="150"
>
</el-table-column>
<!-- scope -->
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="{ row }">
<el-button type="text" @click="toinifoThereturn()">归还</el-button>
<!-- <el-button type="text" @click="toinifoThereturn()">归还</el-button> -->
<!-- <el-button type="text" @click="infotranscription()">
转写开关
</el-button>
@@ -297,18 +332,29 @@
<el-button type="text" @click="infoeditor()">修改</el-button>
<el-button type="text" @click="toinifodelete()">删除</el-button> -->

<el-dropdown @command="handleCommand">
<el-dropdown @command="handleCommand($event, row)">
<span style="color: #409eff; font-size: 12px; margin-left: 10px">
更多<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="toinifoThereturn"
<el-dropdown-item
command="toinifoThereturn"
v-if="row.receiveType == 2"
>归还</el-dropdown-item
>
<el-dropdown-item command="infotranscription"
>转写开关</el-dropdown-item
>转写方式</el-dropdown-item
>
<el-dropdown-item
command="acceptance"
v-if="row.acceptanceStatus == 1"
>验收</el-dropdown-item
>
<el-dropdown-item
command="getRight"
v-if="row.acceptanceStatus != (1 || 0)"
>恢复正常</el-dropdown-item
>
<el-dropdown-item command="acceptance">验收</el-dropdown-item>
<el-dropdown-item command="toinfobinding"
>绑定</el-dropdown-item
>
@@ -361,7 +407,7 @@
>
<el-option
v-for="item in batchList"
:key="item.batchId"
:key="item.id"
:label="item.batchId"
:value="item.batchId"
>
@@ -402,7 +448,11 @@
<el-radio label="1">报损</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="报损原因" prop="desc" v-if="editForm.acceptanceStatus==1">
<el-form-item
label="报损原因"
prop="desc"
v-if="editForm.acceptanceStatus == 1"
>
<el-input
type="textarea"
style="width: 80%"
@@ -613,7 +663,7 @@ export default {
input: "",
tableData: [],
houseList: [],
batchList:[],
batchList: [],
dialogVisible: false,
dialogVisible2: false,
dialogVisible3: false,
@@ -657,21 +707,21 @@ export default {
// 获取设备列表
this.equipmentManagement();
// 获取批次列表
this.zkequipmentbatchList()
// 获取楼盘列表
this.zkequipmentbatchList();
// 获取列表
this.zkhousePage();
},
methods: {
// 获取批次列表
zkequipmentbatchList(){
this.$api.api.zkequipmentbatchList()
.then(res=>{
zkequipmentbatchList() {
this.$api.api.zkequipmentbatchList().then((res) => {
// console.log(res)
this.batchList=res.data
})
this.batchList = res.data;
});
},
handleCommand(e) {
this[e]();
handleCommand(e, row) {
console.log(row);
this[e](row);
},
equipmentManagement() {
this.$api.api
@@ -769,10 +819,42 @@ export default {
this.$refs.addForm.validate((valid) => {
if (valid) {
console.log(this.addForm);
// this.dialogVisible = false;
this.$api.api.equipmentAdd(this.addForm).then((res) => {
console.log(res);
this.$message.success("添加成功");
this.dialogVisible = false;
this.equipmentManagement();
});
}
});
},
// 回复正常
getRight(row) {
this.$confirm("确认恢复么?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$api.api
.backToNormal({
id: row.id,
})
.then((res) => {
this.$message({
type: "success",
message: "成功!",
});
this.equipmentManagement();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
//验收
acceptance() {
this.$confirm("确认验收吗?", "提示", {
@@ -794,17 +876,31 @@ export default {
});
},
// 转写开关
infotranscription() {
this.$confirm("确认开启或关闭吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
infotranscription(row) {
this.$confirm(
`确认修改转写方式为${
row.defaultTransliteration == 0 ? "思必驰" : "科大讯飞"
}?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
this.$message({
type: "success",
message: "成功!",
});
this.$api.api
.equipmentUnbind({
id: row.id,
defaultTransliteration: row.defaultTransliteration == 0 ? 1 : 0,
})
.then((res) => {
this.$message({
type: "success",
message: "修改成功!",
});
this.equipmentManagement();
});
})
.catch(() => {
this.$message({
@@ -814,17 +910,24 @@ export default {
});
},
//归还
toinifoThereturn() {
toinifoThereturn(row) {
this.$confirm("确认归还吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$message({
type: "success",
message: "归还成功!",
});
this.$api.api
.equipmentUnbind({
id: row.id,
})
.then((res) => {
this.$message({
type: "success",
message: "归还成功!",
});
this.equipmentManagement();
});
})
.catch(() => {
this.$message({


Загрузка…
Отмена
Сохранить