|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
<script setup> |
|
|
|
|
import {onBeforeMount, onMounted, reactive, ref, unref} from 'vue'; |
|
|
|
|
import {cinema_list, cinema_search} from "@/apis/update.js"; |
|
|
|
|
import {cinema_list, cinema_search, cinema_user, change_cinema_user} from "@/apis/update.js"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// region 表单代码 |
|
|
|
@ -99,6 +99,7 @@ let refresh_loading = ref(false) |
|
|
|
|
async function get_table_data() { |
|
|
|
|
tableData.value = [] |
|
|
|
|
await cinema_list().then(res => { |
|
|
|
|
console.log(res) |
|
|
|
|
if (Array.isArray(res)) { |
|
|
|
|
tableData.value = [...res] |
|
|
|
|
console.log(tableData) |
|
|
|
@ -121,6 +122,41 @@ onMounted( |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
// endregion |
|
|
|
|
|
|
|
|
|
// region 常用人代码 |
|
|
|
|
// 定义常用人代码被选中的结果 |
|
|
|
|
const selectedUser = ref('') |
|
|
|
|
// 定义变量用于接受返回数据 |
|
|
|
|
let userData = ref([]) |
|
|
|
|
// 定义用于展示的数据变量 |
|
|
|
|
onMounted(async () => { |
|
|
|
|
await cinema_user().then((res) => { |
|
|
|
|
console.log('cinema_user') |
|
|
|
|
const user_list = res.map((item, index) => { |
|
|
|
|
return {key: item.id, label: item.username, value: item.username} |
|
|
|
|
}) |
|
|
|
|
user_list.unshift({key: 0, label: '暂无', value: '暂无'}) |
|
|
|
|
console.log(user_list) |
|
|
|
|
userData.value = [...user_list] |
|
|
|
|
|
|
|
|
|
console.log(res) |
|
|
|
|
console.log(userData.value) |
|
|
|
|
}).catch((err) => { |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const cinemaUserChange = (user, id) => { |
|
|
|
|
const params = {user, id} |
|
|
|
|
change_cinema_user(params).then(res => { |
|
|
|
|
}).catch(err => { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// endregion |
|
|
|
|
|
|
|
|
|
// region 升级相关代码 |
|
|
|
|
// endregion |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
@ -152,8 +188,17 @@ onMounted( |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<el-table :data="tableData" style="width: 100%"> |
|
|
|
|
<el-table-column prop="update_time" label="最后查询时间" min-width="200"></el-table-column> |
|
|
|
|
<el-table-column prop="name" label="影院名称" min-width="200"></el-table-column> |
|
|
|
|
<el-table-column prop="update_time" label="最后查询时间" min-width="170"></el-table-column> |
|
|
|
|
<el-table-column prop="selectedUser" label="当前使用人" min-width="120"> |
|
|
|
|
<template v-slot="scope"> |
|
|
|
|
<el-select v-model="scope.row.user" class="m-2" size="small" laceholder="请选择" style="width: 80px" |
|
|
|
|
@change="cinemaUserChange(scope.row.user, scope.row.id)"> |
|
|
|
|
<el-option v-for="data in userData" :key="data.id" :label="data.label" |
|
|
|
|
:value="data.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="name" label="影院名称" min-width="250"></el-table-column> |
|
|
|
|
<el-table-column prop="ip" label="影院IP" min-width="120"> |
|
|
|
|
<template v-slot="scope"> |
|
|
|
|
<a target="_blank" style="color:#007bff;" v-if="scope.row.ip!=null" |
|
|
|
@ -163,11 +208,11 @@ onMounted( |
|
|
|
|
<span v-else> {{ scope.row.ip }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="zz_num" label="专资编码" min-width="120"></el-table-column> |
|
|
|
|
<el-table-column prop="inner_id" label="鼎新编码" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="sys_ver" label="系统版本" min-width="200"></el-table-column> |
|
|
|
|
<el-table-column prop="client_ver" label="客户端版本" min-width="200"></el-table-column> |
|
|
|
|
<el-table-column prop="db_user" label="数据库账号" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="zz_num" label="专资编码" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="inner_id" label="鼎新编码" min-width="90"></el-table-column> |
|
|
|
|
<el-table-column prop="sys_ver" label="系统版本" min-width="175"></el-table-column> |
|
|
|
|
<el-table-column prop="client_ver" label="客户端版本" min-width="150"></el-table-column> |
|
|
|
|
<el-table-column prop="db_user" label="数据库账号" min-width="90"></el-table-column> |
|
|
|
|
<el-table-column prop="db_pwd" label="数据库密码" min-width="120"></el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</template> |
|
|
|
|