会员列表增加查看绑定的仪器列表

master
382696293@qq.com 2 years ago
parent 152edd7673
commit fad1fb16f1

@ -228,7 +228,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用户注册时间" align="center" prop="createTime" width="200px"/> <el-table-column label="用户注册时间" align="center" prop="createTime" width="200px"/>
<el-table-column label="仪器数量" align="center" prop="devicesNum"/> <el-table-column label="仪器" align="center" prop="devicesNum">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="viewUserInstrumentDetail(scope.row)">
{{ scope.row.devicesNum }}
</el-button>
</template>
</el-table-column>
<el-table-column label="小程序标签" align="center" prop="miniProgramTags" width="150px"> <el-table-column label="小程序标签" align="center" prop="miniProgramTags" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-for="item in scope.row.miniProgramTags" :key="item.id"> <el-tag v-for="item in scope.row.miniProgramTags" :key="item.id">
@ -722,6 +728,31 @@
<el-button type="primary" @click="submitBatchOperate"> </el-button> <el-button type="primary" @click="submitBatchOperate"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 查看用户绑定的仪器列表 -->
<el-dialog title="仪器绑定" :visible.sync="userInstrumentVisible" width="63%" :before-close="cancelUserInstrumentDialog">
<template>
<el-table :data="userInstrumentQuery.userInstrumentList" style="width: 100%">
<el-table-column type="index" width="50" label="序号" />
<el-table-column prop="instrumentName" label="仪器名称" width="150px" />
<el-table-column prop="serial" label="仪器序列号" width="200" />
<el-table-column prop="serialImage" label="仪器序列号图片" width="150" >
<template slot-scope="scope">
<el-image v-if="scope.row.serialImage" :src="scope.row.serialImage"
style="width: 100px; height: 100px" ></el-image>
</template>
</el-table-column>
<el-table-column prop="updateTime" label="操作时间" width="200" />
</el-table>
</template>
<pagination
v-show="userInstrumentQuery.total>0"
:total="userInstrumentQuery.total"
:page.sync="userInstrumentQuery.pageNum"
:limit.sync="userInstrumentQuery.pageSize"
@pagination="getUserInstrumentList"
/>
</el-dialog>
</div> </div>
</template> </template>
@ -755,7 +786,7 @@ import {
uObtainUserScriptLog, uObtainUserScriptLog,
delUserScriptLog, delUserScriptLog,
obtainUserIntegralLog, obtainUserIntegralLog,
getAllInstrument, getAllInstrument, listUserInstrument,
} from "@/api/system/member"; } from "@/api/system/member";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import {tagTreeSelect} from "@/api/system/wechatTab"; import {tagTreeSelect} from "@/api/system/wechatTab";
@ -885,6 +916,17 @@ export default {
orderByColumn: "createTime", orderByColumn: "createTime",
isAsc: "desc" isAsc: "desc"
}, },
//
userInstrumentVisible: false,
userInstrumentQuery: {
total: 0,
pageNum: 1,
pageSize: 10,
userId: null,
userInstrumentList: null,
orderByColumn: "createTime",
isAsc: "desc"
},
// //
exportFieldsVisible: false, exportFieldsVisible: false,
exportFieldsForm: { exportFieldsForm: {
@ -1262,6 +1304,18 @@ export default {
this.batchScriptVisible = false; this.batchScriptVisible = false;
} }
}, },
cancelUserInstrumentDialog() {
this.userInstrumentVisible = false;
this.userInstrumentQuery = {
total: 0,
pageNum: 1,
pageSize: 10,
userId: null,
userInstrumentList: null,
orderByColumn: "createTime",
isAsc: "desc"
}
},
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */
getDeptTree() { getDeptTree() {
tagTreeSelect({type: 1}).then(response => { tagTreeSelect({type: 1}).then(response => {
@ -1842,6 +1896,19 @@ export default {
this.userScriptLogQuery.total = response.total; this.userScriptLogQuery.total = response.total;
}); });
}, },
//
viewUserInstrumentDetail(row) {
this.userInstrumentQuery.userId = row.id;
this.getUserInstrumentList();
this.userInstrumentVisible = true;
},
//
getUserInstrumentList() {
listUserInstrument(this.userInstrumentQuery).then(response => {
this.userInstrumentQuery.userInstrumentList = response.rows;
this.userInstrumentQuery.total = response.total;
});
},
// //
delUserScriptLog(row) { delUserScriptLog(row) {
let wxUserScriptLog = { let wxUserScriptLog = {

Loading…
Cancel
Save