Merge branch 'dev_xd' of http://62.234.3.186:3000/jiangyq/YZProjectCloud into dev_xd
commit
03ec4567c1
|
@ -64,6 +64,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
window.mtree = this
|
||||||
this.modelTrees = [
|
this.modelTrees = [
|
||||||
{
|
{
|
||||||
title: '项目模型',
|
title: '项目模型',
|
||||||
|
@ -140,15 +141,24 @@ export default {
|
||||||
onCheckTree(heckedKeys, e) {
|
onCheckTree(heckedKeys, e) {
|
||||||
const checkNode = e.node.dataRef
|
const checkNode = e.node.dataRef
|
||||||
const checked = e.checked
|
const checked = e.checked
|
||||||
|
const halfChecked = e.node.halfChecked
|
||||||
if (checkNode.type == 'root') {
|
if (checkNode.type == 'root') {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
checkNode.children.forEach((m) => {
|
checkNode.children.forEach((m) => {
|
||||||
|
if (halfChecked) {
|
||||||
|
if (api.m_model.has(m.modelId)) {
|
||||||
|
api.Model.remove(m.modelId)
|
||||||
|
}
|
||||||
|
this.addModel(m.modelId)
|
||||||
|
this.$emit('change')
|
||||||
|
} else {
|
||||||
if (api.m_model.has(m.modelId)) {
|
if (api.m_model.has(m.modelId)) {
|
||||||
api.Model.setVisible(m.modelId, true)
|
api.Model.setVisible(m.modelId, true)
|
||||||
this.$emit('change')
|
this.$emit('change')
|
||||||
} else {
|
} else {
|
||||||
this.addModel(m.modelId)
|
this.addModel(m.modelId)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (api.m_model.size == 0) {
|
if (api.m_model.size == 0) {
|
||||||
|
@ -156,7 +166,7 @@ export default {
|
||||||
}
|
}
|
||||||
checkNode.children.forEach((m) => {
|
checkNode.children.forEach((m) => {
|
||||||
if (api.m_model.has(m.modelId)) {
|
if (api.m_model.has(m.modelId)) {
|
||||||
api.Model.setVisible(m.modelId, false)
|
api.Model.remove(m.modelId)
|
||||||
this.$emit('change')
|
this.$emit('change')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -165,15 +175,23 @@ export default {
|
||||||
}
|
}
|
||||||
if (checkNode.type == 'model') {
|
if (checkNode.type == 'model') {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
if (halfChecked) {
|
||||||
|
if (api.m_model.has(checkNode.modelId)) {
|
||||||
|
api.Model.remove(checkNode.modelId)
|
||||||
|
}
|
||||||
|
this.addModel(checkNode.modelId)
|
||||||
|
this.$emit('change')
|
||||||
|
} else {
|
||||||
if (api.m_model.has(checkNode.modelId)) {
|
if (api.m_model.has(checkNode.modelId)) {
|
||||||
api.Model.setVisible(checkNode.modelId, true)
|
api.Model.setVisible(checkNode.modelId, true)
|
||||||
this.$emit('change')
|
this.$emit('change')
|
||||||
} else {
|
} else {
|
||||||
this.addModel(checkNode.modelId)
|
this.addModel(checkNode.modelId)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (api.m_model.has(checkNode.modelId)) {
|
if (api.m_model.has(checkNode.modelId)) {
|
||||||
api.Model.setVisible(checkNode.modelId, false)
|
api.Model.remove(checkNode.modelId)
|
||||||
this.$emit('change')
|
this.$emit('change')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属单位" prop="subDeptId">
|
<el-form-item label="所属单位" prop="subDeptId">
|
||||||
<el-select v-model="queryParams.subDeptId" style="width:192px;" placeholder="请选择所属单位" clearable @change="()=>{handleQuery();subDeptChange();}">
|
<el-select v-model="queryParams.subDeptId" style="width:192px;" placeholder="请选择所属单位" clearable @change="()=>{handleQuery();subDeptChange();}">
|
||||||
<el-option v-for="(it, idx) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
<el-option v-for="(it) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="姓名" prop="userName">
|
<el-form-item label="姓名" prop="userName">
|
||||||
|
@ -229,6 +229,7 @@ function getProjectList() {
|
||||||
/** 查询考勤管理列表 */
|
/** 查询考勤管理列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
queryParams.value.projectId = userStore.currentPrjId;
|
||||||
listAttendanceUbiData(queryParams.value).then(response => {
|
listAttendanceUbiData(queryParams.value).then(response => {
|
||||||
attendanceUbiDataList.value = response.rows;
|
attendanceUbiDataList.value = response.rows;
|
||||||
total.value = response.total;
|
total.value = response.total;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<el-form-item label="所属单位" prop="subDeptId">
|
<el-form-item label="所属单位" prop="subDeptId">
|
||||||
<el-select v-model="queryParams.subDeptId" style="width:192px;" placeholder="请选择所属单位" clearable
|
<el-select v-model="queryParams.subDeptId" style="width:192px;" placeholder="请选择所属单位" clearable
|
||||||
@change="() => { handleQuery(); }">
|
@change="() => { handleQuery(); }">
|
||||||
<el-option v-for="(it, idx) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
<el-option v-for="(it) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="显示方式" prop="showType">
|
<el-form-item label="显示方式" prop="showType">
|
||||||
|
@ -131,6 +131,7 @@ function handleExport(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
|
queryParams.value.projectId=userStore.currentPrjId;
|
||||||
let queryData={
|
let queryData={
|
||||||
pageNum:queryParams.value.pageNum,
|
pageNum:queryParams.value.pageNum,
|
||||||
pageSize:queryParams.value.pageSize,
|
pageSize:queryParams.value.pageSize,
|
||||||
|
|
|
@ -262,6 +262,7 @@ function getProjectList() {
|
||||||
/** 查询考勤配置列表 */
|
/** 查询考勤配置列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
queryParams.value.projectId = userStore.currentPrjId
|
||||||
listAttendance_cfg(queryParams.value).then((response) => {
|
listAttendance_cfg(queryParams.value).then((response) => {
|
||||||
attendance_cfgList.value = (response.rows || []).map((it) => {
|
attendance_cfgList.value = (response.rows || []).map((it) => {
|
||||||
it.info = proxy.$tryToJson(it.vendorsParameter)
|
it.info = proxy.$tryToJson(it.vendorsParameter)
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
|
|
||||||
<el-form-item label="项目" prop="projectId">
|
<el-form-item label="项目" prop="projectId">
|
||||||
<el-select :disabled="data.currentPrjId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable
|
<el-select :disabled="data.currentPrjId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable @change="handleQuery">
|
||||||
@change="handleQuery">
|
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id"></el-option>
|
||||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备名称" prop="name">
|
<el-form-item label="设备名称" prop="name">
|
||||||
|
@ -26,26 +23,21 @@
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['manage:attendance_ubi_device:add']">新增</el-button>
|
||||||
v-hasPermi="['manage:attendance_ubi_device:add']">新增</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate" v-hasPermi="['manage:attendance_ubi_device:edit']">修改</el-button>
|
||||||
v-hasPermi="['manage:attendance_ubi_device:edit']">修改</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['manage:attendance_ubi_device:remove']">删除</el-button>
|
||||||
v-hasPermi="['manage:attendance_ubi_device:remove']">删除</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['manage:attendance_ubi_device:export']">导出</el-button>
|
||||||
v-hasPermi="['manage:attendance_ubi_device:export']">导出</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="attendance_ubi_deviceList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="attendance_ubi_deviceList" @selection-change="handleSelectionChange">
|
||||||
|
|
||||||
<el-table-column label="公司" align="center" prop="compName" />
|
<el-table-column label="公司" align="center" prop="compName" />
|
||||||
<el-table-column label="所属项目" align="center" prop="projectName" />
|
<el-table-column label="所属项目" align="center" prop="projectName" />
|
||||||
<el-table-column label="设备名称" align="center" prop="name" />
|
<el-table-column label="设备名称" align="center" prop="name" />
|
||||||
|
@ -60,13 +52,13 @@
|
||||||
<span v-if="scope.row.deviceState==3">已禁用</span>
|
<span v-if="scope.row.deviceState==3">已禁用</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="比对模式" align="center" prop="recType" >
|
<el-table-column label="比对模式" align="center" prop="recType">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.recType==1">本地识别</span>
|
<span v-if="scope.row.recType==1">本地识别</span>
|
||||||
<span v-if="scope.row.recType==2">云端识别</span>
|
<span v-if="scope.row.recType==2">云端识别</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="在线状态" align="center" prop="onlineState" >
|
<el-table-column label="在线状态" align="center" prop="onlineState">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.onlineState==1">在线</span>
|
<span v-if="scope.row.onlineState==1">在线</span>
|
||||||
<span v-if="scope.row.onlineState==2">离线</span>
|
<span v-if="scope.row.onlineState==2">离线</span>
|
||||||
|
@ -78,30 +70,26 @@
|
||||||
<span>{{ parseTime(scope.row.lastActiveTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.lastActiveTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="注册状态" align="center" prop="hasRegister" >
|
<el-table-column label="注册状态" align="center" prop="hasRegister">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.onlineState==1">已注册</span>
|
<span v-if="scope.row.onlineState==1">已注册</span>
|
||||||
<span v-else>未注册</span>
|
<span v-else>未注册</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
|
||||||
<template #default="scope">111
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="ChromeFilled" @click="handleAuth(scope.row)"
|
111
|
||||||
v-hasPermi="['manage:attendance_ubi_device:edit']">同步</el-button>
|
<el-button link type="primary" icon="ChromeFilled" @click="handleAuth(scope.row)" v-hasPermi="['manage:attendance_ubi_device:edit']">同步</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:attendance_ubi_device:edit']">修改</el-button>
|
||||||
v-hasPermi="['manage:attendance_ubi_device:edit']">修改</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:attendance_ubi_device:remove']">删除</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['manage:attendance_ubi_device:remove']">删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
@pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 添加或修改宇泛的设备信息对话框 -->
|
<!-- 添加或修改宇泛的设备信息对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body :close-on-click-modal="false"
|
<el-dialog :title="title" v-model="open" width="600px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
|
||||||
:close-on-press-escape="false">
|
|
||||||
<el-form ref="attendance_ubi_deviceRef" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="attendance_ubi_deviceRef" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="所属项目">
|
<el-form-item label="所属项目">
|
||||||
<el-tag effect="plain">{{ form.projectName }}</el-tag>
|
<el-tag effect="plain">{{ form.projectName }}</el-tag>
|
||||||
|
@ -114,9 +102,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备来源" prop="source">
|
<el-form-item label="设备来源" prop="source">
|
||||||
<el-select v-model="form.source" placeholder="请选择设备来源" clearable>
|
<el-select v-model="form.source" placeholder="请选择设备来源" clearable>
|
||||||
<el-option
|
<el-option v-for="dict in ubi_device_source" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
v-for="dict in ubi_device_source"
|
|
||||||
:key="dict.value" :label="dict.label" :value="dict.value" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备序列号" prop="deviceNo">
|
<el-form-item label="设备序列号" prop="deviceNo">
|
||||||
|
@ -137,22 +123,28 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Attendance_ubi_device">
|
<script setup name="Attendance_ubi_device">
|
||||||
import { listAttendance_ubi_device, getAttendance_ubi_device, delAttendance_ubi_device, addAttendance_ubi_device,
|
import {
|
||||||
updateAttendance_ubi_device,authAttendance_ubi_device } from "@/api/manage/attendanceubidevice";
|
listAttendance_ubi_device,
|
||||||
|
getAttendance_ubi_device,
|
||||||
|
delAttendance_ubi_device,
|
||||||
|
addAttendance_ubi_device,
|
||||||
|
updateAttendance_ubi_device,
|
||||||
|
authAttendance_ubi_device,
|
||||||
|
} from '@/api/manage/attendanceubidevice'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import { findMyProjectList } from "@/api/publics";
|
import { findMyProjectList } from '@/api/publics'
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const {ubi_device_source}=proxy.useDict('ubi_device_source');
|
const { ubi_device_source } = proxy.useDict('ubi_device_source')
|
||||||
const attendance_ubi_deviceList = ref([]);
|
const attendance_ubi_deviceList = ref([])
|
||||||
const open = ref(false);
|
const open = ref(false)
|
||||||
const loading = ref(true);
|
const loading = ref(true)
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true)
|
||||||
const ids = ref([]);
|
const ids = ref([])
|
||||||
const single = ref(true);
|
const single = ref(true)
|
||||||
const multiple = ref(true);
|
const multiple = ref(true)
|
||||||
const total = ref(0);
|
const total = ref(0)
|
||||||
const title = ref("");
|
const title = ref('')
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
|
@ -181,54 +173,55 @@ const data = reactive({
|
||||||
isDel: null,
|
isDel: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, trigger: ['blur', 'change'], message: "请输入设备名称" }],
|
name: [{ required: true, trigger: ['blur', 'change'], message: '请输入设备名称' }],
|
||||||
tag: [{ required: true, trigger: ['blur', 'change'], message: "请输入设备标签" }],
|
tag: [{ required: true, trigger: ['blur', 'change'], message: '请输入设备标签' }],
|
||||||
source: [{ required: true, trigger: ['blur', 'change'], message: "请选择设备来源" }],
|
source: [{ required: true, trigger: ['blur', 'change'], message: '请选择设备来源' }],
|
||||||
deviceNo: [{ required: true, trigger: ['blur', 'change'], message: "请输入设备序列号" }],
|
deviceNo: [{ required: true, trigger: ['blur', 'change'], message: '请输入设备序列号' }],
|
||||||
},
|
},
|
||||||
projects: [],
|
projects: [],
|
||||||
currentPrjId: '',
|
currentPrjId: '',
|
||||||
mode:'',
|
mode: '',
|
||||||
});
|
})
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data)
|
||||||
/**
|
/**
|
||||||
* 设备人员同步
|
* 设备人员同步
|
||||||
*/
|
*/
|
||||||
function handleAuth(row){
|
function handleAuth(row) {
|
||||||
authAttendance_ubi_device(row).then(d=>{
|
authAttendance_ubi_device(row).then((d) => {
|
||||||
if(d.code==200){
|
if (d.code == 200) {
|
||||||
proxy.$modal.msgSuccess("同步成功!");
|
proxy.$modal.msgSuccess('同步成功!')
|
||||||
}else{
|
} else {
|
||||||
proxy.$modal.msgError("同步失败!");
|
proxy.$modal.msgError('同步失败!')
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
/** 查询项目列表 */
|
/** 查询项目列表 */
|
||||||
function getProjectList() {
|
function getProjectList() {
|
||||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
findMyProjectList({ pageNum: 1, pageSize: 100 }).then((response) => {
|
||||||
data.projects = response.rows;
|
data.projects = response.rows
|
||||||
if (userStore.currentPrjId) {
|
if (userStore.currentPrjId) {
|
||||||
queryParams.value.projectId = userStore.currentPrjId
|
queryParams.value.projectId = userStore.currentPrjId
|
||||||
data.currentPrjId = userStore.currentPrjId;
|
data.currentPrjId = userStore.currentPrjId
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询宇泛的设备信息列表 */
|
/** 查询宇泛的设备信息列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true
|
||||||
listAttendance_ubi_device(queryParams.value).then(response => {
|
queryParams.value.projectId = userStore.currentPrjId
|
||||||
attendance_ubi_deviceList.value = response.rows;
|
listAttendance_ubi_device(queryParams.value).then((response) => {
|
||||||
total.value = response.total;
|
attendance_ubi_deviceList.value = response.rows
|
||||||
loading.value = false;
|
total.value = response.total
|
||||||
});
|
loading.value = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false;
|
open.value = false
|
||||||
reset();
|
reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
|
@ -239,7 +232,7 @@ function reset() {
|
||||||
projectId: null,
|
projectId: null,
|
||||||
name: null,
|
name: null,
|
||||||
tag: null,
|
tag: null,
|
||||||
sceneGuid: "",
|
sceneGuid: '',
|
||||||
source: null,
|
source: null,
|
||||||
deviceNo: null,
|
deviceNo: null,
|
||||||
addition: null,
|
addition: null,
|
||||||
|
@ -259,99 +252,107 @@ function reset() {
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null,
|
||||||
};
|
}
|
||||||
proxy.resetForm("attendance_ubi_deviceRef");
|
proxy.resetForm('attendance_ubi_deviceRef')
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1
|
||||||
getList();
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm('queryRef')
|
||||||
handleQuery();
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
ids.value = selection.map(item => item.id);
|
ids.value = selection.map((item) => item.id)
|
||||||
single.value = selection.length != 1;
|
single.value = selection.length != 1
|
||||||
multiple.value = !selection.length;
|
multiple.value = !selection.length
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
if (!userStore.currentPrjId) {
|
if (!userStore.currentPrjId) {
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
proxy.$modal.msgWarning('请切换到项目数据!!!')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
reset();
|
reset()
|
||||||
form.value.projectId = userStore.currentPrjId;
|
form.value.projectId = userStore.currentPrjId
|
||||||
form.value.projectName = userStore.currentProName;
|
form.value.projectName = userStore.currentProName
|
||||||
form.value.source=ubi_device_source.value[0].value;
|
form.value.source = ubi_device_source.value[0].value
|
||||||
open.value = true;
|
open.value = true
|
||||||
title.value = "添加宇泛的设备信息";
|
title.value = '添加宇泛的设备信息'
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
function handleUpdate(row) {
|
function handleUpdate(row) {
|
||||||
if (!userStore.currentPrjId) {
|
if (!userStore.currentPrjId) {
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
proxy.$modal.msgWarning('请切换到项目数据!!!')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
reset();
|
reset()
|
||||||
const _id = row.id || ids.value
|
const _id = row.id || ids.value
|
||||||
getAttendance_ubi_device(_id).then(response => {
|
getAttendance_ubi_device(_id).then((response) => {
|
||||||
form.value = response.data;
|
form.value = response.data
|
||||||
open.value = true;
|
open.value = true
|
||||||
title.value = "修改宇泛的设备信息";
|
title.value = '修改宇泛的设备信息'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs["attendance_ubi_deviceRef"].validate(valid => {
|
proxy.$refs['attendance_ubi_deviceRef'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
form.value.comId=userStore.currentComId;
|
form.value.comId = userStore.currentComId
|
||||||
if (form.value.id != null) {
|
if (form.value.id != null) {
|
||||||
updateAttendance_ubi_device(form.value).then(response => {
|
updateAttendance_ubi_device(form.value).then((response) => {
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess('修改成功')
|
||||||
open.value = false;
|
open.value = false
|
||||||
getList();
|
getList()
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
addAttendance_ubi_device(form.value).then(response => {
|
addAttendance_ubi_device(form.value).then((response) => {
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
proxy.$modal.msgSuccess('新增成功')
|
||||||
open.value = false;
|
open.value = false
|
||||||
getList();
|
getList()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
const _ids = row.id || ids.value;
|
const _ids = row.id || ids.value
|
||||||
proxy.$modal.confirm('是否确认删除宇泛的设备信息编号为"' + _ids + '"的数据项?').then(function () {
|
proxy.$modal
|
||||||
return delAttendance_ubi_device(_ids);
|
.confirm('是否确认删除宇泛的设备信息编号为"' + _ids + '"的数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
getList();
|
return delAttendance_ubi_device(_ids)
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => { });
|
.then(() => {
|
||||||
|
getList()
|
||||||
|
proxy.$modal.msgSuccess('删除成功')
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
proxy.download('manage/attendance_ubi_device/export', {
|
proxy.download(
|
||||||
...queryParams.value
|
'manage/attendance_ubi_device/export',
|
||||||
}, `attendance_ubi_device_${new Date().getTime()}.xlsx`)
|
{
|
||||||
|
...queryParams.value,
|
||||||
|
},
|
||||||
|
`attendance_ubi_device_${new Date().getTime()}.xlsx`
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getList();
|
getList()
|
||||||
getProjectList();
|
getProjectList()
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -108,6 +108,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||||
/** 查询项目里程碑列表 */
|
/** 查询项目里程碑列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
queryParams.value.projectId = userStore.currentPrjId;
|
||||||
listMilestone(queryParams.value).then(response => {
|
listMilestone(queryParams.value).then(response => {
|
||||||
data.milestoneList = response.rows;
|
data.milestoneList = response.rows;
|
||||||
total.value = response.total;
|
total.value = response.total;
|
||||||
|
|
|
@ -1,29 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
:model="queryParams"
|
|
||||||
ref="queryRef"
|
|
||||||
:inline="true"
|
|
||||||
v-show="showSearch"
|
|
||||||
label-width="68px"
|
|
||||||
>
|
|
||||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||||
<el-input
|
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.projectName"
|
|
||||||
placeholder="请输入项目名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="创建时间" style="width: 308px">
|
<el-form-item label="创建时间" style="width: 308px">
|
||||||
<el-date-picker
|
<el-date-picker v-model="daterangeCreateDate" value-format="YYYY-MM-DD" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||||
v-model="daterangeCreateDate"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="-"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
></el-date-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
@ -33,58 +15,21 @@
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['manage:photography:add']">新增</el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['manage:photography:add']"
|
|
||||||
>新增</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate" v-hasPermi="['manage:photography:edit']">修改</el-button>
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="Edit"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['manage:photography:edit']"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['manage:photography:remove']">删除</el-button>
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['manage:photography:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['manage:photography:export']">导出</el-button>
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['manage:photography:export']"
|
|
||||||
>导出</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
v-model:showSearch="showSearch"
|
|
||||||
@queryTable="getList"
|
|
||||||
></right-toolbar>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table v-loading="loading" :data="photographyList" @selection-change="handleSelectionChange">
|
||||||
v-loading="loading"
|
|
||||||
:data="photographyList"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="所属公司" align="center" prop="comName" />
|
<el-table-column label="所属公司" align="center" prop="comName" />
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||||
|
@ -96,20 +41,14 @@
|
||||||
<el-table-column label="视频路径" align="center" prop="videoUrl">
|
<el-table-column label="视频路径" align="center" prop="videoUrl">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<video height="100" controls :key="scope.row.videoUrl" v-if="scope.row.videoUrl">
|
<video height="100" controls :key="scope.row.videoUrl" v-if="scope.row.videoUrl">
|
||||||
<source :src="scope.row.videoUrl" type="video/mp4" />
|
<source :src="scope.row.videoUrl" type="video/mp4" />您的浏览器不支持Video标签。
|
||||||
您的浏览器不支持Video标签。
|
|
||||||
</video>
|
</video>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否启用" align="center" prop="state">
|
<el-table-column label="是否启用" align="center" prop="state">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip :content="scope.row.state == 0 ? '启用' : '停用'" placement="top">
|
<el-tooltip :content="scope.row.state == 0 ? '启用' : '停用'" placement="top">
|
||||||
<el-switch
|
<el-switch :active-value="parseInt(0)" :inactive-value="parseInt(1)" v-model="scope.row.state" @change="setStatus($event, scope.row)" />
|
||||||
:active-value="parseInt(0)"
|
|
||||||
:inactive-value="parseInt(1)"
|
|
||||||
v-model="scope.row.state"
|
|
||||||
@change="setStatus($event, scope.row)"
|
|
||||||
/>
|
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -120,33 +59,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:photography:edit']">修改</el-button>
|
||||||
link
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:photography:remove']">删除</el-button>
|
||||||
type="primary"
|
|
||||||
icon="Edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['manage:photography:edit']"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['manage:photography:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNum"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改项目全景对话框 -->
|
<!-- 添加或修改项目全景对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="680px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="680px" append-to-body>
|
||||||
|
@ -161,14 +80,7 @@
|
||||||
<file-upload v-model="form.videoUrl" :limit="1" :fileType="['mp4']" :fileSize="500" />
|
<file-upload v-model="form.videoUrl" :limit="1" :fileType="['mp4']" :fileSize="500" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="视频日期" prop="videoDate">
|
<el-form-item label="视频日期" prop="videoDate">
|
||||||
<el-date-picker
|
<el-date-picker clearable v-model="form.videoDate" type="month" value-format="YYYY-MM" placeholder="请选择视频日期"></el-date-picker>
|
||||||
clearable
|
|
||||||
v-model="form.videoDate"
|
|
||||||
type="month"
|
|
||||||
value-format="YYYY-MM"
|
|
||||||
placeholder="请选择视频日期"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
@ -182,28 +94,22 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Photography">
|
<script setup name="Photography">
|
||||||
import {
|
import { listPhotography, getPhotography, delPhotography, addPhotography, updatePhotography } from '@/api/manage/photography'
|
||||||
listPhotography,
|
|
||||||
getPhotography,
|
|
||||||
delPhotography,
|
|
||||||
addPhotography,
|
|
||||||
updatePhotography,
|
|
||||||
} from "@/api/manage/photography";
|
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const photographyList = ref([]);
|
const photographyList = ref([])
|
||||||
const open = ref(false);
|
const open = ref(false)
|
||||||
const loading = ref(true);
|
const loading = ref(true)
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true)
|
||||||
const ids = ref([]);
|
const ids = ref([])
|
||||||
const single = ref(true);
|
const single = ref(true)
|
||||||
const multiple = ref(true);
|
const multiple = ref(true)
|
||||||
const total = ref(0);
|
const total = ref(0)
|
||||||
const title = ref("");
|
const title = ref('')
|
||||||
const daterangeCreateDate = ref([]);
|
const daterangeCreateDate = ref([])
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
|
@ -217,33 +123,35 @@ const data = reactive({
|
||||||
createDate: null,
|
createDate: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
imageUrl: [{ required: true, message: "全景图片不能为空", trigger: "change" }],
|
imageUrl: [{ required: true, message: '全景图片不能为空', trigger: 'change' }],
|
||||||
videoUrl: [{ required: true, message: "全景视频不能为空", trigger: "change" }],
|
videoUrl: [{ required: true, message: '全景视频不能为空', trigger: 'change' }],
|
||||||
videoDate: [{ required: true, message: "视频日期不能为空", trigger: "change" }]
|
videoDate: [{ required: true, message: '视频日期不能为空', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data)
|
||||||
|
|
||||||
/** 查询项目全景列表 */
|
/** 查询项目全景列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true
|
||||||
queryParams.value.params = {};
|
queryParams.value.params = {}
|
||||||
if (null != daterangeCreateDate && "" != daterangeCreateDate) {
|
queryParams.value.projectId = userStore.currentPrjId
|
||||||
queryParams.value.params["beginCreateDate"] = daterangeCreateDate.value[0];
|
queryParams.value.comId = userStore.currentComId
|
||||||
queryParams.value.params["endCreateDate"] = daterangeCreateDate.value[1];
|
if (null != daterangeCreateDate && '' != daterangeCreateDate) {
|
||||||
|
queryParams.value.params['beginCreateDate'] = daterangeCreateDate.value[0]
|
||||||
|
queryParams.value.params['endCreateDate'] = daterangeCreateDate.value[1]
|
||||||
}
|
}
|
||||||
listPhotography(queryParams.value).then((response) => {
|
listPhotography(queryParams.value).then((response) => {
|
||||||
photographyList.value = response.rows;
|
photographyList.value = response.rows
|
||||||
total.value = response.total;
|
total.value = response.total
|
||||||
loading.value = false;
|
loading.value = false
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false;
|
open.value = false
|
||||||
reset();
|
reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
|
@ -262,124 +170,124 @@ function reset() {
|
||||||
createDate: null,
|
createDate: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateDate: null,
|
updateDate: null,
|
||||||
};
|
}
|
||||||
proxy.resetForm("photographyRef");
|
proxy.resetForm('photographyRef')
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1
|
||||||
getList();
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
daterangeCreateDate.value = [];
|
daterangeCreateDate.value = []
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm('queryRef')
|
||||||
handleQuery();
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
ids.value = selection.map((item) => item.id);
|
ids.value = selection.map((item) => item.id)
|
||||||
single.value = selection.length != 1;
|
single.value = selection.length != 1
|
||||||
multiple.value = !selection.length;
|
multiple.value = !selection.length
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
if(!userStore.currentPrjId){
|
if (!userStore.currentPrjId) {
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
proxy.$modal.msgWarning('请切换到项目数据!!!')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
reset();
|
reset()
|
||||||
form.value.comId = userStore.currentComId;
|
form.value.comId = userStore.currentComId
|
||||||
form.value.comName = userStore.currentComName;
|
form.value.comName = userStore.currentComName
|
||||||
form.value.projectId = userStore.currentPrjId;
|
form.value.projectId = userStore.currentPrjId
|
||||||
form.value.projectName = userStore.currentProName;
|
form.value.projectName = userStore.currentProName
|
||||||
open.value = true;
|
open.value = true
|
||||||
title.value = "添加项目全景";
|
title.value = '添加项目全景'
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
function handleUpdate(row) {
|
function handleUpdate(row) {
|
||||||
reset();
|
reset()
|
||||||
const _id = row.id || ids.value;
|
const _id = row.id || ids.value
|
||||||
getPhotography(_id).then((response) => {
|
getPhotography(_id).then((response) => {
|
||||||
form.value = response.data;
|
form.value = response.data
|
||||||
open.value = true;
|
open.value = true
|
||||||
title.value = "修改项目全景";
|
title.value = '修改项目全景'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs["photographyRef"].validate((valid) => {
|
proxy.$refs['photographyRef'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (form.value.id != null) {
|
if (form.value.id != null) {
|
||||||
updatePhotography(form.value).then((response) => {
|
updatePhotography(form.value).then((response) => {
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess('修改成功')
|
||||||
open.value = false;
|
open.value = false
|
||||||
getList();
|
getList()
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
addPhotography(form.value).then((response) => {
|
addPhotography(form.value).then((response) => {
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
proxy.$modal.msgSuccess('新增成功')
|
||||||
open.value = false;
|
open.value = false
|
||||||
getList();
|
getList()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 状态滑块控制 */
|
/** 状态滑块控制 */
|
||||||
function setStatus(val, row) {
|
function setStatus(val, row) {
|
||||||
proxy.$modal
|
proxy.$modal
|
||||||
.confirm(`是否确认${val == 0 ? "启用" : "停用"}当前数据项?`)
|
.confirm(`是否确认${val == 0 ? '启用' : '停用'}当前数据项?`)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
let _data = { id: row.id, state: val };
|
let _data = { id: row.id, state: val }
|
||||||
return updatePhotography(_data);
|
return updatePhotography(_data)
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList();
|
getList()
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess('修改成功')
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// 取消时恢复原始开关状态
|
// 取消时恢复原始开关状态
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
row.state = 1;
|
row.state = 1
|
||||||
} else {
|
} else {
|
||||||
row.state = 0;
|
row.state = 0
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
const _ids = row.id || ids.value;
|
const _ids = row.id || ids.value
|
||||||
proxy.$modal
|
proxy.$modal
|
||||||
.confirm('是否确认删除项目全景编号为"' + _ids + '"的数据项?')
|
.confirm('是否确认删除项目全景编号为"' + _ids + '"的数据项?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return delPhotography(_ids);
|
return delPhotography(_ids)
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList();
|
getList()
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
proxy.$modal.msgSuccess('删除成功')
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
proxy.download(
|
proxy.download(
|
||||||
"manage/photography/export",
|
'manage/photography/export',
|
||||||
{
|
{
|
||||||
...queryParams.value,
|
...queryParams.value,
|
||||||
},
|
},
|
||||||
`photography_${new Date().getTime()}.xlsx`
|
`photography_${new Date().getTime()}.xlsx`
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getList();
|
getList()
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -145,6 +145,7 @@ function buildTree(all,id){
|
||||||
|
|
||||||
/** 查询计划管理列表 */
|
/** 查询计划管理列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
|
queryParams.value.projectId=userStore.currentPrjId;
|
||||||
if(!queryParams.value.projectId){
|
if(!queryParams.value.projectId){
|
||||||
planList.value=[];
|
planList.value=[];
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
|
@ -141,10 +141,10 @@
|
||||||
|
|
||||||
<script setup name="ProProjectInfoDepts">
|
<script setup name="ProProjectInfoDepts">
|
||||||
import { listProProjectInfoDepts, getProProjectInfoDepts, delProProjectInfoDepts, addProProjectInfoDepts, updateProProjectInfoDepts } from "@/api/manage/proProjectInfoDepts";
|
import { listProProjectInfoDepts, getProProjectInfoDepts, delProProjectInfoDepts, addProProjectInfoDepts, updateProProjectInfoDepts } from "@/api/manage/proProjectInfoDepts";
|
||||||
|
import useUserStore from '@/store/modules/user'
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { pro_dept_type, sys_is_del } = proxy.useDict('pro_dept_type', 'sys_is_del');
|
const { pro_dept_type, sys_is_del } = proxy.useDict('pro_dept_type', 'sys_is_del');
|
||||||
|
const userStore = useUserStore()
|
||||||
const proProjectInfoDeptsList = ref([]);
|
const proProjectInfoDeptsList = ref([]);
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
@ -173,6 +173,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||||
/** 查询参建单位列表 */
|
/** 查询参建单位列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
queryParams.value.projectId = userStore.currentPrjId;
|
||||||
listProProjectInfoDepts(queryParams.value).then(response => {
|
listProProjectInfoDepts(queryParams.value).then(response => {
|
||||||
proProjectInfoDeptsList.value = response.rows;
|
proProjectInfoDeptsList.value = response.rows;
|
||||||
total.value = response.total;
|
total.value = response.total;
|
||||||
|
|
|
@ -244,9 +244,10 @@ const data = reactive({
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
projectName: null,
|
projectName: null,
|
||||||
subDeptType: null,
|
subDeptType: null,
|
||||||
|
projectId: null,
|
||||||
subDeptName: null,
|
subDeptName: null,
|
||||||
subDeptCode: null,
|
subDeptCode: null,
|
||||||
activeTags: 'finished',
|
activeTags: '',
|
||||||
approveStatus: null,
|
approveStatus: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -266,6 +267,7 @@ const { queryParams, form, rules } = toRefs(data)
|
||||||
/** 查询分包单位列表 */
|
/** 查询分包单位列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
queryParams.value.projectId = userStore.currentPrjId
|
||||||
listProProjectInfoSubdepts(queryParams.value).then((response) => {
|
listProProjectInfoSubdepts(queryParams.value).then((response) => {
|
||||||
proProjectInfoSubdeptsList.value = response.rows
|
proProjectInfoSubdeptsList.value = response.rows
|
||||||
total.value = response.total
|
total.value = response.total
|
||||||
|
|
|
@ -335,6 +335,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||||
/** 查询项目进度列表 */
|
/** 查询项目进度列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
queryParams.value.projectId=userStore.currentPrjId;
|
||||||
listSchedule(queryParams.value).then((response) => {
|
listSchedule(queryParams.value).then((response) => {
|
||||||
scheduleList.value = response.rows;
|
scheduleList.value = response.rows;
|
||||||
total.value = response.total;
|
total.value = response.total;
|
||||||
|
|
|
@ -157,6 +157,7 @@ function buildTree(all, id) {
|
||||||
|
|
||||||
/** 查询计划管理列表 */
|
/** 查询计划管理列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
|
queryParams.value.projectId=userStore.currentPrjId;
|
||||||
if (!queryParams.value.projectId) {
|
if (!queryParams.value.projectId) {
|
||||||
planList.value = [];
|
planList.value = [];
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||||
|
|
Loading…
Reference in New Issue