修改考勤配置-增加分区选择
parent
ed39b16952
commit
5ef2938aef
|
|
@ -42,11 +42,14 @@ nbdist/
|
||||||
*.log
|
*.log
|
||||||
*.xml.versionsBackup
|
*.xml.versionsBackup
|
||||||
*.swp
|
*.swp
|
||||||
|
hs_err_pid*.log
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
/dist
|
/dist
|
||||||
/doc
|
/doc
|
||||||
|
.yarn
|
||||||
|
logs/
|
||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
|
|
@ -58,6 +61,10 @@ yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
pnpm-debug.log*
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
# Yarn PnP
|
||||||
|
.pnp.cjs
|
||||||
|
.pnp.loader.mjs
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules/
|
node_modules
|
||||||
|
.yarn
|
||||||
|
.pnp.cjs
|
||||||
|
.pnp.loader.mjs
|
||||||
dist/
|
dist/
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
nodeLinker: pnp
|
||||||
|
|
||||||
|
packageExtensions:
|
||||||
|
vite-plugin-svg-icons@*:
|
||||||
|
dependencies:
|
||||||
|
fast-glob: "*"
|
||||||
|
svg-sprite: "*"
|
||||||
|
element-plus@*:
|
||||||
|
dependencies:
|
||||||
|
"@vue/shared": "*"
|
||||||
|
htm@*:
|
||||||
|
dependencies:
|
||||||
|
preact: "*"
|
||||||
|
|
@ -6,11 +6,17 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"predev": "node scripts/check-yarn.js",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
"predev:prod": "node scripts/check-yarn.js",
|
||||||
"dev:prod": "vite --mode production",
|
"dev:prod": "vite --mode production",
|
||||||
|
"prebuild:prod": "node scripts/check-yarn.js",
|
||||||
"build:prod": "vite build && npm run pkg",
|
"build:prod": "vite build && npm run pkg",
|
||||||
|
"prebuild:stage": "node scripts/check-yarn.js",
|
||||||
"build:stage": "vite build --mode staging",
|
"build:stage": "vite build --mode staging",
|
||||||
|
"prepkg": "node scripts/check-yarn.js",
|
||||||
"pkg": "node make.cjs",
|
"pkg": "node make.cjs",
|
||||||
|
"prepreview": "node scripts/check-yarn.js",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -20,10 +26,12 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "2.3.1",
|
"@element-plus/icons-vue": "2.3.1",
|
||||||
"@rollup/plugin-commonjs": "^28.0.0",
|
"@rollup/plugin-commonjs": "^28.0.0",
|
||||||
|
"@vue/reactivity": "3.4.31",
|
||||||
"@vueup/vue-quill": "1.2.0",
|
"@vueup/vue-quill": "1.2.0",
|
||||||
"@vueuse/core": "10.11.0",
|
"@vueuse/core": "10.11.0",
|
||||||
"axios": "0.28.1",
|
"axios": "0.28.1",
|
||||||
"bpmn-js": "^11.4.1",
|
"bpmn-js": "^11.4.1",
|
||||||
|
"dayjs": "^1.11.19",
|
||||||
"diagram-js": "^11.9.1",
|
"diagram-js": "^11.9.1",
|
||||||
"echarts": "5.5.1",
|
"echarts": "5.5.1",
|
||||||
"element-plus": "^2.8.5",
|
"element-plus": "^2.8.5",
|
||||||
|
|
@ -31,9 +39,13 @@
|
||||||
"file-saver": "2.0.5",
|
"file-saver": "2.0.5",
|
||||||
"fuse.js": "6.6.2",
|
"fuse.js": "6.6.2",
|
||||||
"highlight.js": "11.7.0",
|
"highlight.js": "11.7.0",
|
||||||
|
"inherits": "2.0.4",
|
||||||
"js-base64": "^3.7.5",
|
"js-base64": "^3.7.5",
|
||||||
"js-cookie": "3.0.5",
|
"js-cookie": "3.0.5",
|
||||||
"jsencrypt": "3.3.2",
|
"jsencrypt": "3.3.2",
|
||||||
|
"lodash-es": "4.17.23",
|
||||||
|
"lodash.clonedeep": "4.5.0",
|
||||||
|
"min-dash": "4.2.3",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"qs": "^6.14.0",
|
"qs": "^6.14.0",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
|
const packageManager = process.env.npm_config_user_agent || '';
|
||||||
|
const isYarn = packageManager.includes('yarn');
|
||||||
|
const isPnP = fs.existsSync(__dirname + '/../.pnp.cjs');
|
||||||
|
|
||||||
|
if (!isYarn && isPnP) {
|
||||||
|
console.log('\x1b[33m%s\x1b[0m', '⚠️ 警告:此项目使用 Yarn 4 PnP 模式');
|
||||||
|
console.log('\x1b[33m%s\x1b[0m', '⚠️ 请使用 yarn 命令而不是 npm');
|
||||||
|
console.log('\x1b[36m%s\x1b[0m', '✓ 推荐命令:yarn dev');
|
||||||
|
console.log('\x1b[36m%s\x1b[0m', '✓ 安装依赖:yarn install');
|
||||||
|
console.log('\x1b[36m%s\x1b[0m', '✓ 添加依赖:yarn add <package>');
|
||||||
|
console.log('');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
@ -51,6 +51,13 @@
|
||||||
<el-table-column label="设备标签" align="center" prop="tag" />
|
<el-table-column label="设备标签" align="center" prop="tag" />
|
||||||
<el-table-column label="设备来源" align="center" prop="souceName" />
|
<el-table-column label="设备来源" align="center" prop="souceName" />
|
||||||
<el-table-column label="设备序列号" align="center" prop="deviceNo" />
|
<el-table-column label="设备序列号" align="center" prop="deviceNo" />
|
||||||
|
<el-table-column label="方向" align="center" prop="direction">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.direction == 0">进</span>
|
||||||
|
<span v-if="scope.row.direction == 1">出</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="设备模式" align="center" prop="deviceModel" v-if="false" />
|
||||||
<el-table-column label="设备模式" align="center" prop="deviceModel" v-if="false" />
|
<el-table-column label="设备模式" align="center" prop="deviceModel" v-if="false" />
|
||||||
<el-table-column label="设备状态" align="center" prop="deviceState">
|
<el-table-column label="设备状态" align="center" prop="deviceState">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
|
||||||
|
|
@ -110,12 +110,12 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="所属工区" prop="workAreaId" v-if="false">
|
<el-form-item label="所属工区" prop="workAreaId" v-if="data.workAreaOptions && data.workAreaOptions.length > 0">
|
||||||
<el-select v-model="form.workAreaId" placeholder="请选择工区" clearable>
|
<el-tree-select v-model="form.workAreaId" :data="data.workAreaOptions"
|
||||||
<el-option v-for="workArea in workAreaList" :key="workArea.workAreaId"
|
:props="{ value: 'id', label: 'title', children: 'children' }" value-key="id"
|
||||||
:label="workArea.workAreaName" :value="workArea.workAreaId" />
|
placeholder="请选择工区" clearable style="width:300px;" />
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注" prop="remark" v-if="false">
|
<el-form-item label="备注" prop="remark" v-if="false">
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -133,13 +133,15 @@
|
||||||
|
|
||||||
<script setup name="DeviceDrawer">
|
<script setup name="DeviceDrawer">
|
||||||
import { listAttendance_ubi_device, getAttendance_ubi_device, delAttendance_ubi_device, addAttendance_ubi_device, updateAttendance_ubi_device, authAttendance_ubi_device } from "@/api/manage/attendanceubidevice";
|
import { listAttendance_ubi_device, getAttendance_ubi_device, delAttendance_ubi_device, addAttendance_ubi_device, updateAttendance_ubi_device, authAttendance_ubi_device } from "@/api/manage/attendanceubidevice";
|
||||||
|
|
||||||
import { findMyProjectList } from "@/api/publics";
|
import { findMyProjectList } from "@/api/publics";
|
||||||
|
import { workAreaTree, transformTreeData } from "@/api/system/workAarea";
|
||||||
|
import useUserStore from '@/store/modules/user';
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
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 workAreaList = ref([]);
|
const workAreaList = ref([]);
|
||||||
|
const workAreaOptions = ref([]);
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const ids = ref([]);
|
const ids = ref([]);
|
||||||
|
|
@ -165,7 +167,8 @@ const data = reactive({
|
||||||
currentPrjId: '',
|
currentPrjId: '',
|
||||||
mode: '',
|
mode: '',
|
||||||
show: false,
|
show: false,
|
||||||
row: null
|
row: null,
|
||||||
|
workAreaOptions: []
|
||||||
})
|
})
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
|
@ -319,6 +322,15 @@ function showDrawer(row) {
|
||||||
data.row = row;
|
data.row = row;
|
||||||
data.show = true;
|
data.show = true;
|
||||||
getList();
|
getList();
|
||||||
|
getWorkAreaTree();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工区树结构 */
|
||||||
|
function getWorkAreaTree() {
|
||||||
|
workAreaTree(data.row.projectId).then(response => {
|
||||||
|
// 转换数据格式以适配el-tree-select组件
|
||||||
|
data.workAreaOptions = transformTreeData(response.data);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export default defineConfig(({ mode, command }) => {
|
||||||
},
|
},
|
||||||
// vite 相关配置
|
// vite 相关配置
|
||||||
server: {
|
server: {
|
||||||
port: 80,
|
port: 3000,
|
||||||
host: true,
|
host: true,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue