pengwei
2025-03-20 2591e298a3fd1332ad0ca33059f6ba0b7d426f51
最新代码提交
已删除10个文件
已修改39个文件
已复制1个文件
已添加10个文件
已重命名2个文件
127294 ■■■■ 文件已修改
项目代码/client/.eslintrc.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/.gitignore 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/.vscode/extensions.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/README.md 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/babel.config.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/dist.7z 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/env.product 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/index.html 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/jsconfig.json 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/package-lock.json 19370 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/package.json 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/pnpm-lock.yaml 4947 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/public/ThreeModel/model.gltf 49286 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/public/ThreeModel/test.gltf 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/public/favicon.ico 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/public/logo.png 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/App.vue 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/codeRuleConfig.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/debugInfo.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/goodsInfo.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/http.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/newapi/NjTask.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/newapi/Process.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/newapi/Putake.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/newapi/Template.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/newapi/Thecurrentjob.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/receiveInfo.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/user.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/assets/3D/del.glb 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/assets/3D/model.gltf 49286 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/assets/3D/test.gltf 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/assets/index/bg.png 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/assets/login/bg.png 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/components/basic/RouterLoading.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/components/basic/ViewGrid/ViewGridCustomColumn.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/components/basic/VolElementMenu.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/components/basic/VolForm.vue 386 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/extension/basicinfo/extend/addrouters.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/layout/index.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/main.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/router/charts.js 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/router/redirect.js 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/router/viewGird.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/stores/index.js 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/utils/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/Login.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/system/PDAAuth.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/system/Permission.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/system/Sys_Log.vue 271 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/system/UserInfo.vue 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/BasicInformation/Basicinformation.vue 522 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/CraftCenter/Craftcenter.vue 398 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/DataLogging/Datalogging.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/TaskManagement/Taskmanagement.vue 280 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/TaskManagement/Tasktemplates.vue 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/TheCurrentJob/Startjob.vue 700 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/UserManagement/Usermanagement.vue 488 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/tests/unit/example.spec.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/vite.config.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/vue.config.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/client/.eslintrc.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/client/.gitignore
@@ -1,23 +1,30 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.tsbuildinfo
ÏîÄ¿´úÂë/client/.vscode/extensions.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,3 @@
{
  "recommendations": ["Vue.volar"]
}
ÏîÄ¿´úÂë/client/README.md
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
# Maint
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
## Customize configuration
See [Vite Configuration Reference](https://vite.dev/config/).
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Compile and Minify for Production
```sh
npm run build
```
ÏîÄ¿´úÂë/client/babel.config.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/client/dist.7z
Binary files differ
ÏîÄ¿´úÂë/client/env.product
ÏîÄ¿´úÂë/client/index.html
ÎļþÃû´Ó ÏîÄ¿´úÂë/client/public/index.html ÐÞ¸Ä
@@ -1,32 +1,28 @@
<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8" />
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <!-- <link rel="icon" href="/favicon.ico" /> -->
    <meta
      name="keywords"
      content=".netccore,dotnet core,vue,element,element plus,vue3"
    />
    <!-- <meta
      http-equiv="Content-Security-Policy"
      content="upgrade-insecure-requests"
    /> -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="icon" href="./logo.png" />
    <meta name="description" content="" />
    <title>智能扭矩控制系统</title>
  </head>
  <body>
    <noscript>
    <!-- <noscript>
      <strong
        >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
        properly without JavaScript enabled. Please enable it to
        continue.</strong
      >
    </noscript>
    </noscript> -->
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <script type="module" src="/src/main.js"></script>
  </body>
</html>
<style>
ÏîÄ¿´úÂë/client/jsconfig.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
{
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "exclude": ["node_modules", "dist"]
}
ÏîÄ¿´úÂë/client/package-lock.json
ÎļþÌ«´ó
ÏîÄ¿´úÂë/client/package.json
@@ -1,73 +1,37 @@
{
  "name": "wideseawcs",
  "version": "0.1.0",
  "name": "maint",
  "version": "0.0.0",
  "private": true,
  "type": "module",
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "test:unit": "vue-cli-service test:unit",
    "lint": "vue-cli-service lint"
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "@element-plus/icons-vue": "^2.1.0",
    "@microsoft/signalr": "^6.0.4",
    "ali-oss": "^6.17.1",
    "axios": "^0.21.1",
    "core-js": "^3.6.5",
    "echarts": "^5.0.2",
    "@element-plus/icons-vue": "^2.3.1",
    "ali-oss": "^6.22.0",
    "axios": "^1.8.3",
    "chart.js": "^4.4.7",
    "echarts": "^5.6.0",
    "element-china-area-data": "^6.1.0",
    "element-plus": "^2.2.14",
    "js-cookie": "^3.0.5",
    "jsencrypt": "^3.3.2",
    "less": "^4.1.1",
    "print-js": "^1.6.0",
    "vue": "^3.2.37",
    "vue-3d-model": "^1.4.1",
    "vue-draggable-next": "^2.0.1",
    "vue-qr": "^4.0.9",
    "vue-router": "^4.0.0-0",
    "vuex": "^4.0.0-0",
    "wangeditor": "^4.7.6",
    "xlsx": "^0.18.5"
    "element-plus": "^2.9.6",
    "pinia": "^2.3.0",
    "scss": "^0.2.4",
    "vue": "^3.5.13",
    "vue-3d-model": "2.0.0-alpha.4",
    "vue-chartjs": "^5.3.2",
    "vue-router": "^4.5.0",
    "vuex": "^4.0.2",
    "wangeditor": "^4.7.15"
  },
  "devDependencies": {
    "@babel/plugin-syntax-dynamic-import": "^7.8.3",
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-plugin-router": "~4.5.0",
    "@vue/cli-plugin-unit-mocha": "~4.5.0",
    "@vue/cli-plugin-vuex": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "@vue/test-utils": "^2.0.0-0",
    "babel-eslint": "^10.1.0",
    "chai": "^4.1.2",
    "cross-env": "^7.0.3",
    "less": "^4.1.1",
    "less-loader": "^7.3.0",
    "stylus": "^0.54.7",
    "stylus-loader": "^3.0.2"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "@vue/standard"
    ],
    "rules": {
      "indent": [
        1,
        4
      ]
    },
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },
  "eslintIgnore": [
    "*"
  ]
    "@vitejs/plugin-vue": "^5.2.1",
    "@vitejs/plugin-vue-jsx": "^4.1.1",
    "less": "^4.2.2",
    "sass-embedded": "^1.83.1",
    "sass-loader": "^7.3.1",
    "vite": "^6.0.5",
    "vite-plugin-vue-devtools": "^7.6.8"
  }
}
ÏîÄ¿´úÂë/client/pnpm-lock.yaml
¶Ô±ÈÐÂÎļþ
ÎļþÌ«´ó
ÏîÄ¿´úÂë/client/public/ThreeModel/model.gltf
¶Ô±ÈÐÂÎļþ
ÎļþÌ«´ó
ÏîÄ¿´úÂë/client/public/ThreeModel/test.gltf
ÏîÄ¿´úÂë/client/public/favicon.ico
ÏîÄ¿´úÂë/client/public/logo.png
Binary files differ
ÏîÄ¿´úÂë/client/src/App.vue
@@ -1,116 +1,13 @@
<template>
  <div id="nav"></div>
  <el-config-provider :locale="locale">
    <router-view />
  </el-config-provider>
</template>
<script>
import { ElConfigProvider } from "element-plus";
import zhCn from "element-plus/lib/locale/lang/zh-cn";
export default {
  name: "vol_app",
  components: {
    [ElConfigProvider.name]: ElConfigProvider, //添加组件
  },
  data() {
    return {
      locale: zhCn,
    };
  },
};
<script setup>
import { RouterLink, RouterView } from "vue-router";
</script>
<style lang="less">
.header {
  //自定义
  .el-select__wrapper {
    min-height: 2rem;
    font-size: 0.88rem;
    line-height: 1.25rem;
    box-shadow: none !important;
    border: none;
    outline: none;
  }
  .el-select__placeholder.is-transparent {
    color: #101010;
    font-size: 0.88rem;
  }
  .el-input__inner {
    min-height: 2rem;
    line-height: 1.25rem;
    height: 2rem;
    font-size: 0.88rem;
    width: 15rem;
  }
<template>
  <RouterView />
</template>
  .el-input__wrapper {
    box-shadow: none !important;
  }
  .el-input__wrapper.is-focus {
    box-shadow: none !important;
  }
}
.el-menu-item.is-active {
  color: #fff !important;
  background-color: #1f63ff;
}
.el-menu-item:hover {
  outline: 0 !important;
  color: #fff !important;
  background-color: #1f63ff !important;
}
.el-menu {
  border: 0 !important;
}
.paginationBox {
  /deep/ .btn-prev {
    //上一页按钮
    background-color: #ffff;
    color: #101010 60%;
    font-size: 0.88rem;
  }
  /deep/ .btn-next {
    //下一页按钮
    background-color: #fff;
    color: #101010 60%;
    font-size: 0.88rem;
  }
  /deep/ .el-pagination__jump {
    color: #000; //前往()页
    font-size: 0.88rem;
  }
  /deep/ .el-input__inner {
    color: #020202; //文字颜色
  }
  /deep/ .el-pager li {
    //按钮列表
    border-radius: 0.19rem;
    background-color: rgba(255, 255, 255, 1);
    color: rgba(2, 2, 2, 0.6);
    font-size: 0.88rem;
    text-align: center;
    border: 0.06rem solid rgba(220, 220, 220, 1);
    margin-right: 0.5rem;
  }
  /deep/ .el-pager li:hover {
    //按钮列表 hover
    color: rgba(38, 111, 232, 1);
    border: 0.06rem solid rgba(38, 111, 232, 1);
  }
}
<style lang="scss">
/* ç¼–写媒体查询,根据屏幕大小改变html的字体大小 */
@media screen and (max-width: 1200px) {
  html {
    font-size: 10px;
@@ -153,44 +50,18 @@
  box-sizing: border-box;
}
// #app {
//   width: 100vw;
//   height: 100vh;
//   display: flex;
//   align-items: center;
//   justify-content: center;
// }
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  width: 100%;
}
.el-alert--error.is-light {
  border: 1px solid #ffe0e0;
}
.el-alert--error.is-light {
  color: #f74444 !important;
}
.el-alert--warning.is-light {
  border: 1px solid #ffe6c1;
}
.el-alert--info.is-light {
  border: 1px solid #e6e5e5;
}
.el-alert--info .el-alert__description {
  color: #6b6b6b !important;
}
.el-alert--warning.is-light {
  background-color: #fdf6ec;
  color: #d68409 !important;
}
.el-alert--success.is-light {
  border: 1px solid #cdf7b8;
}
.el-alert--success.is-light .el-alert__description {
  color: #3baf02 !important;
}
</style>
ÏîÄ¿´úÂë/client/src/api/codeRuleConfig.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/client/src/api/debugInfo.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/client/src/api/goodsInfo.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/client/src/api/http.js
@@ -6,6 +6,7 @@
const router = useRouter();
axios.defaults.timeout = 50000;
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
axios.defaults.headers.post["Content-Type"] =
  "application/x-www-form-urlencoded;charset=UTF-8";
axios.defaults.headers.post["Content-Type"] = "multipart/form-data";
ÏîÄ¿´úÂë/client/src/api/newapi/NjTask.js
@@ -18,12 +18,12 @@
//获取任务模板(系统接口)
export const Add = (data) => http.get(`api/NjTask/Add`, data)
//更新任务
export const Update = (data) => http.post(`/api/NjTask/UpdateData`, data)
//查询接口
//批量删除
export const Delete = (data) => http.post(`/api/NjTask/Del`, data)
//导出
export const ExportApi = (data) => http.download(`/api/NjTask/Export`, data, "数据.xlsx", "加载中")
ÏîÄ¿´úÂë/client/src/api/newapi/Process.js
@@ -17,4 +17,10 @@
//获取套筒
export const ArticleInfom = (data) => http.post(`/api/ArticleInfom/GetPageData`, data)
//导出
export const ExportApi = (data) => http.download('/api/Process/Export', data, "工艺数据.xlsx", "加载中")
export const ExportApi = (data) => http.download('/api/Process/Export', data, "工艺数据.xlsx", "加载中")
//删除工艺
export const DelProcess = (data) => http.post(`/api/Process/Del`, data)
//跟新或者编辑工艺
export const AddOrUpdateProcess = (data) => http.post(`/api/Process/AddOrUpdateProcess`, data)
ÏîÄ¿´úÂë/client/src/api/newapi/Putake.js
@@ -1,19 +1,15 @@
import http from "../http";
//当前作业获取数据  ç±»åˆ«
// /api/Putake/ShowPutake
export const ShowPutake = (data) => http.post("api/Putake/ShowPutake", data);
//查看任务详情
// /api/Putake/GetNjtake
export const GetNjtake = (data) => http.post("api/Putake/GetNjtake", data);
//确认领取
///api/Putake/ChangeStatus
export const ChangeStatus = (data) => http.post("api/Putake/ChangeStatus", data);
//数据记录
///api/Putake/Add
export const Add = (data) => http.post("api/Putake/Add", data);
//数据记录查看详情
ÏîÄ¿´úÂë/client/src/api/newapi/Template.js
@@ -13,4 +13,4 @@
export const DeleteData = (data) => http.post('/api/Template/Del', data)
//导出
export const ExportApi = (data) => http.post('/api/Template/Export', data, "模板数据.xlsx", "加载中")
export const ExportApi = (data) => http.download('/api/Template/Export', data, "模板数据.xlsx", "加载中")
ÏîÄ¿´úÂë/client/src/api/newapi/Thecurrentjob.js
@@ -3,10 +3,26 @@
// èŽ·å–æ•°æ®
export const GetPageData = (data) => http.post("/api/Putake/GetPageData", data)
//新获取数据接口
export const GetPageDataNew = (data) => http.post(`/api/User/PermissionView?userId=${data.userId}&group=${data.group}`)
// æŸ¥çœ‹è¯¦æƒ…
export const GetDetail = (data) => http.get(`/api/NjTask/GetNjdetail?njtaskID=${data}`)
//改变状态
export const ChangeStatus = (data) => http.post("/api/Putake/ChangeStatus", data)
export const ChangeStatus = (data) => http.post(`/api/Putake/ChangeStatus?id=${data.id}&gruops=${data.gruops}&Creater=${data.creater}`)
//批量导出
export const ExportApi = (data) => http.download("/api/Putake/Export", data, "数据.xlsx", "加载中")
//获取数字大屏数据
export const GetScreenData = (data) => http.get(`/api/Process/Getcircuit?group=${data.group}&takeid=${data.takeid}`)
//上一步
export const GetPre = (data) => http.post(`/api/Process/PreviousProcess`, data)
//下一步
export const GetNext = (data, flag) => http.post(`/api/Process/Nextprocess?flag=${flag}`, data)
//完成
export const Complete = (data) => http.post(`/api/Putake/ChangeStatus`, data)
//获取力矩值
export const GetTorque = (data) => http.post(`/api/TorqueOp/Checkvalue`, data)
ÏîÄ¿´úÂë/client/src/api/receiveInfo.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/client/src/api/user.js
@@ -22,11 +22,24 @@
//获取账号信息
export const GetUserInfo = (data) => http.post('/api/User/getCurrentUserInfo', data)
//修改密码
export const UpdatePassword = (data) => http.post('/api/User/modifyPwd', data)
//修改密码 id=${data.id}&
export const UpdatePassword = (data) => http.post(`/api/User/modifyPwd?newPwd=${data.newPwd}&oldPwd=${data.oldPwd}`)
//
export const UpdatePwd = (data) => http.post(`/api/User/UpdatePwd?id=${data.id}&newPwd=${data.newPwd}&oldPwd=${data.oldPwd}`)
//导出用户列表
export const ExportApi = (data) => http.download("/api/User/Export", data, "用户列表数据.xlsx", "加载中");
//导出用户角色
export const ExportApi1 = (data) => http.download("/api/Sys_Role/Export", data, "用户角色数据.xlsx", "加载中");
//用户上传头像
export const UploadAvatar = (data) => http.upload('/api/User/UploadAvatar?userId=${data.userId}', data.files)
//新建用户
export const AddUserApi = (data) => http.post('/api/User/AddUser', data,)
//编辑用户
export const EditUserApi = (data) => http.post('/api/User/UploaUser', data)
//保存个人信息
export const Upuserbase = (data) => http.post('/api/User/Upuserbase', data)
ÏîÄ¿´úÂë/client/src/assets/3D/del.glb
Binary files differ
ÏîÄ¿´úÂë/client/src/assets/3D/model.gltf
¶Ô±ÈÐÂÎļþ
ÎļþÌ«´ó
ÏîÄ¿´úÂë/client/src/assets/3D/test.gltf
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/client/public/3D/test.gltf" copy to "\351\241\271\347\233\256\344\273\243\347\240\201/client/src/assets/3D/test.gltf"
ÏîÄ¿´úÂë/client/src/assets/index/bg.png

ÏîÄ¿´úÂë/client/src/assets/login/bg.png

ÏîÄ¿´úÂë/client/src/components/basic/RouterLoading.vue
@@ -1,5 +1,5 @@
<template>
  <div class="router-loading" style="background: #eeeeee5c;">
  <div class="router-loading" style="background: #eeeeee5c">
    <div class="spanner">
      <span></span>
      <span></span>
@@ -17,7 +17,7 @@
export default {
  data() {
    return {};
  }
  },
};
</script>
<style scoped>
ÏîÄ¿´úÂë/client/src/components/basic/ViewGrid/ViewGridCustomColumn.vue
@@ -36,7 +36,7 @@
  </draggable>
</template>
<script>
import { VueDraggableNext } from 'vue-draggable-next';
// import { VueDraggableNext } from 'vue-draggable-next';
import { defineComponent, ref, reactive } from 'vue';
export default defineComponent({
ÏîÄ¿´úÂë/client/src/components/basic/VolElementMenu.vue
@@ -50,7 +50,7 @@
</template>
<script>
import VolElementMenuChild from "./VolElementMenuChild";
// import VolElementMenuChild from "./VolElementMenuChild";
import { useRouter } from "vue-router";
import {
ÏîÄ¿´úÂë/client/src/components/basic/VolForm.vue
@@ -82,12 +82,12 @@
              node-key="key"
              :props="{ label: 'label' }"
            >
              <template #default="{data,node }">
              <template #default="{ data, node }">
                <!-- <el-checkbox v-model="node.checked"></el-checkbox> -->
               <!-- {{getNode(node, data)}} -->
               <!-- {{node.checked}} -->
               <!-- è¿™é‡Œè¿˜æœ‰ç‚¹é—®é¢˜ï¼ŒåŽé¢å¤„理 -->
                {{  data.label}}</template
                <!-- {{getNode(node, data)}} -->
                <!-- {{node.checked}} -->
                <!-- è¿™é‡Œè¿˜æœ‰ç‚¹é—®é¢˜ï¼ŒåŽé¢å¤„理 -->
                {{ data.label }}</template
              >
            </el-tree-select>
            <template
@@ -358,7 +358,7 @@
              v-else-if="item.type == 'cascader'"
              :options="item.data"
              :props="{
                checkStrictly: item.changeOnSelect || item.checkStrictly
                checkStrictly: item.changeOnSelect || item.checkStrictly,
              }"
              @change="item.onChange"
            >
@@ -404,7 +404,7 @@
              type="textarea"
              :autosize="{
                minRows: item.minRows || 2,
                maxRows: item.maxRows || 10
                maxRows: item.maxRows || 10,
              }"
              :placeholder="item.placeholder ? item.placeholder : item.title"
            />
@@ -493,32 +493,32 @@
<script>
const rule = {
  change: [
    'checkbox',
    'select',
    'date',
    'datetime',
    'drop',
    'radio',
    'cascader'
    "checkbox",
    "select",
    "date",
    "datetime",
    "drop",
    "radio",
    "cascader",
  ], // 2020.05.31增加级联类型
  phone: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
  decimal: /(^[\-0-9][0-9]*(.[0-9]+)?)$/,
  number: /(^[\-0-9][0-9]*([0-9]+)?)$/
  number: /(^[\-0-9][0-9]*([0-9]+)?)$/,
};
const inputTypeArr = ['text', 'string', 'mail', 'textarea', 'password'];
const inputTypeArr = ["text", "string", "mail", "textarea", "password"];
const types = {
  int: 'number',
  byte: 'number',
  decimal: 'number', // "float",
  string: 'string',
  bool: 'boolean',
  date: 'datetime',
  date: 'date',
  mail: 'email'
  int: "number",
  byte: "number",
  decimal: "number", // "float",
  string: "string",
  bool: "boolean",
  date: "datetime",
  date: "date",
  mail: "email",
};
//表单验证注意:每次验证都必须执行callback,否则验证不执行回调方法
const colPow = Math.pow(10, 3);
import FormExpand from './VolForm/VolFormRender';
import FormExpand from "./VolForm/VolFormRender";
import {
  defineAsyncComponent,
  defineComponent,
@@ -527,61 +527,61 @@
  toRefs,
  getCurrentInstance,
  onMounted,
  watch
} from 'vue';
  watch,
} from "vue";
export default defineComponent({
  components: {
    FormExpand,
    'vol-upload': defineAsyncComponent(() =>
      import('@/components/basic/VolUpload.vue')
    "vol-upload": defineAsyncComponent(() =>
      import("@/components/basic/VolUpload.vue")
    ),
    'vol-wang-editor': defineAsyncComponent(() =>
      import('@/components/editor/VolWangEditor.vue')
    )
    "vol-wang-editor": defineAsyncComponent(() =>
      import("@/components/editor/VolWangEditor.vue")
    ),
  },
  props: {
    loadKey: {
      // æ˜¯å¦åŠ è½½formRules字段配置的数据源
      type: Boolean,
      default: true
      default: true,
    },
    width: {
      // è¡¨å•宽度
      type: Number,
      default: 0
      default: 0,
    },
    labelWidth: {
      // è¡¨å•左边label文字标签的宽度
      type: Number,
      default: 100
      default: 100,
    },
    formRules: {
      // è¡¨å•配置规则,如字段类型,是否必填
      type: Array,
      default: []
      default: [],
    },
    formFields: {
      type: Object,
      default: () => {
        return {};
      }
      },
    },
    editor: {
      // 2021.01.16编辑器信息 {uploadImgUrl:"",upload:null//上传方法}
      type: Object,
      default: () => {
        return {};
      }
      },
    },
    size: {
      type: String, //large / default / small
      default: 'large'
      default: "large",
    },
    select2Count: {
      //超出数量显示select2组件
      type: Number,
      default: 500
    }
      default: 500,
    },
  },
  computed: {
    rules() {
@@ -597,7 +597,7 @@
        }, 100);
      }
      return ruleResult;
    }
    },
  },
  setup(props, context) {
    const { appContext, proxy } = getCurrentInstance();
@@ -630,7 +630,7 @@
          });
        }
        row.forEach((item, yIndex) => {
          if (item.type == 'number') {
          if (item.type == "number") {
            numberFields.push(item.field);
          }
          // ç›®å‰åªæ”¯æŒselect单选远程搜索,remote远程从后台字典数据源进行搜索,url从指定的url搜索
@@ -644,18 +644,18 @@
          // åˆå§‹åŒ–数据源空对象
          if (item.dataKey) {
            // ä¸‹æ‹‰æ¡†éƒ½å¼ºåˆ¶è®¾ç½®ä¸ºå­—符串类型
            item.columnType = 'string';
            item.columnType = "string";
            if (!item.data) {
              item.data = [];
            }
          }
          if (item.range || item.type == 'range') {
          if (item.range || item.type == "range") {
            if (
              !(props.formFields[item.field] instanceof Array) ||
              props.formFields[item.field].length != 2
            ) {
              props.formFields[item.field] = ['', ''];
              props.formFields[item.field] = ["", ""];
            }
            rangeFields.push(item.field);
          }
@@ -681,10 +681,10 @@
      if (keys.length == 0) return;
      appContext.config.globalProperties.http
        .post('/api/Sys_Dictionary/GetVueDictionary', keys)
        .post("/api/Sys_Dictionary/GetVueDictionary", keys)
        .then((dic) => {
          bindOptions(dic, binds);
          proxy.$emit('dicInited', dic);
          proxy.$emit("dicInited", dic);
        });
    };
    const bindOptions = (dic, binds) => {
@@ -692,7 +692,7 @@
        if (d.data.length > props.select2Count) {
          if (
            !binds.some((x) => {
              return x.key == d.dicNo && x.type == 'cascader';
              return x.key == d.dicNo && x.type == "cascader";
            })
          ) {
            d.data.forEach((item) => {
@@ -706,18 +706,19 @@
          // å¦‚果有数据的则不查询
          if (x.data.length > 0) return true;
          //2022.03.13增加级联数据源自动转换
          if (x.type == 'cascader' || x.type == 'treeSelect') {
          if (x.type == "cascader" || x.type == "treeSelect") {
            let _data = JSON.parse(JSON.stringify(d.data));
            let cascaderArr = appContext.config.globalProperties.base.convertTree(
              _data,
              (node, data, isRoot) => {
                if (!node.inited) {
                  node.inited = true;
                  node.label = node.value;
                  node.value = node.key;
            let cascaderArr =
              appContext.config.globalProperties.base.convertTree(
                _data,
                (node, data, isRoot) => {
                  if (!node.inited) {
                    node.inited = true;
                    node.label = node.value;
                    node.value = node.key;
                  }
                }
              }
            );
              );
            props.formRules.forEach((option) => {
              option.forEach((item) => {
                if (item.dataKey == x.key) {
@@ -726,13 +727,13 @@
                }
              });
            });
          } else if (d.data.length > 0 && !d.data[0].hasOwnProperty('key')) {
          } else if (d.data.length > 0 && !d.data[0].hasOwnProperty("key")) {
            let source = d.data,
              newSource = new Array(source.length);
            for (let index = 0; index < source.length; index++) {
              newSource[index] = {
                key: source['key'] + '',
                value: source['value']
                key: source["key"] + "",
                value: source["value"],
              };
            }
            x.data.push(...newSource);
@@ -746,17 +747,17 @@
    const initUpload = (item, init) => {
      if (!init) return;
      if (
        ['img', 'excel', 'file'].indexOf(item.type != -1) ||
        item.columnType == 'img'
        ["img", "excel", "file"].indexOf(item.type != -1) ||
        item.columnType == "img"
      ) {
        // åªæ˜¯æ²¡è®¾ç½®æ˜¯å¦è‡ªåŠ¨ä¸Šä¼ çš„ï¼Œé»˜è®¤éƒ½æ˜¯é€‰æ‹©æ–‡ä»¶åŽè‡ªåŠ¨ä¸Šä¼ 
        if (!item.hasOwnProperty('autoUpload')) {
        if (!item.hasOwnProperty("autoUpload")) {
          item.autoUpload = true;
        }
        if (!item.hasOwnProperty('fileList')) {
        if (!item.hasOwnProperty("fileList")) {
          item.fileList = true;
        }
        if (!item.hasOwnProperty('downLoad')) {
        if (!item.hasOwnProperty("downLoad")) {
          item.downLoad = true;
        }
        if (!item.removeBefore) {
@@ -790,9 +791,9 @@
      let result = true;
      volform.value.validate((valid) => {
        if (!valid) {
          appContext.config.globalProperties.$message.error('数据验证未通过!');
          appContext.config.globalProperties.$message.error("数据验证未通过!");
          result = false;
        } else if (typeof callback === 'function') {
        } else if (typeof callback === "function") {
          try {
            callback(valid);
          } catch (error) {
@@ -812,7 +813,7 @@
      rangeFields,
      numberFields,
      validate,
      volform
      volform,
      //  initFormRules,
      // initSource
    };
@@ -820,7 +821,7 @@
  created() {
    this.formRules.forEach((rules) => {
      rules.forEach((option) => {
        if (option.type == 'treeSelect' && option.multiple === undefined) {
        if (option.type == "treeSelect" && option.multiple === undefined) {
          option.multiple = true;
        }
      });
@@ -830,7 +831,10 @@
  data() {
    return {
      // remoteCall: true,
      errorImg: 'this.src="' + require('@/assets/imgs/error-img.png') + '"'
      errorImg:
        'this.src="' +
        new URL("../assets/imgs/error-img.png", import.meta.url).href +
        '"',
      // span: 1,
      // rangeFields: [],
    };
@@ -858,7 +862,7 @@
    },
    getSrc(path) {
      if (!path) return;
      if (!this.base.isUrl(path) && path.indexOf('.') != -1) {
      if (!this.base.isUrl(path) && path.indexOf(".") != -1) {
        return this.http.ipAddress + path;
      }
      return path;
@@ -866,10 +870,10 @@
    // æ˜¯å¦ä¸ºå›¾ç‰‡æ–‡ä»¶ç­‰æ ¼å¼å¹¶å¯¹å­—段的转换成数组:[{name:'1.jpg',path:'127.0.0.1/ff/1.jpg'}]
    isFile(item, formFields) {
      if (
        item.type == 'img' ||
        item.columnType == 'img' ||
        item.type == 'excel' ||
        item.type == 'file'
        item.type == "img" ||
        item.columnType == "img" ||
        item.type == "excel" ||
        item.type == "file"
      ) {
        this.convertFileToArray(item, formFields);
        return true;
@@ -896,21 +900,21 @@
        return;
      }
      // å°†ä»¥é€—号隔开的文件分割成数组127.0.0.1/aa/1.jpg,将127.0.0.1/aa/2.jpg
      if (typeof fileInfo === 'string') {
        if (fileInfo.trim() === '') {
      if (typeof fileInfo === "string") {
        if (fileInfo.trim() === "") {
          formFields[item.field] = [];
          return;
        }
        // å¦‚果文件路径是字符串,则使用,拆分
        fileInfo = fileInfo.replace(/\\/g, '/');
        let files = fileInfo.split(',');
        fileInfo = fileInfo.replace(/\\/g, "/");
        let files = fileInfo.split(",");
        formFields[item.field] = [];
        for (let index = 0; index < files.length; index++) {
          let file = files[index];
          let splitFile = file.split('/');
          let splitFile = file.split("/");
          formFields[item.field].push({
            name: splitFile.length > 0 ? splitFile[splitFile.length - 1] : file,
            path: file // this.base.isUrl(file) ? file : this.http.ipAddress + file,
            path: file, // this.base.isUrl(file) ? file : this.http.ipAddress + file,
          });
        }
      }
@@ -920,26 +924,26 @@
        file.path,
        file.name,
        {
          Authorization: this.$store.getters.getToken()
          Authorization: this.$store.getters.getToken(),
        },
        this.http.ipAddress
      );
    },
    validatorPhone(ruleOption, value, callback) {
      if (!ruleOption.required && !value && value != '0') {
      if (!ruleOption.required && !value && value != "0") {
        return callback();
      }
      if (!rule.phone.test((value || '').trim())) {
        return callback(new Error('请输入正确的手机号'));
      if (!rule.phone.test((value || "").trim())) {
        return callback(new Error("请输入正确的手机号"));
      }
      callback();
    },
    validatorPwd(ruleOption, value, callback) {
      if (!ruleOption.required && !value && value != '0') {
      if (!ruleOption.required && !value && value != "0") {
        return callback();
      }
      if ((value + '').trim().length < 6) {
        return callback(new Error('密码长度不能小于6位'));
      if ((value + "").trim().length < 6) {
        return callback(new Error("密码长度不能小于6位"));
      }
      callback();
    },
@@ -951,33 +955,33 @@
        ? val.map((x) => {
            return x;
          })
        : val.split(',');
        : val.split(",");
      for (let index = 0; index < valArr.length; index++) {
        var _item = data.find((x) => {
          return x.key && x.key != '0' && x.key + '' == valArr[index] + '';
          return x.key && x.key != "0" && x.key + "" == valArr[index] + "";
        });
        if (_item) {
          valArr[index] = _item.value;
        }
      }
      return valArr.join(',');
      return valArr.join(",");
    },
    getText(formFields, item) {
      // 2019.10.24修复表单select组件为只读的属性时没有绑定数据源
      let text = formFields[item.field];
      if (typeof text === 'function') return text(formFields);
      if (text === 'null' || text === '' || text === null || text === undefined)
        return '--';
      if (typeof text === "function") return text(formFields);
      if (text === "null" || text === "" || text === null || text === undefined)
        return "--";
      //2021.03.02增加只读时日期处理
      if (item.type == 'date') {
        return text.replace('T', ' ').split(' ')[0];
      if (item.type == "date") {
        return text.replace("T", " ").split(" ")[0];
      }
      //2021.03.31修复表单switch只读时没有转换值的问题
      if (item.type == 'switch') {
        return text ? '是' : '否';
      if (item.type == "switch") {
        return text ? "是" : "否";
      }
      if (!item.data) return text;
      if (item.type == 'selectList' || item.type == 'checkbox') {
      if (item.type == "selectList" || item.type == "checkbox") {
        return this.convertArrayValue(item.data, text);
      }
      var _item = item.data.find((x) => {
@@ -991,7 +995,7 @@
      // console.log(2);
    },
    onChange(item, value) {
      if (item.onChange && typeof item.onChange === 'function') {
      if (item.onChange && typeof item.onChange === "function") {
        item.onChange(value, item);
      }
    },
@@ -1002,7 +1006,7 @@
        //  console.log('undefined');
      }
      this.remoteCall = false;
      if (item.onChange && typeof item.onChange === 'function') {
      if (item.onChange && typeof item.onChange === "function") {
        item.onChange(value, item);
      }
    },
@@ -1016,7 +1020,7 @@
        return;
      }
      if (
        val == '' ||
        val == "" ||
        (item.data.length == 1 &&
          (val == item.data[0].key || val == item.data[0].value))
      ) {
@@ -1025,14 +1029,14 @@
      // å¼¹å‡ºæ¡†æˆ–初始化表单时给data设置数组默认值2
      // 2020.09.26修复远程搜索自定义url不起作用的问题
      let url;
      if (typeof item.url === 'function') {
      if (typeof item.url === "function") {
        url = item.url(val, item.dataKey, item);
      } else {
        url =
          (item.url || '/api/Sys_Dictionary/GetSearchDictionary') +
          '?dicNo=' +
          (item.url || "/api/Sys_Dictionary/GetSearchDictionary") +
          "?dicNo=" +
          item.dataKey +
          '&value=' +
          "&value=" +
          val;
      }
      this.http.post(url).then((dicData) => {
@@ -1043,14 +1047,14 @@
      });
    },
    getObject(date) {
      if (typeof date === 'object') {
      if (typeof date === "object") {
        return date;
      }
      return new Date(date);
    },
    reset(sourceObj) {
      // é‡ç½®è¡¨å•时,禁用远程查询
      this.$refs['volform'].resetFields();
      this.$refs["volform"].resetFields();
      if (this.rangeFields.length) {
        this.rangeFields.forEach((key) => {
          this.formFields[key].splice(0);
@@ -1085,24 +1089,24 @@
      if (
        // item.readonly ||
        // item.disabled ||
        item.type == 'switch' ||
        item.type == 'range'
        item.type == "switch" ||
        item.type == "range"
      )
        return { required: false };
      // ç”¨æˆ·è®¾ç½®çš„自定义方法
      if (item.validator && typeof item.validator === 'function') {
      if (item.validator && typeof item.validator === "function") {
        return {
          validator: (rule, val, callback) => {
            // ç”¨æˆ·è‡ªå®šä¹‰çš„æ–¹æ³•,如果返回了值,直接显示返回的值,验证不通过
            let message = item.validator(rule, val);
            if (message) return callback(new Error(message + ''));
            if (message) return callback(new Error(message + ""));
            return callback();
          },
          required: item.required,
          trigger: rule.change.indexOf(item.type) != -1 ? 'change' : 'blur'
          trigger: rule.change.indexOf(item.type) != -1 ? "change" : "blur",
        };
      }
      if (['img', 'excel', 'file'].indexOf(item.type) != -1) {
      if (["img", "excel", "file"].indexOf(item.type) != -1) {
        return {
          validator: (rule, val, callback) => {
            //2021.09.05移除文件上传默认必填
@@ -1112,118 +1116,118 @@
              (!val || !val.length)
            ) {
              return callback(
                new Error(item.type == 'img' ? '请上传照片' : '请上传文件')
                new Error(item.type == "img" ? "请上传照片" : "请上传文件")
              );
            }
            return callback();
          },
          required: item.required,
          trigger: 'change'
          trigger: "change",
        };
      }
      // è®¾ç½®æ•°å­—的最大值民最小值
      if (
        item.type == 'number' ||
        item.columnType == 'number' ||
        item.columnType == 'int' ||
        item.type == 'decimal'
        item.type == "number" ||
        item.columnType == "number" ||
        item.columnType == "int" ||
        item.type == "decimal"
      ) {
        // å¦‚果是必填项的数字,设置一个默认最大与最值小
        if (item.required && typeof item.min !== 'number') {
        if (item.required && typeof item.min !== "number") {
          item.min = 0; //item.type == "decimal" ? 0.1 : 1;
        }
        return {
          required: item.required,
          message: item.title + '只能是数字',
          message: item.title + "只能是数字",
          title: item.title,
          trigger: 'blur',
          trigger: "blur",
          min: item.min,
          max: item.max,
          type: item.columnType || item.type,
          validator: (ruleObj, value, callback) => {
            if (!ruleObj.min && !ruleObj.max) {
              if (ruleObj.required) {
                if ((!value && value != '0') || !rule.decimal.test(value)) {
                  return callback(new Error('只能是数字'));
                if ((!value && value != "0") || !rule.decimal.test(value)) {
                  return callback(new Error("只能是数字"));
                }
              }
              return callback();
            }
            if (this.isReadonly(item)) return callback();
            if (ruleObj.type == 'number') {
            if (ruleObj.type == "number") {
              if (!rule.number.test(value)) {
                ruleObj.message = ruleObj.title + '只能是整数';
                ruleObj.message = ruleObj.title + "只能是整数";
                return callback(new Error(ruleObj.message));
              }
            } else {
              if (!rule.decimal.test(value)) {
                ruleObj.message = ruleObj.title + '只能是数字';
                ruleObj.message = ruleObj.title + "只能是数字";
                return callback(new Error(ruleObj.message));
              }
            }
            if (
              ruleObj.min !== undefined &&
              typeof ruleObj.min === 'number' &&
              typeof ruleObj.min === "number" &&
              value < ruleObj.min
            ) {
              ruleObj.message = ruleObj.title + '不能小于' + ruleObj.min;
              ruleObj.message = ruleObj.title + "不能小于" + ruleObj.min;
              return callback(new Error(ruleObj.message));
            }
            if (
              ruleObj.max !== undefined &&
              typeof ruleObj.max === 'number' &&
              typeof ruleObj.max === "number" &&
              value > ruleObj.max
            ) {
              ruleObj.message = ruleObj.title + '不能大于' + ruleObj.max;
              ruleObj.message = ruleObj.title + "不能大于" + ruleObj.max;
              return callback(new Error(ruleObj.message));
            }
            return callback();
          }
          },
        };
      }
      // æ‰‹æœºã€å¯†ç éªŒè¯
      if (item.type == 'password' || item.type == 'phone') {
      if (item.type == "password" || item.type == "phone") {
        return {
          validator:
            item.type == 'phone' ? this.validatorPhone : this.validatorPwd,
            item.type == "phone" ? this.validatorPhone : this.validatorPwd,
          required: item.required,
          trigger: 'blur'
          trigger: "blur",
        };
      }
      if (!item.required && item.type != 'mail') return { required: false };
      if (!item.required && item.type != "mail") return { required: false };
      if (!item.hasOwnProperty('type')) item.type = 'text';
      if (!item.hasOwnProperty("type")) item.type = "text";
      if (inputTypeArr.indexOf(item.type) != -1) {
        let message =
          item.title +
          (item.type == 'mail' ? '必须是一个邮箱地址' : '不能为空');
        let type = item.type == 'mail' ? 'email' : types[item.columnType];
          (item.type == "mail" ? "必须是一个邮箱地址" : "不能为空");
        let type = item.type == "mail" ? "email" : types[item.columnType];
        let _rule = {
          required: true,
          message: message,
          trigger: 'blur',
          trigger: "blur",
          type: type,
          validator: (ruleObj, value, callback) => {
            if (
              !this.isReadonly(item) &&
              (value === '' || value === undefined || value === null)
              (value === "" || value === undefined || value === null)
            ) {
              return callback(new Error(ruleObj.message));
            }
            return callback();
          }
          },
        };
        if (item.type == 'mail') {
        if (item.type == "mail") {
          _rule.validator = undefined;
          return _rule;
        }
        if (item.min) {
          _rule.min = item.min;
          _rule.message = item.title + '至少' + item.min + '个字符!';
          _rule.message = item.title + "至少" + item.min + "个字符!";
        }
        if (item.max) {
          return [
@@ -1231,94 +1235,94 @@
            {
              max: item.max,
              required: true,
              message: item.title + '最多' + item.max + '个字符!',
              trigger: 'blur'
            }
              message: item.title + "最多" + item.max + "个字符!",
              trigger: "blur",
            },
          ];
        }
        return _rule;
      }
      if (item.type == 'radio') {
      if (item.type == "radio") {
        return {
          required: item.required,
          message: '请选择' + item.title,
          trigger: 'change',
          type: 'string'
          message: "请选择" + item.title,
          trigger: "change",
          type: "string",
        };
      }
      if (
        item.type == 'date' ||
        item.type == 'datetime' ||
        item.type == 'month' ||
        item.type == 'time'
        item.type == "date" ||
        item.type == "datetime" ||
        item.type == "month" ||
        item.type == "time"
      ) {
        return {
          required: true,
          message: '请选择' + item.title,
          trigger: 'change',
          type: item.range ? 'array' : 'string',
          message: "请选择" + item.title,
          trigger: "change",
          type: item.range ? "array" : "string",
          validator: (rule, val, callback) => {
            if (this.isReadonly(item)) return callback();
            // ç”¨æˆ·è‡ªå®šä¹‰çš„æ–¹æ³•,如果返回了值,直接显示返回的值,验证不通过
            if (!val || (item.range && !val.length)) {
              return callback(new Error('请选择日期'));
              return callback(new Error("请选择日期"));
            }
            return callback();
          }
          },
        };
      }
      if (item.type == 'cascader') {
      if (item.type == "cascader") {
        return {
          type: 'array',
          type: "array",
          required: true,
          min: item.min || 1,
          // message: "请选择" + item.title,
          trigger: 'change',
          trigger: "change",
          validator: (rule, val, callback) => {
            if (this.isReadonly(item)) return callback();
            // ç”¨æˆ·è‡ªå®šä¹‰çš„æ–¹æ³•,如果返回了值,直接显示返回的值,验证不通过
            let _arr = this.formFields[item.field];
            if (!_arr || !_arr.length) {
              return callback(new Error('请选择' + item.title));
              return callback(new Error("请选择" + item.title));
            }
            return callback();
          }
          },
        };
      }
      if (
        ['select', 'selectList', 'checkbox', 'cascader', 'treeSelect'].indexOf(
        ["select", "selectList", "checkbox", "cascader", "treeSelect"].indexOf(
          item.type
        ) != -1
      ) {
        let _rule = {
          type: item.type == 'select' ? 'string' : 'array',
          type: item.type == "select" ? "string" : "array",
          required: true,
          min: item.min || 1,
          message: '请选择' + item.title,
          trigger: 'change',
          message: "请选择" + item.title,
          trigger: "change",
          validator: (rule, value, callback) => {
            if (this.isReadonly(item)) return callback();
            //2021.11.27修复多选没有提示的问题
            if (value == undefined || value === '') {
            if (value == undefined || value === "") {
              return callback(new Error(rule.message));
            } else if (
              (item.type == 'checkbox' ||
                item.type == 'selectList' ||
                item.type == 'treeSelect') &&
              (item.type == "checkbox" ||
                item.type == "selectList" ||
                item.type == "treeSelect") &&
              (!(value instanceof Array) || !value.length)
            ) {
              return callback(new Error(rule.message));
            }
            return callback();
          }
          },
        };
        if (_rule.max) {
          _rule.nax = item.max;
          _rule.message = '最多只能选择' + item.max + '项';
          _rule.message = "最多只能选择" + item.max + "项";
        }
        return _rule;
      }
@@ -1330,7 +1334,7 @@
      }
      return (
        date1.valueOf() <
        (typeof date2 == 'number' ? date2 : new Date(date2).valueOf())
        (typeof date2 == "number" ? date2 : new Date(date2).valueOf())
      );
    },
    getDateOptions(date, item) {
@@ -1338,27 +1342,27 @@
      if ((!item.min && !item.max) || !date) {
        return false;
      }
      if (item.min && item.min.indexOf(' ') == -1) {
      if (item.min && item.min.indexOf(" ") == -1) {
        //不设置时分秒,后面会自动加上 08:00
        item.min = item.min + ' 00:00:000';
        item.min = item.min + " 00:00:000";
      }
      return (
        this.compareDate(date, item.min) || !this.compareDate(date, item.max)
      );
    },
    getDateFormat(item) {
      if (item.type == 'month') {
        return 'YYYY-MM';
      if (item.type == "month") {
        return "YYYY-MM";
      }
      // if (item.type=='time') {
      //     return 'HH:mm:ss'
      // }
      //见https://day.js.org/docs/zh-CN/display/format
      return item.type == 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss';
      return item.type == "date" ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm:ss";
    },
    dateRangeChange(val, item) {
      if (!val) {
        this.$emit('update:formFields');
        this.$emit("update:formFields");
        return;
      }
      item.onChange && item.onChange(val);
@@ -1372,10 +1376,10 @@
    filterMethod(value, data) {
      return data.label.includes(value);
    },
    getNode( label,node, data){
      console.log(label)
    }
  }
    getNode(label, node, data) {
      console.log(label);
    },
  },
});
</script>
<style lang="less" scoped>
@@ -1455,8 +1459,8 @@
  padding-left: 5px;
}
.el-form-item ::v-deep(textarea) {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif !important;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif !important;
}
.el-form-item ::v-deep(.el-select .el-select__tags > span) {
  display: flex;
ÏîÄ¿´úÂë/client/src/extension/basicinfo/extend/addrouters.vue
@@ -163,7 +163,7 @@
    
    <script>
import VolBox from "@/components/basic/VolBox.vue";
import { el } from "element-plus/es/locale";
// import { el } from "element-plus/es/locale";
export default {
  components: { VolBox },
  data() {
ÏîÄ¿´úÂë/client/src/layout/index.vue
@@ -79,12 +79,12 @@
            >
              <div>
                <span style="color: rgb(255, 255, 255); font-size: 0.88rem"
                  >角色:超级管理员</span
                  >角色:{{ acountInfo.roleName }}</span
                >
              </div>
              <div style="margin-left: 2rem">
                <span style="color: rgb(255, 255, 255); font-size: 0.88rem"
                  >姓名:{{ userName }}</span
                  >姓名:{{ acountInfo.userTrueName }}</span
                >
              </div>
              <img
@@ -181,13 +181,12 @@
<script>
// import { getTreeMenu } from "@/api/menu.js";
import { baseUrl } from "../utils";
import loading from "@/components/basic/RouterLoading";
import VolMenu from "@/components/basic/VolElementMenu.vue";
import loading from "../components/basic/RouterLoading.vue";
// import VolMenu from "@/components/basic/VolElementMenu.vue";
import Message from "@/views/index/Message.vue";
import MessageConfig from "@/views/index/MessageConfig.js";
// import MessageConfig from "@/views/index/MessageConfig.js";
var imgUrl = require("@/assets/imgs/wms_x.png");
var imgUrl = new URL("../assets/imgs/wms_x.png", import.meta.url).href;
var $this;
var $interval;
var $indexDate;
@@ -202,9 +201,11 @@
import { useRouter, useRoute } from "vue-router";
import store from "../store/index";
import http from "@/../src/api/http.js";
import { GetUserInfo } from "@/api/user";
export default defineComponent({
  components: {
    VolMenu,
    // VolMenu,
    loading,
    Message,
  },
@@ -256,7 +257,9 @@
      },
    ]);
    const errorImg = ref(
      'this.src="' + require("@/assets/imgs/error-img.png") + '"'
      'this.src="' +
        new URL("../assets/imgs/error-img.png", import.meta.url).href +
        '"'
    );
    const selectId = ref("1");
    // ã€é¦–页】标签序号(当前右键选中的菜单)
@@ -556,6 +559,7 @@
        }
      }
      Object.assign(_config.$tabs, { open: open, close: close });
      getUser();
      //初始化菜单
      // getTreeMenu().then((res) => {
@@ -605,6 +609,12 @@
      //   selectId.value = "1";
      // });
    };
    const acountInfo = ref({});
    const getUser = () => {
      GetUserInfo({}).then((res) => {
        acountInfo.value = res.data;
      });
    };
    created();
    return {
      menuWidth,
@@ -639,6 +649,7 @@
      closeTabs,
      currentMenuId,
      router,
      acountInfo,
    };
  },
  /**
ÏîÄ¿´úÂë/client/src/main.js
@@ -12,8 +12,6 @@
// import locale from 'element-plus/lib/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import permission from './api/permission'
import viewgird from './components/basic/ViewGrid';
@@ -39,7 +37,7 @@
            { text: '拒绝', value: 3 },
            { text: '驳回', value: 4 }
        ],
        status:[0,2] //审核中的数据
        status: [0, 2] //审核中的数据
        // å¾…审核 = 0,
        // å®¡æ ¸é€šè¿‡ = 1,
        // å®¡æ ¸ä¸­ = 2,
ÏîÄ¿´úÂë/client/src/router/charts.js
@@ -1,17 +1,18 @@
let charts=[
    {
        path: '/chart',
        name: 'chart',
        component: () => import('@/views/charts/chart.vue')
    },
    {
        path: '/formChart',
        name: 'formChart',
        component: () => import('@/views/charts/formChart.vue')
    },
    {
        path: '/flex',
        name: 'flex',
        component: () => import('@/views/charts/flex.vue')
    }]
let charts = [
    // {
    //     path: '/chart',
    //     name: 'chart',
    //     component: () => import('@/views/charts/chart.vue')
    // },
    // {
    //     path: '/formChart',
    //     name: 'formChart',
    //     component: () => import('@/views/charts/formChart.vue')
    // },
    // {
    //     path: '/flex',
    //     name: 'flex',
    //     component: () => import('@/views/charts/flex.vue')
    // }
]
export default charts
ÏîÄ¿´úÂë/client/src/router/index.js
@@ -98,7 +98,7 @@
      alert(error.message);
    }
    localStorage.setItem("route_error", error.message);
  } catch (e) {}
  } catch (e) { }
  window.location.href = "/";
});
export default router;
ÏîÄ¿´úÂë/client/src/router/redirect.js
@@ -1,22 +1,24 @@
let redirect = [{
    path: '/404',
    name: '404',
    component: () => import('@/components/redirect/404'),
    meta:{
        anonymous:true
      }
}, {
    path: '/401',
    name: '401',
    component: () => import('@/components/redirect/401')
}, {
    path: '/coding',
    name: 'coding',
    component: () => import('@/components/redirect/coding')
}, {
    path: '/message',
    name: 'message',
    component: () => import('@/components/redirect/Message.vue')
}]
let redirect = [
    //{
    //     path: '/404',
    //     name: '404',
    //     component: () => import('../components/redirect/404'),
    //     meta: {
    //         anonymous: true
    //     }
    // }, {
    //     path: '/401',
    //     name: '401',
    //     component: () => import('@/components/redirect/401')
    // }, {
    //     path: '/coding',
    //     name: 'coding',
    //     component: () => import('@/components/redirect/coding')
    // }, {
    //     path: '/message',
    //     name: 'message',
    //     component: () => import('@/components/redirect/Message.vue')
    // }
]
export default redirect;
ÏîÄ¿´úÂë/client/src/router/viewGird.js
@@ -1,9 +1,9 @@
let viewgird = [
  {
    path: "/Sys_Log",
    name: "sys_Log",
    component: () => import("@/views/system/Sys_Log.vue"),
  },
  // {
  //   path: "/Sys_Log",
  //   name: "sys_Log",
  //   component: () => import("@/views/system/Sys_Log.vue"),
  // },
  {
    path: "/Sys_User",
    name: "Sys_User",
ÏîÄ¿´úÂë/client/src/stores/index.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
import { createStore } from "vuex";
const keys = { USER: "user" };
function getUserInfo(state) {
  if (state.userInfo) return state.userInfo;
  let userInfo = localStorage.getItem(keys.USER);
  if (userInfo) {
    state.userInfo = JSON.parse(userInfo);
  }
  return state.userInfo;
}
export default createStore({
  state: {
    data: {},
    permission: [],
    isLoading: false, //2020.06.03增加路由切换时加载提示
    userInfo: null,
    // wcsState: true//wcs服务状态
  },
  mutations: {
    setPermission(state, data) {
      //调用方式 this.$store.commit('setPermission', data)
      if (!data || typeof data != "object") return;
      if (data instanceof Array) {
        state.permission.push(...data);
      } else {
        state.permission = data;
      }
    },
    setUserInfo(state, data) {
      state.userInfo = data;
      localStorage.setItem(keys.USER, JSON.stringify(data));
    },
    clearUserInfo(state) {
      state.permission = [];
      state.userInfo = null;
      localStorage.removeItem(keys.USER);
    },
    test(state) {
      return 113344;
    },
    updateLoadingState(state, flag) {
      state.isLoading = flag;
    },
  },
  getters: {
    getPermission: (state) => (path) => {
      //调用方式 store.getters.getPermission('sys_User')
      if (!path) return state.permission;
      return state.permission.find((x) => x.path == path);
    },
    getUserInfo: (state) => () => {
      getUserInfo(state);
      return state.userInfo;
    },
    getUserName: (state) => () => {
      getUserInfo(state);
      if (state.userInfo) {
        return state.userInfo.userName;
      }
      return "未获取到登录信息";
    },
    getToken: (state) => () => {
      getUserInfo(state);
      if (state.userInfo) {
        return "Bearer " + state.userInfo.token;
      }
      return "";
    },
    isLogin: (state) => () => {
      if (getUserInfo(state)) {
        return true;
      }
      return false;
    },
    isLoading: (state) => () => {
      return state.isLoading;
    },
    data: (state) => () => {
      return state.data;
    },
    getData: (state) => () => {
      return state.data;
    },
  },
  actions: {
    setPermission(context, data) {
      context.commit("setPermission", data); //调用方式 store.dispatch('push')
    },
    toDo(context) {
      return context.Store.m;
    },
    onLoading(context, flag) {
      context.commit("updateLoadingState", flag);
    },
  },
});
ÏîÄ¿´úÂë/client/src/utils/index.js
@@ -3,6 +3,9 @@
export const baseUrl = "http://192.168.0.80:5000/"
// http://115.159.85.185:9091/
// http://192.168.0.80:5000/
// 115.159.85.185:9091
// http://115.159.85.185:9098/
//对象转FormData生成方法
ÏîÄ¿´úÂë/client/src/views/Login.vue
@@ -242,6 +242,11 @@
</script>
<style lang="less" scoped>
// * {
//   box-sizing: border-box;
//   padding: 0;
//   margin: 0;
// }
.login-container {
  width: 100%;
  min-height: 100vh;
@@ -261,7 +266,7 @@
  }
  .login-box {
    width: 100%;
    height: ceil(100vh - 8rem);
    height: calc(100vh - 4.57rem);
    display: flex;
    background-color: #f6f7fc;
    .left-img {
ÏîÄ¿´úÂë/client/src/views/system/PDAAuth.vue
@@ -68,7 +68,7 @@
import { defineComponent, ref, reactive, getCurrentInstance } from "vue";
import http from "@/../src/api/http.js";
import { ElMessage } from "element-plus";
import { lv } from "element-plus/es/locale";
// import { lv } from "element-plus/es/locale";
export default defineComponent({
  setup() {
    const selectId = ref(-1);
ÏîÄ¿´úÂë/client/src/views/system/Permission.vue
@@ -34,11 +34,7 @@
      class="role-tree-right flex-col"
    >
      <div class="title" style="display: flex; justify-content: space-between">
        <div>
          è§’色权限管理({{
            userInfo.userName ? userInfo.userName : "超级管理员"
          }})
        </div>
        <div>角色权限管理({{ info.roleName }})</div>
        <el-icon @click="goBack" size="25"><CloseBold /></el-icon>
      </div>
      <div class="title">
@@ -107,6 +103,9 @@
    const route = useRoute();
    const router = useRouter();
    const userInfo = reactive({});
    const info = ref({});
    info.value = JSON.parse(history.state?.info);
    const leftCheckChange = (node, selected) => {
      node.actions.forEach((x, index) => {
        x.checked = selected;
@@ -188,13 +187,12 @@
      getUserRole(node);
    };
    const getUserRole = (item) => {
      selectId.value = item.id;
      roleList.forEach((x) => {
        x.actions.forEach((a) => {
          a.checked = false;
        });
      });
      let url = `/api/Sys_Role/getUserTreePermission?roleId=${item.id}`;
      let url = `/api/Sys_Role/getUserTreePermission?roleId=${info.value.roleId}`;
      http.post(url, {}, true).then((result) => {
        if (!result.status) return;
        result.data.forEach((item) => {
@@ -250,9 +248,6 @@
    let $message =
      getCurrentInstance().appContext.config.globalProperties.$message;
    const save = () => {
      if (selectId.value <= 0) {
        return $message.error("请选择角色!");
      }
      let userPermissions = [];
      roleList.forEach((x) => {
        let checkedPermission = x.actions.filter((f) => {
@@ -268,7 +263,7 @@
          });
        }
      });
      let url = `api/Sys_Role/SavePermission?roleId=${selectId.value}`;
      let url = `api/Sys_Role/SavePermission?roleId=${info.value.roleId}`;
      http.post(url, userPermissions, true).then((result) => {
        $message[result.status ? "success" : "error"](result.message);
      });
@@ -276,12 +271,8 @@
    load();
    getCurrentTreePermission();
    onActivated(() => {
      let detail = history.state.info;
      userInfo.value = JSON.parse(detail || {});
    });
    console.log(userInfo.value);
    getUserRole();
    console.log("123", info.value);
    return {
      list,
@@ -303,7 +294,7 @@
      route,
      goBack,
      router,
      userInfo,
      info,
    };
  },
});
ÏîÄ¿´úÂë/client/src/views/system/Sys_Log.vue
@@ -5,66 +5,219 @@
 *业务请在@/extension/system/Sys_Log.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  </view-grid>
</template>
<script>
    import extend from "@/extension/system/Sys_Log.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '系统日志',
                name: 'Sys_Log',
                url: "/Sys_Log/",
                sortName: "Id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"BeginDate":"","Url":"","LogType":[],"Success":[],"UserIP":"","ServiceIP":"","Role_Id":""});
            const searchFormOptions = ref([[{"title":"请求地址","field":"Url","type":"text"},{"title":"用户IP","field":"UserIP","type":"text"},{"title":"服务器IP","field":"ServiceIP","type":"text"}],[{"title":"开始时间","field":"BeginDate","type":"datetime"},{"dataKey":"restatus","data":[],"title":"响应状态","field":"Success","type":"selectList"},{"dataKey":"roles","data":[],"title":"角色ID","field":"Role_Id","type":"select"}],[{"dataKey":"log","data":[],"title":"日志类型","field":"LogType","colSize":12,"type":"checkbox"}]]);
            const columns = ref([{field:'Id',title:'Id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'BeginDate',title:'开始时间',type:'datetime',width:140,align:'left',sortable:true},
                       {field:'UserName',title:'用户名称',type:'string',width:90,align:'left'},
                       {field:'Url',title:'请求地址',type:'string',width:110,align:'left'},
                       {field:'LogType',title:'日志类型',type:'string',bind:{ key:'log',data:[]},width:80,align:'left'},
                       {field:'Success',title:'响应状态',type:'int',bind:{ key:'restatus',data:[]},width:80,align:'left'},
                       {field:'ElapsedTime',title:'时长',type:'int',width:60,align:'left'},
                       {field:'RequestParameter',title:'请求参数',type:'string',width:70,align:'left'},
                       {field:'ResponseParameter',title:'响应参数',type:'string',width:70,align:'left'},
                       {field:'ExceptionInfo',title:'异常信息',type:'string',width:70,align:'left'},
                       {field:'UserIP',title:'用户IP',type:'string',width:90,align:'left'},
                       {field:'ServiceIP',title:'服务器IP',type:'string',width:90,hidden:true,align:'left'},
                       {field:'BrowserType',title:'浏览器类型',type:'string',width:90,align:'left'},
                       {field:'User_Id',title:'用户ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'Role_Id',title:'角色ID',type:'int',bind:{ key:'roles',data:[]},width:90,hidden:true,align:'left'},
                       {field:'EndDate',title:'结束时间',type:'datetime',width:150,hidden:true,align:'left',sortable:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
import extend from "@/extension/system/Sys_Log.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    const table = ref({
      key: "Id",
      footer: "Foots",
      cnName: "系统日志",
      name: "Sys_Log",
      url: "/Sys_Log/",
      sortName: "Id",
    });
    const editFormFields = ref({});
    const editFormOptions = ref([]);
    const searchFormFields = ref({
      BeginDate: "",
      Url: "",
      LogType: [],
      Success: [],
      UserIP: "",
      ServiceIP: "",
      Role_Id: "",
    });
    const searchFormOptions = ref([
      [
        { title: "请求地址", field: "Url", type: "text" },
        { title: "用户IP", field: "UserIP", type: "text" },
        { title: "服务器IP", field: "ServiceIP", type: "text" },
      ],
      [
        { title: "开始时间", field: "BeginDate", type: "datetime" },
        {
          dataKey: "restatus",
          data: [],
          title: "响应状态",
          field: "Success",
          type: "selectList",
        },
        {
          dataKey: "roles",
          data: [],
          title: "角色ID",
          field: "Role_Id",
          type: "select",
        },
      ],
      [
        {
          dataKey: "log",
          data: [],
          title: "日志类型",
          field: "LogType",
          colSize: 12,
          type: "checkbox",
        },
      ],
    ]);
    const columns = ref([
      {
        field: "Id",
        title: "Id",
        type: "int",
        width: 90,
        hidden: true,
        readonly: true,
        require: true,
        align: "left",
      },
      {
        field: "BeginDate",
        title: "开始时间",
        type: "datetime",
        width: 140,
        align: "left",
        sortable: true,
      },
      {
        field: "UserName",
        title: "用户名称",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "Url",
        title: "请求地址",
        type: "string",
        width: 110,
        align: "left",
      },
      {
        field: "LogType",
        title: "日志类型",
        type: "string",
        bind: { key: "log", data: [] },
        width: 80,
        align: "left",
      },
      {
        field: "Success",
        title: "响应状态",
        type: "int",
        bind: { key: "restatus", data: [] },
        width: 80,
        align: "left",
      },
      {
        field: "ElapsedTime",
        title: "时长",
        type: "int",
        width: 60,
        align: "left",
      },
      {
        field: "RequestParameter",
        title: "请求参数",
        type: "string",
        width: 70,
        align: "left",
      },
      {
        field: "ResponseParameter",
        title: "响应参数",
        type: "string",
        width: 70,
        align: "left",
      },
      {
        field: "ExceptionInfo",
        title: "异常信息",
        type: "string",
        width: 70,
        align: "left",
      },
      {
        field: "UserIP",
        title: "用户IP",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "ServiceIP",
        title: "服务器IP",
        type: "string",
        width: 90,
        hidden: true,
        align: "left",
      },
      {
        field: "BrowserType",
        title: "浏览器类型",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "User_Id",
        title: "用户ID",
        type: "int",
        width: 90,
        hidden: true,
        align: "left",
      },
      {
        field: "Role_Id",
        title: "角色ID",
        type: "int",
        bind: { key: "roles", data: [] },
        width: 90,
        hidden: true,
        align: "left",
      },
      {
        field: "EndDate",
        title: "结束时间",
        type: "datetime",
        width: 150,
        hidden: true,
        align: "left",
        sortable: true,
      },
    ]);
    const detail = ref({
      cnName: "#detailCnName",
      columns: [],
      sortName: "",
      key: "",
    });
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
    };
  },
});
</script>
ÏîÄ¿´úÂë/client/src/views/system/UserInfo.vue
@@ -3,14 +3,25 @@
    <div class="info">
      <div style="position: relative">
        <el-upload
          :disabled="true"
          class="avatar-uploader"
          action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
          action="#"
          :show-file-list="false"
          :on-success="handleAvatarSuccess"
          :before-upload="beforeAvatarUpload"
        >
          <img v-if="imageUrl" :src="imageUrl" class="avatar" />
          <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
          <el-image
            style="width: 100px; height: 100px"
            :src="'http://192.168.0.80:5000' + userInfo.headImageUrl"
            :fit="fit"
          />
          <!-- <img
            v-if="userInfo.headImageUrl"
            :src="'http://192.168.0.80:5000' + userInfo.headImageUrl"
            class="avatar"
          />
          <el-icon v-else class="avatar-uploader-icon">
            <Plus />
          </el-icon> -->
        </el-upload>
        <span
          style="
@@ -33,7 +44,7 @@
        /></span>
      </div>
      <el-form
        :model="formInline"
        :model="userInfo"
        style="flex: 1"
        class="demo-form-inline"
        label-position="right"
@@ -49,7 +60,7 @@
          </el-col>
          <el-col :span="3"
            ><el-form-item label="用户分组:">
              <span>维保部</span>
              <span>{{ userInfo.roleName }}</span>
            </el-form-item></el-col
          >
        </el-row>
@@ -66,7 +77,7 @@
          >
          <el-col :span="3">
            <el-form-item label="用户角色:">
              <span>2021-06-30</span>
              <span>{{ userInfo.roleName }}</span>
            </el-form-item>
          </el-col>
        </el-row>
@@ -103,7 +114,7 @@
              </template>
              <el-input
                size="small"
                v-model="form.userName"
                v-model="form.usertruename"
                placeholder="请输入"
                style="width: 18.375rem"
              />
@@ -124,7 +135,7 @@
                >
              </template>
              <el-input
                v-model="form.phoneNo"
                v-model="form.phone"
                size="small"
                placeholder="请输入"
                style="width: 18.375rem"
@@ -137,24 +148,32 @@
              <span style="color: red; margin-right: 0.2rem">*</span>
              <span style="font-size: 0.88rem; color: black; font-weight: bold"
                >人脸图片</span
              ><span
              >
              <!-- <span
                style="
                  color: rgba(255, 0, 0, 1);
                  font-size: 0.75rem;
                  margin-left: 0.5rem;
                "
                >注:最多可上传三张,图片需要正规的人像证件照</span
              >
              > -->
            </div>
          </template>
          <el-upload
            ref="upload"
            name="fileInput"
            class="avatar-uploader"
            action="#"
            action="http://115.159.85.185:9098/api/User/SaveFiles"
            list-type="picture-card"
            :auto-upload="false"
            :limit="3"
            :auto-upload="true"
            limit="1"
            @before-upload="beforeAvatarUpload"
            :on-success="handleAvatarSuccess"
            :file-list="fileList != [] ? fileList : []"
          >
            <el-icon><Plus /></el-icon>
            <el-icon>
              <Plus />
            </el-icon>
            <template #file="{ file }">
              <div>
@@ -175,14 +194,18 @@
                    class="el-upload-list__item-delete"
                    @click="handleDownload(file)"
                  >
                    <el-icon size="15"><Download /></el-icon>
                    <el-icon size="15">
                      <Download />
                    </el-icon>
                  </span>
                  <span
                    v-if="!disabled"
                    class="el-upload-list__item-delete"
                    @click="handleRemove(file)"
                  >
                    <el-icon size="15"><Delete /></el-icon>
                    <el-icon size="15">
                      <Delete />
                    </el-icon>
                  </span>
                </span>
              </div>
@@ -256,25 +279,41 @@
        </div>
      </template>
    </el-dialog>
    <!-- æŸ¥çœ‹å›¾ç‰‡å¼¹å‡ºæ¡† -->
    <el-dialog v-model="imgdialogVisible" center width="980">
      <img w-full :src="dialogImageUrl" alt="Preview Image" />
    </el-dialog>
  </div>
</template>
<script setup>
import { ref, reactive } from "vue";
import { GetUserInfo, UpdatePassword, UpdateUser } from "@/api/user";
import {
  GetUserInfo,
  UpdatePassword,
  UpdateUser,
  Upuserbase,
} from "@/api/user";
import { ElMessage } from "element-plus";
const formInline = reactive({
  user: "",
  region: "",
  date: "",
});
const form = ref({});
const newPwd = ref("");
const onSubmit = () => {
  // UpdateUser().then((res) => {});
  console.log(form.value);
  console.log("submit!");
};
const upload = ref();
const form = ref({
  id: JSON.parse(localStorage.getItem("user")).id,
  usertruename: "",
  phone: "",
  files: "",
});
const newPwd = ref("");
const dialogVisible = ref(false);
//查看图片
const imgdialogVisible = ref(false);
const fileList = ref([]);
const rules = reactive({
  oldPwd: [{ required: true, message: "请输入旧密码", trigger: "blur" }],
  newPwd: [{ required: true, message: "请输入新密码", trigger: "blur" }],
@@ -301,23 +340,62 @@
  });
};
const dialogVisible = ref(false);
const userInfo = ref({});
const dialogImageUrl = ref();
GetUserInfo({}).then((res) => {
  userInfo.value = res.data;
  form.value = res.data;
  console.log(res);
  userInfo.value = Object.assign({}, res.data);
  form.value.usertruename = res.data.userTrueName;
  form.value.phone = res.data.phoneNo;
});
//图片预览
const handlePictureCardPreview = (url) => {
  dialogImageUrl.value = url.url;
  imgdialogVisible.value = true;
};
//图片删除
const handleRemove = (file) => {
  upload.value.handleRemove(file);
};
const onSubmit = () => {
  if (form.value.files == "") {
    ElMessage({ message: "图片不能为空", type: "warning" });
    return;
  }
  if (form.value.usertruename == "") {
    ElMessage({ message: "姓名不能为空", type: "warning" });
    return;
  }
  if (form.value.phone == "") {
    ElMessage({ message: "电话不能为空", type: "warning" });
    return;
  }
  Upuserbase(form.value).then((res) => {
    ElMessage({ message: "修改成功", type: "success" });
    dialogVisible.value = false;
    initData();
  });
};
const beforeAvatarUpload = (val) => {
  console.log(val);
};
const handleAvatarSuccess = (val) => {
  form.value.files = "/image/" + val.data;
};
</script>
<style lang="scss" scoped>
.personal {
  display: flex;
  flex-direction: column;
  .info {
    display: flex;
    height: 10rem;
    background-color: #fff;
    align-items: center;
    :deep(.avatar-uploader .el-upload) {
      border: 1px dashed var(--el-border-color);
      border-radius: 50%;
@@ -340,6 +418,7 @@
      height: 6.25rem;
      text-align: center;
    }
    .el-form {
      .el-row {
        .el-col {
@@ -347,6 +426,7 @@
            :deep(.el-form-item__label) {
              font-size: 0.875rem;
            }
            span {
              font-size: 0.875rem;
            }
@@ -355,6 +435,7 @@
      }
    }
  }
  .mation {
    flex: 1;
    margin-top: 1.25rem;
@@ -362,19 +443,23 @@
    padding: 1.1875rem 2.0625rem;
    box-sizing: border-box;
  }
  :deep(.el-dialog) {
    margin-top: 180px;
  }
  :deep(.el-dialog .el-dialog__body) {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .avatar-uploader .avatar {
    width: 7rem;
    height: 7rem;
    display: block;
  }
  :deep(.avatar-uploader .el-upload) {
    width: 7rem;
    height: 7rem;
@@ -385,10 +470,12 @@
    overflow: hidden;
    transition: var(--el-transition-duration-fast);
  }
  :deep(.el-upload-list__item) {
    width: 7rem;
    height: 7rem;
  }
  .avatar-uploader .el-upload:hover {
    border-color: var(--el-color-primary);
  }
ÏîÄ¿´úÂë/client/src/views/tts/BasicInformation/Basicinformation.vue
@@ -39,21 +39,38 @@
            size="small"
          />
        </div>
        <!-- <div class="serch_box">
          <div class="serchb">全局搜索</div>
        <div class="serch_box">
          <div class="serchb">
            <el-select
              v-model="queryForm.selectType"
              placeholder="请选择"
              size="small"
              style="width: 100%; height: 100%; font-size: 0.15rem"
            >
              <el-option
                v-for="item in selectoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
          <input
            v-model="queryForm.selectName"
            v-model="queryForm.selectInput"
            placeholder="请输入关键词搜索"
            style="border-left: 0.06rem solid #e2e2e2"
          />
        </div> -->
        </div>
        <el-button
          type="primary"
          size="small"
          style="margin-left: 0.98rem; height: 2rem"
          @click="handleQuery"
          >查询</el-button
        >
        <el-button size="small" style="height: 2rem">重置</el-button>
        <el-button size="small" style="height: 2rem" @click="resetQuery"
          >重置</el-button
        >
      </div>
      <div class="btns">
        <div style="display: flex; align-items: center">
@@ -70,7 +87,7 @@
              display: flex;
              align-items: center;
            "
            ><el-icon style="margin-right: 0.2rem"><Plus /></el-icon
            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
            >新建</el-button
          >
          <!-- å·¥å…·åˆ—表新建 -->
@@ -86,7 +103,7 @@
              display: flex;
              align-items: center;
            "
            ><el-icon style="margin-right: 0.2rem"><Plus /></el-icon
            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
            >新建</el-button
          >
          <el-button
@@ -131,7 +148,7 @@
          <el-table-column prop="articleName" label="信息名称" align="center" />
          <el-table-column prop="articleType" label="规格型号" align="center" />
          <el-table-column prop="articleUnit" label="单位" align="center" />
          <el-table-column prop="category" label="所属分类" align="center" />
          <!-- <el-table-column prop="category" label="所属分类" align="center" /> -->
          <el-table-column prop="createDate" label="创建日期" align="center" />
          <el-table-column label="操作" align="center">
            <template #default="scope">
@@ -169,7 +186,7 @@
            align="center"
          />
          <el-table-column prop="toolUnit" label="单位" align="center" />
          <el-table-column prop="" label="所属分类" align="center" />
          <!-- <el-table-column prop="" label="所属分类" align="center" /> -->
          <el-table-column prop="toolremark" label="备注" align="center" />
          <el-table-column prop="createtime" label="创建日期" align="center" />
          <el-table-column prop="address" label="操作" align="center">
@@ -213,6 +230,7 @@
      :before-close="handleClose"
      :show-close="false"
      :align-center="true"
      @close="resetForm(formRef)"
    >
      <template #title>
        <div
@@ -228,10 +246,17 @@
          >
        </div>
      </template>
      <el-form :model="forminfo" label-width="auto" label-position="top">
      <el-form
        :model="forminfo"
        label-width="auto"
        label-position="top"
        :rules="rules"
        ref="formRef"
        :hide-required-asterisk="true"
      >
        <el-row :gutter="20">
          <el-col :span="8">
            <el-form-item>
            <el-form-item prop="articleName">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -249,7 +274,7 @@
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item>
            <el-form-item prop="articleType">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -267,7 +292,7 @@
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item>
            <el-form-item prop="articleUnit">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -286,34 +311,8 @@
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="8">
            <el-form-item>
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
                  <span
                    style="font-size: 0.88rem; color: black; font-weight: bold"
                    >所属分类</span
                  >
                </div>
              </template>
              <el-input
                size="small"
                v-model="forminfo.category"
                placeholder="请输入"
              />
              <!-- <el-select v-model="value" placeholder="请选择" size="small">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select> -->
            </el-form-item>
          </el-col>
          <el-col :span="16">
            <el-form-item>
            <el-form-item prop="articleRemark">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -344,7 +343,7 @@
          <el-button
            size="small"
            type="primary"
            @click="CreateInformation"
            @click="CreateInformation(formRef)"
            style="height: 2rem; font-size: 0.88rem"
          >
            ä¿å­˜
@@ -361,6 +360,7 @@
      :before-close="handleClose"
      :show-close="false"
      :align-center="true"
      @close="resetForm(ruleFormRef)"
    >
      <template #title>
        <div
@@ -376,10 +376,17 @@
          >
        </div>
      </template>
      <el-form :model="formtool" label-width="auto" label-position="top">
      <el-form
        :model="formtool"
        label-width="auto"
        label-position="top"
        ref="ruleFormRef"
        :rules="toolRules"
        :hide-required-asterisk="true"
      >
        <el-row :gutter="20">
          <el-col :span="8">
            <el-form-item>
            <el-form-item prop="toolName">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -397,7 +404,7 @@
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item>
            <el-form-item prop="specification">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -415,7 +422,7 @@
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item>
            <el-form-item prop="toolUnit">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -434,34 +441,8 @@
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="8">
            <el-form-item>
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
                  <span
                    style="font-size: 0.88rem; color: black; font-weight: bold"
                    >所属分类</span
                  >
                </div>
              </template>
              <el-input
                size="small"
                v-model="formtool.category"
                placeholder="请输入"
              />
              <!-- <el-select v-model="value" placeholder="请选择" size="small">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select> -->
            </el-form-item>
          </el-col>
          <el-col :span="16">
            <el-form-item>
            <el-form-item prop="toolremark">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -492,7 +473,7 @@
          <el-button
            size="small"
            type="primary"
            @click="addToolApi"
            @click="addToolApi(ruleFormRef)"
            style="height: 2rem; font-size: 0.88rem"
          >
            ä¿å­˜
@@ -503,7 +484,7 @@
  </div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, toRef } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { formatTime } from "@/utils/index.js";
import {
@@ -516,45 +497,91 @@
  deleteToolData,
  deleteBasicinformation,
} from "@/api/newapi/Basicinformation.js";
const queryForm = reactive({
// åˆå§‹åŒ–数据
const obj = {
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
});
  selectType: "", //选择的类型
  selectInput: "", //输入的数据
};
//搜索传的数据
const queryForm = toRef({ ...obj });
const tableData = ref([]);
const options = ref([]);
const props = { multiple: true };
const table = ref(false);
const toolList = ref([]);
const isactive = ref(1);
const dialogVisible = ref(false);
const dialogVisible1 = ref(false);
const selectoptions = ref([]);
const infoOpitions = ref([
  {
    value: "articleName",
    label: "信息名称",
  },
  {
    value: "articleType",
    label: "规格型号",
  },
]);
const toolsOpitions = ref([
  {
    value: "toolName",
    label: "工具名称",
  },
  {
    value: "specification",
    label: "规格型号",
  },
]);
const forminfo = ref({
  articleName: "",
  articleType: "",
  articleUnit: "",
  category: "",
  articleremark: "",
  createDate: formatTime(new Date()),
  createDate: formatTime(new Date()), //创建时间
  creater: JSON.parse(localStorage.getItem("user")).userName, //创建人
});
const isactive = ref(1);
const claimdialogVisible = ref(false);
const dialogVisible = ref(false);
const dialogVisible1 = ref(false);
const TorquedialogVisible = ref(false);
const toolList = ref([]);
const formtool = ref({
  toolName: "",
  specification: 0,
  toolUnit: "",
  toolremark: "",
  createtime: formatTime(new Date()),
  createDate: formatTime(new Date()), //创建时间
  creater: JSON.parse(localStorage.getItem("user")).userName, //创建人
  modifier: JSON.parse(localStorage.getItem("user")).userName, //修改人
  modifyDate: formatTime(new Date()), //修改时间
});
const toolRules = reactive({
  toolName: [{ required: true, message: "请输入工具名称", trigger: "blur" }],
  specification: [{ required: true, message: "请输入规格", trigger: "blur" }],
  toolUnit: [{ required: true, message: "请输入单位", trigger: "blur" }],
  toolremark: [{ required: true, message: "请输入备注", trigger: "blur" }],
});
const rules = reactive({
  articleName: [{ required: true, message: "请输入工具名称", trigger: "blur" }],
  articleType: [{ required: true, message: "请输入规格", trigger: "blur" }],
  articleUnit: [{ required: true, message: "请输入单位", trigger: "blur" }],
  articleremark: [{ required: true, message: "请输入备注", trigger: "blur" }],
});
const ruleFormRef = ref();
const formRef = ref();
//改变状态
selectoptions.value = infoOpitions.value;
const changeactive = (index) => {
  isactive.value = index;
  if (index == 1) {
    initData();
  if (isactive.value == 1) {
    selectoptions.value = infoOpitions.value;
  } else {
    getTool();
    selectoptions.value = toolsOpitions.value;
  }
  initData();
};
const infoType = ref("新建");
const Useradd = () => {
  infoType.value = "新建";
  dialogVisible.value = true;
@@ -567,90 +594,35 @@
};
//新建信息列表
const CreateInformation = () => {
  if (infoType.value == "新建") {
    addBasicinformation(forminfo.value).then((res) => {
      ElMessage({
        message: "新建成功",
        type: "success",
      });
      dialogVisible.value = false;
      initData();
    });
  } else {
    editBasicinformation(forminfo.value).then((res) => {
      ElMessage({
        message: "修改成功",
        type: "success",
      });
      dialogVisible.value = false;
      initData();
    });
  }
};
// æŸ¥çœ‹åŠ›çŸ©
const Findtorque = () => {
  TorquedialogVisible.value = true;
};
//分页请求参数
const pageQuery = ref({
  page: 1, //当前页面
  rows: 10, //每页显示条数
  order: "desc", //排序方式
  sort: "createDate", //排序字段
  wheres: "", //条件查询
});
//分页页面大小改变
const handleSizeChange = (val) => {
  pageQuery.value.rows = val;
  initData();
};
//分页页面改变
const handleCurrentChange = (val) => {
  pageQuery.value.page = val;
  initData();
};
const pageTotal = ref(0);
const initData = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.selectTime[0]);
  const endTime = formatTime(queryForm.selectTime[1]);
  const filter = [
    {
      name: "grouptype",
      value: queryForm.selectType,
      displayType: "String",
    },
    {
      name: "pustatus",
      value: queryForm.selectName,
      displayType: "String",
    },
    { name: "dispatchtime", value: startTime, displayType: "ThanOrEqual" },
    { name: "dispatchtime", value: endTime, displayType: "LessOrEqual" },
  ];
  getBasicinformation({
    ...pageQuery.value,
    filter,
  }).then((res) => {
    tableData.value = res.rows;
    pageTotal.value = res.total;
const CreateInformation = async (formEl) => {
  if (!formEl) return;
  await formEl.validate((valid, fields) => {
    if (valid) {
      if (infoType.value == "新建") {
        addBasicinformation(forminfo.value).then((res) => {
          ElMessage({
            message: "新建成功",
            type: "success",
          });
          dialogVisible.value = false;
          initData();
        });
      } else {
        editBasicinformation(forminfo.value).then((res) => {
          ElMessage({
            message: "修改成功",
            type: "success",
          });
          dialogVisible.value = false;
          initData();
        });
      }
    } else {
      console.log("error submit!", fields);
    }
  });
};
//数据检索事件
const handleQuery = () => {
  pageQuery.value.page = 1;
  initData();
};
const resetQuery = () => {
  queryForm.value = { selectName: "全部状态", selectTime: [] };
  pageQuery.value.page = 1;
  initData();
};
const toolType = ref("新建");
const addTool = () => {
  toolType.value = "新建";
@@ -661,47 +633,53 @@
  formtool.value = data;
  toolType.value = "编辑";
  dialogVisible1.value = true;
  console.log(formtool.value);
};
//新建工具
const addToolApi = () => {
  if (toolType.value == "新建") {
    addToolData(formtool.value).then((res) => {
      ElMessage({
        message: "新建成功",
        type: "success",
      });
      dialogVisible1.value = false;
      getTool();
    });
  } else {
    editToolData(formtool.value).then((res) => {
      ElMessage({
        message: "修改成功",
        type: "success",
      });
      dialogVisible1.value = false;
      getTool();
    });
  }
const addToolApi = async (formEl) => {
  if (!formEl) return;
  await formEl.validate((valid, fields) => {
    if (valid) {
      if (toolType.value == "新建") {
        addToolData(formtool.value).then((res) => {
          ElMessage({
            message: "新建成功",
            type: "success",
          });
          dialogVisible1.value = false;
          initData();
        });
      } else {
        editToolData(formtool.value).then((res) => {
          ElMessage({
            message: "修改成功",
            type: "success",
          });
          dialogVisible1.value = false;
          initData();
        });
      }
    } else {
      console.log("error submit!", fields);
    }
  });
};
//获取工具表信息
const getTool = () => {
  const startTime = formatTime(queryForm.selectTime[0]);
  const endTime = formatTime(queryForm.selectTime[1]);
  const filter = [
    { name: "dispatchtime", value: startTime, displayType: "ThanOrEqual" },
    { name: "dispatchtime", value: endTime, displayType: "LessOrEqual" },
  ];
  getToolData({
    ...pageQuery.value,
    filter,
  }).then((res) => {
    toolList.value = res.rows;
    pageTotal.value = res.total;
  });
};
// const getTool = () => {
//   const startTime = formatTime(queryForm.value.selectTime[0]);
//   const endTime = formatTime(queryForm.value.selectTime[1]);
//   const filter = [
//     { name: "dispatchtime", value: startTime, displayType: "ThanOrEqual" },
//     { name: "dispatchtime", value: endTime, displayType: "LessOrEqual" },
//   ];
//   getToolData({
//     ...pageQuery.value,
//     filter,
//   }).then((res) => {
//     toolList.value = res.rows;
//     pageTotal.value = res.total;
//   });
// };
//批量删除
const ids = ref([]);
const InfoSelectionChange = (val) => {
@@ -725,9 +703,115 @@
  } else {
    deleteToolData(ids.value).then((res) => {
      ElMessage({ message: "删除成功", type: "success" });
      getTool();
      initData();
    });
  }
};
//分页请求参数
const pageQuery = ref({
  page: 1, //当前页面
  rows: 10, //每页显示条数
  order: "desc", //排序方式
  sort: "createDate", //排序字段
  wheres: "", //条件查询
});
//分页页面大小改变
const handleSizeChange = (val) => {
  pageQuery.value.rows = val;
  initData();
};
//分页页面改变
const handleCurrentChange = (val) => {
  pageQuery.value.page = val;
  initData();
};
const pageTotal = ref(0);
//初始化数据
const initData = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
  const filter = [
    {
      name: "grouptype",
      value: queryForm.value.selectType,
      displayType: "String",
    },
    {
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "like",
    },
    {
      name: "pustatus",
      value: queryForm.value.selectName,
      displayType: "String",
    },
    { name: "dispatchtime", value: startTime, displayType: "ThanOrEqual" },
    { name: "dispatchtime", value: endTime, displayType: "LessOrEqual" },
  ];
  if (isactive.value == 1) {
    getBasicinformation({
      ...pageQuery.value,
      filter,
    }).then((res) => {
      tableData.value = res.rows;
      pageTotal.value = res.total;
    });
  } else {
    getToolData({
      ...pageQuery.value,
      filter,
    }).then((res) => {
      toolList.value = res.rows;
      pageTotal.value = res.total;
    });
  }
};
//数据检索事件
const handleQuery = () => {
  pageQuery.value.page = 1;
  initData();
};
//重置方法
const resetQuery = () => {
  queryForm.value = Object.assign({}, obj);
  pageQuery.value.page = 1;
  initData();
};
//重置表单
const resetForm = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
  forminfo.value = Object.assign(
    {},
    {
      articleName: "",
      articleType: "",
      articleUnit: "",
      articleremark: "",
      createDate: formatTime(new Date()), //创建时间
      creater: JSON.parse(localStorage.getItem("user")).userName, //创建人
    }
  );
  formtool.value = Object.assign(
    {},
    {
      toolName: "",
      specification: 0,
      toolUnit: "",
      toolremark: "",
      createDate: formatTime(new Date()), //创建时间
      creater: JSON.parse(localStorage.getItem("user")).userName, //创建人
      modifier: JSON.parse(localStorage.getItem("user")).userName, //修改人
      modifyDate: formatTime(new Date()), //修改时间
    }
  );
};
onMounted(() => {
@@ -738,16 +822,19 @@
.Basicinformation {
  display: flex;
  background-color: #fff;
  .content {
    width: 100%;
    display: flex;
    flex-direction: column;
    .checkbox {
      width: 11rem;
      display: flex;
      justify-content: space-between;
      margin-top: 1rem;
      margin-left: 1.31rem;
      .item {
        width: 5rem;
        height: 1.88rem;
@@ -759,20 +846,24 @@
        line-height: 1.88rem;
        cursor: pointer;
      }
      .isactive {
        background-color: rgba(16, 16, 16, 1);
        color: rgba(255, 255, 255, 1);
      }
    }
    .serch {
      display: flex;
      margin-top: 1.31rem;
      align-items: center;
      .time_box {
        display: flex;
        align-items: center;
        text-align: center;
        margin-left: 0.98rem;
        .time {
          box-sizing: border-box;
          width: 6.88rem;
@@ -786,24 +877,26 @@
          justify-content: center;
        }
      }
      .serch_box {
        display: flex;
        align-items: center;
        text-align: center;
        margin-left: 0.98rem;
        border-radius: 0.38rem;
        .serchb {
          box-sizing: border-box;
          width: 6.88rem;
          height: 2rem;
          text-align: center;
          border: 0.06rem solid rgba(222, 222, 222, 1);
          border-radius: 0.25rem 0 0 0.25rem;
          font-size: 0.75rem;
          display: flex;
          align-items: center;
          justify-content: center;
        }
        input {
          box-sizing: border-box;
          outline: none;
@@ -816,6 +909,7 @@
        }
      }
    }
    .btns {
      display: flex;
      justify-content: space-between;
@@ -826,17 +920,20 @@
      box-sizing: border-box;
    }
  }
  .my-header {
    height: 3.84rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 0.06rem solid rgba(233, 233, 233, 1);
  }
  .avatar-uploader .avatar {
    width: 7rem;
    height: 7rem;
    display: block;
  }
  :deep(.avatar-uploader .el-upload) {
    width: 7rem;
    height: 7rem;
@@ -847,10 +944,12 @@
    overflow: hidden;
    transition: var(--el-transition-duration-fast);
  }
  :deep(.el-upload-list__item) {
    width: 7rem;
    height: 7rem;
  }
  .avatar-uploader .el-upload:hover {
    border-color: var(--el-color-primary);
  }
@@ -868,6 +967,7 @@
.confirmButtonClass {
  margin-right: 10px;
}
.el-message-box .el-message-box__btns {
  flex-direction: row-reverse !important;
  justify-content: normal !important;
ÏîÄ¿´úÂë/client/src/views/tts/CraftCenter/Craftcenter.vue
@@ -225,7 +225,9 @@
          >
            {{ title }}
          </h4>
          <el-icon size="25" @click="close"><CloseBold /></el-icon>
          <el-icon size="25" @click="close">
            <CloseBold />
          </el-icon>
        </div>
      </template>
      <div>
@@ -255,7 +257,7 @@
                size="small"
              />
            </div>
            <!-- <div class="serch_box">
            <div class="serch_box">
              <div class="serchb">
                <el-select
                  v-model="queryForm.selectType"
@@ -276,7 +278,7 @@
                placeholder="请输入关键词搜索"
                style="border-left: 0.06rem solid #e2e2e2"
              />
            </div> -->
            </div>
            <el-button
              type="primary"
              size="small"
@@ -318,7 +320,7 @@
            border: '0.01rem solid #eee',
          }"
        >
          <el-table-column prop="setpNum" label="序号" min-width="2%" />
          <el-table-column prop="nodal" label="序号" min-width="2%" />
          <el-table-column
            prop="craftsStep"
            label="工艺顶点/步骤"
@@ -333,7 +335,7 @@
          <el-table-column prop="date" label="物料" min-width="1%" />
          <!-- <el-table-column prop="date" label="图片视频" min-width="2%" /> -->
          <el-table-column prop="" label="是否涉及" min-width="2%" />
          <el-table-column prop="nodal" label="排序" min-width="1%" />
          <el-table-column prop="setpNum" label="排序" min-width="1%" />
          <el-table-column prop="date" label="创建人" min-width="2%">
            <template #default="">
              {{ user }}
@@ -348,7 +350,9 @@
                @click="Editcraft(scope.row, '编辑')"
                >编辑</el-button
              >
              <el-button type="text" size="small">删除</el-button>
              <el-button type="text" size="small" @click="delProcess(scope.row)"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>
@@ -362,7 +366,7 @@
      title="工艺信息"
      width="50%"
      :show-close="false"
      @close="handleClose"
      @close="resetForm(ruleFormRef)"
    >
      <template #header="{ titleId, titleClass }">
        <div class="my-craftheader">
@@ -456,10 +460,15 @@
          <el-col :span="8"
            ><el-form-item prop="tools">
              <template #label>
                <span style="font-size: 0.88rem; color: black">工具</span>
                <div style="display: flex; align-items: center">
                  <span style="display: flex; color: red; margin-right: 0.25rem"
                    >*</span
                  >
                  <span style="font-size: 0.88rem; color: black">工具</span>
                </div>
              </template>
              <el-select
                v-model="form.tools"
                v-model="tools"
                placeholder="请选择"
                multiple
                filterable
@@ -548,9 +557,14 @@
          </el-col>
        </el-row>
        <el-row>
          <el-form-item prop="Unit">
          <el-form-item prop="checkList">
            <template #label>
              <span style="font-size: 0.88rem; color: black">选择套筒</span>
              <div style="display: flex; align-items: center">
                <span style="display: flex; color: red; margin-right: 0.25rem"
                  >*</span
                >
                <span style="font-size: 0.88rem; color: black">选择套筒</span>
              </div>
            </template>
            <div
              style="
@@ -568,8 +582,10 @@
                  "
                >
                  <el-input
                    placeholder="请输入内容"
                    style="height: 2rem"
                    placeholder="搜索"
                    style="height: 2rem; background: #f5f5f5; border: none"
                    :prefix-icon="Search"
                    v-model="value"
                  ></el-input>
                  <div
                    style="height: 1.25rem; display: flex; align-items: center"
@@ -577,26 +593,35 @@
                    <span
                      style="color: rgba(28, 31, 35, 0.8); font-size: 0.75rem"
                      >共{{ checkList.length }}项</span
                    ><span
                    >
                    <!-- <span
                      @click="handleCheckAllChange"
                      style="
                        color: rgba(28, 31, 35, 0.8);
                        font-size: 0.75rem;
                        margin-left: 0.38rem;
                        cursor: pointer;
                      "
                      >全选</span
                    >
                    > -->
                  </div>
                </div>
                <el-scrollbar height="20rem" style="padding-left: 0.88rem">
                  <el-checkbox-group
                    :indeterminate="isIndeterminate"
                    @change="checkChange"
                    v-model="checkList"
                    style="display: flex; flex-direction: column"
                  >
                    <el-checkbox
                      :max="2"
                      v-for="item in sleeveData"
                      :key="item.id"
                      :label="item.articleName"
                      :value="item"
                      :value="{
                        ...item,
                        num: 1,
                      }"
                    />
                  </el-checkbox-group>
                </el-scrollbar>
@@ -609,10 +634,12 @@
                    >已选{{ checkList.length }}项</span
                  >
                  <span
                    @click="clear"
                    style="
                      color: rgb(65, 70, 76);
                      font-size: 0.88rem;
                      margin-left: 1rem;
                      cursor: pointer;
                    "
                    >清空</span
                  >
@@ -627,8 +654,8 @@
                      justify-content: space-between;
                      margin: 0.5rem 0;
                    "
                    v-for="(item, index) in checkList"
                    :key="item"
                    v-for="item in checkList"
                    :key="item.id"
                    class="scrollbar-demo-item"
                  >
                    <span>
@@ -669,8 +696,8 @@
  </div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { formatTime } from "@/utils/index.js";
import { ref, reactive, onMounted, toRef } from "vue";
import { Search } from "@element-plus/icons-vue";
import {
  GetSleeveandStep,
  GetProcess,
@@ -679,26 +706,49 @@
  ArticleInfom,
  GetTool,
  ExportApi,
  DelProcess,
  AddOrUpdateProcess,
} from "@/api/newapi/Process";
import { ElMessage } from "element-plus";
import { exportExcel } from "@/utils/index.js";
//工艺明细弹出框
const detailsDialogVisible = ref(false);
import { formatTime } from "@/utils/index.js";
// åˆå§‹åŒ–数据
const obj = {
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
  selectType: "", //选择的类型
  selectInput: "", //输入的数据
};
//工艺明细数据
const gridData = ref([]);
//套筒数据
const sleeveData = ref([]);
//选择的套筒数据
const checkList = ref([]);
//电气数量
const electric = ref(null);
//机械数量
const mechanical = ref(null);
//地沟
const trench = ref(null);
//新增工艺/编辑工艺
const type = ref("新增");
//获取数据
const title = ref("电气");
//表单ref值
const ruleFormRef = ref();
//用户数据
const user = ref(null);
const tools = ref([]);
//搜索
const queryForm = reactive({
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
  selectType: "",
  selectInput: "",
});
const queryForm = toRef({ ...obj });
const isIndeterminate = ref(true);
//工艺明细弹出框
const detailsDialogVisible = ref(false);
//新增工艺弹出框
const craftdialogVisible = ref(false);
//搜索字段选择
const selectoptions = ref([
  {
    value: "setpNum",
@@ -709,43 +759,51 @@
    label: "工具",
  },
]);
//选择的套筒数据
const checkList = ref([]);
//获取数据
const title = ref("电气");
const showdetails = (val) => {
  detailsDialogVisible.value = true;
  title.value = val;
  initData(title.value);
  // GetProcess(val).then((res) => {
  //   gridData.value = res.data;
  // });
};
//新增工艺/编辑工艺
const craftdialogVisible = ref(false);
const type = ref("新增");
//是否涉及
const isoptions = reactive([
  { label: "是", value: "是" },
  { label: "否", value: "否" },
]);
//表单规则
const rules = reactive({
  craftstype: [
    { required: true, message: "请选择工艺类型", trigger: "change" },
  ],
  nodal: [{ required: true, message: "请选择节点", trigger: "change" }],
  craftsStep: [{ required: true, message: "请输入工艺步骤", trigger: "blur" }],
  craftContent: [
    { required: true, message: "请输入工艺内容", trigger: "blur" },
  ],
  sleeveNum: [{ required: true, message: "请输入套筒数量", trigger: "blur" }],
});
//新增工艺/编辑工艺表单数据
const form = ref({
  craftType: "", //工艺类型(组)
  nodal: "", //节点
  craftstype: "", //工艺类型(组)
  nodal: 0, //节点
  craftsStep: "", //工艺步骤
  craftContent: "", //工艺内容
  sleeveNum: "", //套筒数量
  tools: "", //工具
  isinvolved: "", //是否涉及
  sort: "", //排序
  craftID: 1,
  setpNum: "",
  torqueOne: null,
  torqueOne: 0,
  torqueOneQuantity: 0,
  torqueSum: 0,
  torqueTwo: null,
  torqueTwoQuantity: 0,
  articleOne: "",
  articleOneid: "",
  articleTowid: "",
  articleTwo: "",
  torqueSum: 0,
  torqueTwo: 0,
  torqueTwoQuantity: 0,
  creater: localStorage.getItem("user")
    ? JSON.parse(localStorage.getItem("user")).userName
    : "",
  createDate: formatTime(new Date()),
});
const props = { multiple: true };
//套筒数据
const sleeveData = ref([]);
const userName = ref("");
//新增工艺
const addcraft = (row) => {
@@ -793,45 +851,105 @@
    GJoptions.value = res.rows;
  });
};
//编辑工艺
const Editcraft = (row) => {
  let data = Object.assign({}, row);
  type.value = "编辑";
  detailsDialogVisible.value = false;
  craftdialogVisible.value = true;
  form.value = row;
  console.log(row, form);
  form.value = data;
  tools.value = row.tools ? row.tools.split(",") : "";
  ArticleInfom({
    page: 1,
    rows: 100,
    total: 0,
    tableName: "",
    sort: "",
    order: "",
    wheres: "",
    export: true,
    value: "",
    filter: [
      {
        name: "",
        value: "",
        displayType: "",
      },
    ],
  }).then((res) => {
    sleeveData.value = res.rows;
  });
  GetTool({
    page: 1,
    rows: 100,
    total: 0,
    tableName: "",
    sort: "",
    order: "",
    wheres: "",
    export: true,
    value: "",
    filter: [
      {
        name: "",
        value: "",
        displayType: "",
      },
    ],
  }).then((res) => {
    GJoptions.value = res.rows;
  });
};
//规则
const ruleFormRef = ref();
const rules = reactive({
  craftType: [{ required: true, message: "请选择工艺类型", trigger: "change" }],
  nodal: [{ required: true, message: "请选择节点", trigger: "change" }],
  craftsStep: [{ required: true, message: "请输入工艺步骤", trigger: "blur" }],
  craftContent: [
    { required: true, message: "请输入工艺内容", trigger: "blur" },
  ],
  sleeveNum: [{ required: true, message: "请输入套筒数量", trigger: "blur" }],
});
const showdetails = (val) => {
  detailsDialogVisible.value = true;
  title.value = val;
  initData(title.value);
  // GetProcess(val).then((res) => {
  //   gridData.value = res.data;
  // });
};
//保存
const addprocess = async (formEl) => {
  userName.value = JSON.parse(localStorage.getItem("user")).userName;
  let string = "";
  form.value.tools.forEach((item) => {
    string += item.toolName + ",";
  });
  if (tools.value.length == 0) {
    ElMessage({
      message: "请选择工具",
      type: "warning",
    });
    return;
  }
  string = tools.value
    .map((item) => {
      return item.toolName;
    })
    .join(",");
  if (checkList.value.length == 0) {
    ElMessage({
      message: "请选择套筒",
      type: "warning",
    });
    return;
  }
  form.value.articleOneid = checkList.value[0].id;
  form.value.articleOne = checkList.value[0].num;
  form.value.articleTowid = checkList.value[1].id;
  form.value.articleTwo = checkList.value[1].num;
  form.value.creater = userName.value;
  form.value.tools = string;
  form.value.craftType = title.value;
  form.value.craftstype = title.value;
  form.value.torqueOneQuantity = tools.value.length;
  form.value.id = form.value.craftID ? form.value.craftID : "";
  console.log(form.value);
  if (!formEl) return;
  await formEl.validate((valid, fields) => {
    if (valid) {
      AddProcess(form.value).then((res) => {
      AddOrUpdateProcess(form.value).then((res) => {
        ElMessage({
          message: res.message,
          message: form.value.craftID ? "修改成功" : "创建成功",
          type: "success",
        });
        craftdialogVisible.value = false;
@@ -875,39 +993,34 @@
    GJoptions.value = [];
  }
};
//是否涉及
const isoptions = reactive([
  { label: "是", value: "是" },
  { label: "否", value: "否" },
]);
const user = ref(null);
//分页请求参数
const pageQuery = ref({
  page: 1, //当前页面
  rows: 10, //每页显示条数
  order: "desc", //排序方式
  sort: "craftID", //排序字段
  sort: "", //排序字段
  wheres: "", //条件查询
});
//页面初始化数据
const initData = (val) => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.selectTime[0]);
  const endTime = formatTime(queryForm.selectTime[1]);
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
  const filter = [
    {
      name: "gruop",
      name: "CraftType",
      value: val,
      displayType: "Contains",
      displayType: "String",
    },
    {
      name: queryForm.selectType,
      value: queryForm.selectInput,
      displayType: "Equal",
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "like",
    },
    {
      name: "pustatus",
      value: queryForm.selectName,
      value: queryForm.value.selectName,
      displayType: "Contains",
    },
    { name: "createTime", value: startTime, displayType: "ThanOrEqual" },
@@ -920,10 +1033,51 @@
    gridData.value = res.rows;
  });
};
//数据检索事件
const handleQuery = () => {
  pageQuery.value.page = 1;
  initData(title.value);
};
// é‡ç½®æ–¹æ³•
const resetQuery = () => {
  queryForm.value = Object.assign({}, obj);
  pageQuery.value.page = 1;
  initData(title.value);
};
//重置表单
const resetForm = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
  form.value = Object.assign(
    {},
    {
      craftstype: "", //工艺类型(组)
      nodal: 0, //节点
      craftsStep: "", //工艺步骤
      craftContent: "", //工艺内容
      sleeveNum: "", //套筒数量
      tools: "", //工具
      isinvolved: "", //是否涉及
      setpNum: "",
      torqueOne: 0,
      torqueOneQuantity: 0,
      articleOne: "",
      articleOneid: "",
      articleTowid: "",
      articleTwo: "",
      torqueSum: 0,
      torqueTwo: 0,
      torqueTwoQuantity: 0,
      creater: "",
      createDate: formatTime(new Date()),
    }
  );
};
//导出方法
const printExcel = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.selectTime[0]);
  const endTime = formatTime(queryForm.selectTime[1]);
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
  const filter = [
    {
      name: "gruop",
@@ -931,13 +1085,13 @@
      displayType: "String",
    },
    {
      name: queryForm.selectType,
      value: queryForm.selectInput,
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "String",
    },
    {
      name: "pustatus",
      value: queryForm.selectName,
      value: queryForm.value.selectName,
      displayType: "String",
    },
    { name: "createTime", value: startTime, displayType: "ThanOrEqual" },
@@ -948,23 +1102,33 @@
    filter,
  });
};
//数据检索事件
const handleQuery = () => {
  pageQuery.value.page = 1;
  initData(title.value);
//清空
const clear = () => {
  checkList.value = [];
};
const resetQuery = () => {
  queryForm.value = { selectTime: [] };
  pageQuery.value.page = 1;
  initData(title.value);
const checkChange = (e) => {
  console.log(e, checkList.value);
};
// const handleChange = () => {
//   console.log(checkList.value);
// };
const handleClose = () => {
const handleChange = () => {
  console.log(checkList.value);
};
const handleCheckAllChange = (val) => {
  console.log(val);
  checkList.value = val ? sleeveData.value : [];
  isIndeterminate.value = false;
  console.log(checkList.value);
};
// åˆ é™¤å·¥è‰º
const delProcess = (val) => {
  console.log(val);
  DelProcess([val.craftID]).then((res) => {
    ElMessage({
      message: "删除成功",
      type: "success",
    });
    initData(title.value);
  });
};
onMounted(() => {
@@ -985,12 +1149,14 @@
  display: flex;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  .content {
    display: flex;
    justify-content: space-between;
    margin-top: 5.88rem;
    width: 75rem;
    .content-list {
      display: flex;
      flex-direction: column;
@@ -998,14 +1164,17 @@
      width: 22.69rem;
      height: 11.44rem;
      background-color: #fff;
      .list_top {
        display: flex;
        padding: 1.38rem 1.38rem;
        box-sizing: border-box;
        .list_top_left {
          margin-right: 0.94rem;
        }
      }
      .list_bottom {
        height: 3.06rem;
        display: flex;
@@ -1017,6 +1186,7 @@
      }
    }
  }
  .my-header {
    height: 3.94rem;
    display: flex;
@@ -1026,9 +1196,11 @@
    padding-left: 2.06rem;
    border-bottom: 0.06rem solid rgba(233, 233, 233, 1);
  }
  .serch {
    display: flex;
    align-items: center;
    .time_box {
      display: flex;
      align-items: center;
@@ -1047,12 +1219,14 @@
        justify-content: center;
      }
    }
    .serch_box {
      display: flex;
      align-items: center;
      text-align: center;
      margin-left: 0.98rem;
      border-radius: 0.38rem;
      .serchb {
        box-sizing: border-box;
        width: 6.88rem;
@@ -1064,6 +1238,7 @@
        align-items: center;
        justify-content: center;
      }
      input {
        box-sizing: border-box;
        outline: none;
@@ -1076,6 +1251,7 @@
      }
    }
  }
  .my-craftheader {
    height: 3.94rem;
    display: flex;
@@ -1085,11 +1261,13 @@
    border-bottom: 0.06rem solid rgba(233, 233, 233, 1);
  }
}
.avatar-uploader .avatar {
  width: 7rem;
  height: 7rem;
  display: block;
}
:deep(.avatar-uploader .el-upload) {
  width: 7rem;
  height: 7rem;
@@ -1100,10 +1278,12 @@
  overflow: hidden;
  transition: var(--el-transition-duration-fast);
}
:deep(.el-upload-list__item) {
  width: 7rem;
  height: 7rem;
}
.avatar-uploader .el-upload:hover {
  border-color: var(--el-color-primary);
}
ÏîÄ¿´úÂë/client/src/views/tts/DataLogging/Datalogging.vue
@@ -59,7 +59,7 @@
            size="small"
          />
        </div>
        <!-- <div class="serch_box">
        <div class="serch_box">
          <div class="serchb">
            <el-select
              v-model="queryForm.selectType"
@@ -80,7 +80,7 @@
            placeholder="请输入关键词搜索"
            style="border-left: 0.06rem solid #e2e2e2"
          />
        </div> -->
        </div>
        <el-button
          @click="handleQuery"
          type="primary"
@@ -249,7 +249,7 @@
          <el-table-column prop="account" label="登录账号" align="center" />
          <el-table-column prop="trurName" label="真实姓名" align="center" />
          <el-table-column prop="logIP" label="登录IP" align="center" />
          <el-table-column prop="createdate" label="登录时间" align="center" />
          <el-table-column prop="createDate" label="登录时间" align="center" />
        </el-table>
      </div>
      <div
@@ -985,7 +985,7 @@
  </div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, toRef } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { formatTime } from "@/utils/index.js";
import {
@@ -1000,6 +1000,7 @@
  ExportApi2,
  ExportApi3,
} from "@/api/newapi/Datalogging";
import { login } from "@/api/login";
const obj = {
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
@@ -1007,13 +1008,7 @@
  selectInput: "",
  value: "",
};
const queryForm = ref({
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
  selectType: "",
  selectInput: "",
  value: "",
});
const queryForm = toRef({ ...obj });
const tableData = ref([]);
const options = ref([
@@ -1028,7 +1023,6 @@
]);
const props = { multiple: true };
const table = ref(false);
const form = reactive({});
const isactive = ref(1);
const claimdialogVisible = ref(false);
@@ -1042,7 +1036,7 @@
  page: 1, //当前页面
  rows: 10, //每页显示条数
  order: "desc", //排序方式
  sort: "createTime", //排序字段
  sort: "", //排序字段
  wheres: "", //条件查询
});
const datildata = ref({});
@@ -1092,17 +1086,6 @@
  },
];
const selectoptions = ref([]);
// æŸ¥è¯¢
const query = () => {
  if (isactive.value == 1) {
    initData();
  } else if (isactive.value == 2) {
    WorkinitData();
  } else {
    LogininitData();
  }
};
selectoptions.value = tasklogging;
const changeactive = (index) => {
@@ -1331,6 +1314,7 @@
  } else if (isactive.value == 2) {
    WorkinitData();
  } else {
    LogininitData();
  }
};
@@ -1342,6 +1326,7 @@
  } else if (isactive.value == 2) {
    WorkinitData();
  } else {
    LogininitData();
  }
};
//任务记录
@@ -1358,7 +1343,7 @@
    {
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "String",
      displayType: "like",
    },
    { name: "createTime", value: startTime, displayType: "ThanOrEqual" },
    { name: "createTime", value: endTime, displayType: "LessOrEqual" },
@@ -1428,13 +1413,19 @@
    LogininitData();
  }
};
//重置方法
const resetQuery = () => {
  queryForm.value = { selectName: "", selectTime: [] };
  queryForm.value = Object.assign({}, obj);
  pageQuery.value.page = 1;
  initData();
  if (isactive.value == 1) {
    initData();
  } else if (isactive.value == 2) {
    WorkinitData();
  } else {
    LogininitData();
  }
};
//打印方法
const printExcel = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.value.selectTime[0]);
@@ -1472,9 +1463,11 @@
    });
  }
};
const roleINFO = ref();
onMounted(() => {
  initData();
  roleINFO.value = JSON.parse(localStorage.getItem("user"));
  console.log(roleINFO.value);
});
</script>
<style lang="scss" scoped>
ÏîÄ¿´úÂë/client/src/views/tts/TaskManagement/Taskmanagement.vue
@@ -25,7 +25,7 @@
            size="small"
          />
        </div>
        <!-- <div class="serch_box">
        <div class="serch_box">
          <div class="serchb">
            <el-select
              v-model="queryForm.selectType"
@@ -46,7 +46,7 @@
            placeholder="请输入关键词搜索"
            style="border-left: 0.06rem solid #e2e2e2"
          />
        </div> -->
        </div>
        <el-button
          type="primary"
          size="small"
@@ -63,7 +63,7 @@
          <el-button
            type="primary"
            size="small"
            @click="dialogVisible1 = true"
            @click="addData"
            style="
              width: 5.5rem;
              height: 2rem;
@@ -71,7 +71,7 @@
              display: flex;
              align-items: center;
            "
            ><el-icon style="margin-right: 0.2rem"><Plus /></el-icon
            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
            >新建</el-button
          >
          <el-button
@@ -85,7 +85,7 @@
              display: flex;
              align-items: center;
            "
            ><el-icon style="margin-right: 0.2rem"><Plus /></el-icon
            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
            >手动获取</el-button
          >
          <el-button
@@ -212,7 +212,9 @@
                @click="Send(scope.row)"
                >派任务</el-button
              >
              <!-- <el-button size="small" type="text" @click="delt">编辑</el-button> -->
              <el-button size="small" type="text" @click="Editdata(scope.row)"
                >编辑</el-button
              >
            </template>
          </el-table-column>
        </el-table>
@@ -238,12 +240,12 @@
        />
      </div>
    </div>
    <!-- ä»»åŠ¡ä¿¡æ¯å¼¹å‡ºæ¡† -->
    <!-- æ–°å»º/编辑任务信息弹出框 -->
    <el-dialog
      v-model="dialogVisible1"
      title=""
      width="60%"
      @close="handleClose(ruleFormRef)"
      @close="resetForm(ruleFormRef)"
      style="margin-top: 15.625rem"
    >
      <template #title>
@@ -406,7 +408,7 @@
      v-model="SenddialogVisible"
      title=""
      width="60%"
      @close="handleClose(sendformRef)"
      @close="resetForm(sendformRef)"
      top="2%"
    >
      <template #title>
@@ -865,7 +867,7 @@
        </div>
      </template>
    </el-dialog> -->
    <!-- æ¡†æž¶æ‰¹é‡å¯¼å…¥å¼¹å‡ºæ¡† -->
    <el-dialog v-model="importDialogVisible">
      <UploadExcel
        @importExcelAfter="importExcelAfter"
@@ -879,7 +881,7 @@
  </div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, toRef } from "vue";
import { useRouter } from "vue-router";
import {
  GetPageData,
@@ -890,25 +892,26 @@
  GetTemplateList,
  Delete,
  ExportApi,
  Update,
} from "@/api/newapi/NjTask";
import { GetUerType } from "@/api/user";
import { formatTime } from "@/utils/index.js";
import { ElMessage } from "element-plus";
import UploadExcel from "@/components/basic/UploadExcel.vue";
//使用路由
const router = useRouter();
// åˆå§‹åŒ–数据
const obj = {
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
  selectType: "",
  selectInput: "",
  selectType: "", //选择的类型
  selectInput: "", //输入的数据
};
const queryForm = ref({
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
  selectType: "",
  selectInput: "",
});
//搜索传的数据
const queryForm = toRef({ ...obj });
//页面的数量
const pageTotal = ref(0);
//表单的数据
const tableData = ref([]);
const UerTypeoptions = ref({
  quality: [], //质检
@@ -916,6 +919,8 @@
  mechanical: [], //机械
  trench: [], //地沟
});
//表单验证规则
const rules = reactive({
  bogie: [{ required: true, message: "请输入转向架", trigger: "blur" }],
  coachNum: [{ required: true, message: "请输入车厢号", trigger: "blur" }],
@@ -924,16 +929,9 @@
  trainKind: [{ required: true, message: "请输入车型", trigger: "blur" }],
  trainNum: [{ required: true, message: "请输入车组号", trigger: "blur" }],
});
//新建编辑表单ref值
const ruleFormRef = ref();
const options = ref([]);
const props = { multiple: true };
const table = ref(false);
const selectoptions = reactive([
  { label: "车型", value: "trainkind" },
  { label: "车组", value: "trainNum" },
  { label: "股道", value: "track" },
  { label: "检修班组", value: "processkept" },
]);
//添加/编辑的表单数据
const form = ref({
  bogie: "", //转向架
  coachNum: "", //车厢
@@ -941,39 +939,89 @@
  track: "", //股道
  trainKind: "", //车型
  trainNum: "", //车组号
  createTime: formatTime(new Date()), //创建时间
  createDate: formatTime(new Date()), //创建时间
  creater: JSON.parse(localStorage.getItem("user")).userName, //创建人
});
//删除
const dialogVisible1 = ref(false);
//派任务
const SenddialogVisible = ref(false);
//派任务表单ref值
const sendformRef = ref();
//批量导入
const dialogVisible = ref(false);
//批量导入数据
const gridtableData = ref([]);
//模板列表
const temopitions = ref([]);
const props = { multiple: true };
const table = ref(false);
const type = ref("新建");
//搜索选择的字段
const selectoptions = reactive([
  { label: "车型", value: "trainkind" },
  { label: "车组", value: "trainNum" },
  { label: "股道", value: "track" },
  { label: "检修班组", value: "processkept" },
]);
//提交的数据变量
const sendform = ref({});
//批量导入
const importDialogVisible = ref(false);
//监听文件上传成功的回调
const importExcelAfter = () => {
  importDialogVisible.value = false;
  initData();
};
//新建任务信息
const AddNJinfomclick = async (formEl) => {
  if (!formEl) return;
  await formEl.validate((valid, fields) => {
    if (valid) {
      AddNJinfom(form.value).then((res) => {
        if (res.code == 0) {
          ElMessage({
            message: "创建成功",
            type: "success",
          });
          dialogVisible1.value = false;
        }
      });
      if (type.value == "新建") {
        AddNJinfom(form.value).then((res) => {
          if (res.code == 0) {
            ElMessage({
              message: "创建成功",
              type: "success",
            });
            dialogVisible1.value = false;
            initData();
          }
        });
      } else {
        //编辑
        Update(form.value).then((res) => {
          if (res.code == 0) {
            ElMessage({
              message: "修改成功",
              type: "success",
            });
            dialogVisible1.value = false;
            initData();
          }
        });
      }
    } else {
      console.log("error submit!", fields);
    }
  });
};
//删除
const dialogVisible1 = ref(false);
//派任务
const SenddialogVisible = ref(false);
const sendformRef = ref();
//新建任务信息
const addData = () => {
  type.value = "新建";
  dialogVisible1.value = true;
};
//编辑任务信息
const Editdata = (row) => {
  let obj = Object.assign({}, row);
  type.value = "编辑";
  dialogVisible1.value = true;
  form.value = obj;
};
//提交
const sublit = async (formEl) => {
  let data = {
@@ -1000,6 +1048,7 @@
          type: "success",
        });
        SenddialogVisible.value = false;
        initData();
      });
    } else {
      console.log("error submit!", fields);
@@ -1032,6 +1081,7 @@
          message: res.message,
          type: "success",
        });
        initData();
        SenddialogVisible.value = false;
      });
    } else {
@@ -1039,16 +1089,16 @@
    }
  });
};
//批量导入
const dialogVisible = ref(false);
//数据导出的方法
const printExcel = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.selectTime[0]);
  const endTime = formatTime(queryForm.selectTime[1]);
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
  const filter = [
    {
      name: queryForm.selectType,
      value: queryForm.selectInput,
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "String",
    },
@@ -1060,49 +1110,40 @@
    filter,
  });
};
//批量导入数据
const gridtableData = ref([]);
// quality: [], //质检
// electric: [], //电气
// mechanical: [], //机械
// trench: [], //地沟
//派任务方法
const Send = (val) => {
  SenddialogVisible.value = true;
  sendform.value = { ...val };
  getTemplateList();
  GetUerType().then((res) => {
    UerTypeoptions.value.quality = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 2
    );
    UerTypeoptions.value.quality = res.data.filter((item) => {
      return item.user_Id != 1 && item.roleName.substring(2, 4) == "质检";
    });
    UerTypeoptions.value.electric = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 3
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "电气"
    );
    UerTypeoptions.value.mechanical = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 4
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "机械"
    );
    UerTypeoptions.value.trench = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 5
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "地沟"
    );
  });
  console.log(UerTypeoptions.value);
};
//删除方法
const delt = () => {
  dialogVisible1.value = true;
};
//批量删除
const ids = ref([]);
const SelectionChange = (val) => {
  ids.value = [];
  ids.value = val.map((item) => item.id);
};
const deleteAll = () => {
  if (ids.value.length == 0) {
    ElMessage({ message: "请选择要删除的数据", type: "error" });
    return;
  }
  Delete(ids.value).then((res) => {
    ElMessage({ message: "删除成功", type: "success" });
    initData();
  });
};
const temopitions = ref([]);
//获取所有模板
const getTemplateList = () => {
  GetTemplateList({
@@ -1132,13 +1173,31 @@
    sendform.value = { ...sendform.value, ...res.data[0] };
  });
};
//批量删除
const ids = ref([]); //批量删除的id
const SelectionChange = (val) => {
  //获取批量删除的id
  ids.value = [];
  ids.value = val.map((item) => item.id);
};
//删除选中的数据
const deleteAll = () => {
  if (ids.value.length == 0) {
    ElMessage({ message: "请选择要删除的数据", type: "error" });
    return;
  }
  Delete(ids.value).then((res) => {
    ElMessage({ message: "删除成功", type: "success" });
    initData();
  });
};
//分页请求参数
const pageQuery = ref({
  page: 1, //当前页面
  rows: 10, //每页显示条数
  order: "createTime", //排序方式
  sort: "desc", //排序字段
  order: "desc", //排序方式
  sort: "", //排序字段
  wheres: "", //条件查询
});
@@ -1153,7 +1212,8 @@
  pageQuery.value.page = val;
  initData();
};
const pageTotal = ref(0);
//页面初始化方法
const initData = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.value.selectTime[0]);
@@ -1162,7 +1222,7 @@
    {
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "String",
      displayType: "like",
    },
    { name: "createtime", value: startTime, displayType: "ThanOrEqual" },
    { name: "createtime", value: endTime, displayType: "LessOrEqual" },
@@ -1181,37 +1241,76 @@
  pageQuery.value.page = 1;
  initData();
};
//重置表单
const resetForm = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
  form.value = {
    bogie: "", //转向架
    coachNum: "", //车厢
    processDept: "", //检修班组
    track: "", //股道
    trainKind: "", //车型
    trainNum: "", //车组号
    creater: "",
    createDate: formatTime(new Date()), //创建时间
  };
};
//重置方法
const resetQuery = () => {
  queryForm.value = Object.assign({}, obj);
  pageQuery.value.page = 1;
  initData();
};
//重置表单
const handleClose = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
};
onMounted(() => {
  initData();
  GetUerType().then((res) => {
    UerTypeoptions.value.quality = res.data.filter(
      (item) => item.roleId != 1 && item.roleName.substring(2, 2) == "质检"
    );
    UerTypeoptions.value.electric = res.data.filter(
      (item) =>
        item.roleId != 1 &&
        item.roleName.substring(2, 2) != "质检" &&
        item.roleName.substring(0, 2) == "电气"
    );
    UerTypeoptions.value.mechanical = res.data.filter(
      (item) =>
        item.roleId != 1 &&
        item.roleName.substring(2, 2) != "质检" &&
        item.roleName.substring(0, 2) == "机械"
    );
    UerTypeoptions.value.trench = res.data.filter(
      (item) =>
        item.roleId != 1 &&
        item.roleName.substring(2, 2) != "质检" &&
        item.roleName.substring(0, 2) == "地沟"
    );
  });
});
</script>
<style lang="scss" scoped>
.Taskmanagement {
  display: flex;
  background-color: #fff;
  .content {
    width: 100%;
    display: flex;
    flex-direction: column;
    .serch {
      display: flex;
      margin-top: 1.31rem;
      align-items: center;
      .time_box {
        display: flex;
        align-items: center;
        text-align: center;
        margin-left: 0.98rem;
        .time {
          box-sizing: border-box;
          width: 6.88rem;
@@ -1225,12 +1324,14 @@
          justify-content: center;
        }
      }
      .serch_box {
        display: flex;
        align-items: center;
        text-align: center;
        margin-left: 0.98rem;
        border-radius: 0.38rem;
        .serchb {
          box-sizing: border-box;
          width: 6.88rem;
@@ -1242,6 +1343,7 @@
          align-items: center;
          justify-content: center;
        }
        input {
          box-sizing: border-box;
          outline: none;
@@ -1254,6 +1356,7 @@
        }
      }
    }
    .btns {
      display: flex;
      justify-content: space-between;
@@ -1270,6 +1373,7 @@
.confirmButtonClass {
  margin-right: 10px;
}
.el-message-box .el-message-box__btns {
  flex-direction: row-reverse !important;
  justify-content: normal !important;
ÏîÄ¿´úÂë/client/src/views/tts/TaskManagement/Tasktemplates.vue
@@ -63,7 +63,7 @@
          <el-button
            type="primary"
            size="small"
            @click="add('新建')"
            @click="addData()"
            style="
              width: 5.5rem;
              height: 2rem;
@@ -170,7 +170,7 @@
      v-model="dialogVisible"
      title=""
      width="60%"
      @close="handleClose(formRef)"
      @close="resetForm(formRef)"
      top="2%"
    >
      <template #title>
@@ -550,7 +550,7 @@
  </div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, toRef } from "vue";
import {
  GetTemplateList,
  AddData,
@@ -561,16 +561,19 @@
import { GetUerType } from "@/api/user";
import { ElMessage } from "element-plus";
import { formatTime } from "@/utils/index.js";
const queryForm = reactive({
const obj = {
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
  selectType: "",
  selectInput: "",
});
};
const queryForm = toRef({ ...obj });
//表单数据
const tableData = ref([]);
const props = { multiple: true };
const table = ref(false);
// const table = ref(false);
//新建/编辑  æäº¤æ•°æ®
const form = ref({
  templateName: "",
@@ -587,22 +590,25 @@
  fuZhu_Lc: "",
  liJu_Dg: "",
  fuZhu_Dg: "",
  createDate: formatTime(new Date()), //创建时间
  creater: JSON.parse(localStorage.getItem("user")).userName, //创建人
});
const selectoptions = ref([
  {
    value: "电气",
    label: "电气",
    value: "templateName",
    label: "模板名称",
  },
  {
    value: "机械",
    label: "机械",
    value: "takeName",
    label: "任务名称",
  },
  {
    value: "地沟",
    label: "地沟",
    value: "jiShuYuan",
    label: "技术员",
  },
]);
//表单规则
const rules = reactive({
  templateName: [
    { required: true, message: "请输入模板名称", trigger: "blur" },
@@ -632,13 +638,6 @@
  ],
  fuZhu_Dg: [{ required: true, message: "请输入地沟辅助员", trigger: "blur" }],
});
function cancelClick() {
  table.value = false;
}
function confirmClick() {
  table.value = false;
}
//弹出框
const dialogVisible = ref(false);
const UerTypeoptions = ref({
@@ -648,21 +647,34 @@
  trench: [], //地沟
});
const type = ref("新建");
//新建编辑ref
const formRef = ref();
//页面数量
const pageTotal = ref(0);
//添加方法
const add = (val) => {
  type.value = val;
const addData = () => {
  type.value = "新建";
  GetUerType().then((res) => {
    UerTypeoptions.value.quality = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 2
    );
    UerTypeoptions.value.quality = res.data.filter((item) => {
      return item.user_Id != 1 && item.roleName.substring(2, 4) == "质检";
    });
    UerTypeoptions.value.electric = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 3
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "电气"
    );
    UerTypeoptions.value.mechanical = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 4
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "机械"
    );
    UerTypeoptions.value.trench = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 5
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "地沟"
    );
    dialogVisible.value = true;
  });
@@ -675,23 +687,30 @@
  form.value = Object.assign({}, obj);
  dialogVisible.value = true;
  GetUerType().then((res) => {
    UerTypeoptions.value.quality = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 2
    );
    UerTypeoptions.value.quality = res.data.filter((item) => {
      return item.user_Id != 1 && item.roleName.substring(2, 4) == "质检";
    });
    UerTypeoptions.value.electric = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 3
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "电气"
    );
    UerTypeoptions.value.mechanical = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 4
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "机械"
    );
    UerTypeoptions.value.trench = res.data.filter(
      (item) => item.roleId != 1 && item.roleId == 5
      (item) =>
        item.user_Id != 1 &&
        item.roleName.substring(2, 4) != "质检" &&
        item.roleName.substring(0, 2) == "地沟"
    );
    dialogVisible.value = true;
  });
};
// èŽ·å–æ•°æ®
const getpagedata = () => {};
//获取需要删除的数据
const deletid = ref([]);
@@ -718,19 +737,20 @@
    }
  });
};
//导出数据
const printExcel = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.selectTime[0]);
  const endTime = formatTime(queryForm.selectTime[1]);
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
  const filter = [
    {
      name: queryForm.selectType,
      value: queryForm.selectInput,
      displayType: "String",
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "like",
    },
    {
      name: "pustatus",
      value: queryForm.selectName,
      value: queryForm.value.selectName,
      displayType: "String",
    },
    { name: "createDate", value: startTime, displayType: "ThanOrEqual" },
@@ -799,16 +819,16 @@
  pageQuery.value.page = val;
  initData();
};
const pageTotal = ref(0);
//页面初始化数据
const initData = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.selectTime[0]);
  const endTime = formatTime(queryForm.selectTime[1]);
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
  const filter = [
    {
      name: "",
      value: queryForm.selectName,
      displayType: "Contains",
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "like",
    },
    { name: "createDate", value: startTime, displayType: "ThanOrEqual" },
    { name: "createDate", value: endTime, displayType: "LessOrEqual" },
@@ -827,16 +847,33 @@
  pageQuery.value.page = 1;
  initData();
};
//重置页面
const resetQuery = () => {
  queryForm.value = { selectName: "", selectTime: [] };
  queryForm.value = Object.assign({}, obj);
  pageQuery.value.page = 1;
  initData();
};
const formRef = ref();
//重置表单
const handleClose = (formEl) => {
const resetForm = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
  form.value = {
    templateName: "",
    templateGroup: "",
    takeName: "",
    jiShuYuan: "",
    gongZhang: "",
    zhiJianYuan_Dq: "",
    zhiJianYuan_Lc: "",
    zhiJianYuan_Dg: "",
    liJu_Dq: "",
    fuZhu_Dq: "",
    liJu_Lc: "",
    fuZhu_Lc: "",
    liJu_Dg: "",
    fuZhu_Dg: "",
  };
};
onMounted(() => {
  initData();
@@ -883,7 +920,6 @@
          width: 6.88rem;
          height: 2rem;
          text-align: center;
          border: 0.06rem solid rgba(222, 222, 222, 1);
          border-radius: 0.25rem 0 0 0.25rem;
          font-size: 0.75rem;
          display: flex;
ÏîÄ¿´úÂë/client/src/views/tts/TheCurrentJob/Startjob.vue
@@ -1,14 +1,14 @@
<template>
  <div class="Startjob">
    <div class="rect">
      <div class="rect-top">
      <div class="rect-top" style="position: relative">
        <img src="@/assets/TheCurrentJob/left.png" alt="" />
        <img
          style="margin-left: -1.5rem; margin-right: 4rem"
          src="@/assets/TheCurrentJob/left1.png"
          alt=""
        />
        <span>开始作业(机械)</span>
        <span>开始作业({{ title }})</span>
        <img
          style="margin-right: -1.5rem; margin-left: 4rem"
          src="@/assets/TheCurrentJob/right1.png"
@@ -17,116 +17,115 @@
        <img src="@/assets/TheCurrentJob/right.png" alt="" />
      </div>
      <div class="rect-center">
        <div style="display: flex; justify-content: space-between">
          <div class="rect-item1">
            <div>
              <img src="@/assets/TheCurrentJob/icon/icon.png" alt="" />
              <span style="color: rgba(26, 201, 255, 1); font-size: 0.88rem"
                >任务作业信息</span
        <div class="rect-item1">
          <div style="margin-top: 0.5rem">
            <img src="@/assets/TheCurrentJob/icon/icon.png" alt="" />
            <span style="color: rgba(26, 201, 255, 1); font-size: 1.5rem"
              >任务作业信息</span
            >
          </div>
          <div style="height: 100%; width: 100%">
            <div style="width: 100%; padding-left: 1rem">
              <div
                style="
                  color: #1ac2f7;
                  font-size: 1rem;
                  display: flex;
                  margin-top: 0.5rem;
                "
              >
            </div>
            <div style="height: 100%; width: 100%">
              <div style="width: 100%">
                <span style="width: 6rem; text-align: right; display: block"
                  >任务名称:</span
                ><span>{{ info.takename }}</span>
              </div>
              <div
                style="
                  color: #1ac2f7;
                  font-size: 1rem;
                  display: flex;
                  margin-top: 0.4rem;
                "
              >
                <span style="width: 6rem; text-align: right; display: block"
                  >技术员:</span
                ><span>{{ info.jishuyuan }}</span>
              </div>
              <div
                style="
                  color: #1ac2f7;
                  font-size: 1rem;
                  display: flex;
                  margin-top: 0.4rem;
                "
              >
                <span style="width: 6rem; text-align: right; display: block"
                  >检修工厂:</span
                ><span>{{ info.gonzhang }}</span>
              </div>
              <div
                style="
                  color: #1ac2f7;
                  font-size: 1rem;
                  display: flex;
                  margin-top: 0.4rem;
                "
              >
                <span style="width: 6rem; text-align: right; display: block"
                  >质检员:</span
                ><span>{{ info.zhijianyuan }}</span>
              </div>
              <div
                style="
                  color: #1ac2f7;
                  font-size: 1rem;
                  display: flex;
                  margin-top: 0.4rem;
                "
              >
                <span style="width: 6rem; text-align: right; display: block"
                  >力矩作业员:</span
                ><span>{{ info.lijuzouyeyuan }}</span>
              </div>
              <div
                style="
                  color: #1ac2f7;
                  font-size: 1rem;
                  display: flex;
                  margin-top: 0.4rem;
                "
              >
                <span style="width: 6rem; text-align: right; display: block"
                  >辅助员:</span
                ><span>{{ info.fuzyuan }}</span>
              </div>
              <div
                style="
                  position: absolute;
                  color: #1ac2f7;
                  font-size: 1rem;
                  display: flex;
                  margin-top: 0.4rem;
                "
              >
                <span style="width: 6rem; text-align: right; display: block"
                  >任务详情:</span
                >
                <span
                  @click="showDetail(!contentShow1)"
                  style="color: #1ac2f7; font-size: 0.88rem; cursor: pointer"
                  >查看</span
                >
                <div
                  v-if="contentShow1"
                  style="
                    color: #1ac2f7;
                    font-size: 0.81rem;
                    display: flex;
                    margin-top: 0.4rem;
                    position: relative;
                    top: 1.5rem;
                    left: -3rem;
                    width: 49rem;
                  "
                >
                  <span style="width: 6rem; text-align: right; display: block"
                    >任务名称:</span
                  ><span>转向架</span>
                </div>
                <div
                  style="
                    color: #1ac2f7;
                    font-size: 0.81rem;
                    display: flex;
                    margin-top: 0.4rem;
                  "
                >
                  <span style="width: 6rem; text-align: right; display: block"
                    >技术员:</span
                  ><span>张三</span>
                </div>
                <div
                  style="
                    color: #1ac2f7;
                    font-size: 0.81rem;
                    display: flex;
                    margin-top: 0.4rem;
                  "
                >
                  <span style="width: 6rem; text-align: right; display: block"
                    >检修工厂:</span
                  ><span>李四</span>
                </div>
                <div
                  style="
                    color: #1ac2f7;
                    font-size: 0.81rem;
                    display: flex;
                    margin-top: 0.4rem;
                  "
                >
                  <span style="width: 6rem; text-align: right; display: block"
                    >质检员:</span
                  ><span>七七</span>
                </div>
                <div
                  style="
                    color: #1ac2f7;
                    font-size: 0.81rem;
                    display: flex;
                    margin-top: 0.4rem;
                  "
                >
                  <span style="width: 6rem; text-align: right; display: block"
                    >力矩作业员:</span
                  ><span>王五</span>
                </div>
                <div
                  style="
                    color: #1ac2f7;
                    font-size: 0.81rem;
                    display: flex;
                    margin-top: 0.4rem;
                  "
                >
                  <span style="width: 6rem; text-align: right; display: block"
                    >辅助员:</span
                  ><span>小刘</span>
                </div>
                <div
                  style="
                    color: #1ac2f7;
                    font-size: 0.81rem;
                    display: flex;
                    margin-top: 0.4rem;
                  "
                >
                  <span style="width: 6rem; text-align: right; display: block"
                    >任务详情:</span
                  >
                  <span
                    style="color: #1ac2f7; font-size: 0.88rem; cursor: pointer"
                    >查看</span
                  >
                  <!-- <el-popover placement="bottom" :width="600" trigger="click">
                  <template #reference>
                    <span
                      style="
                        color: #1ac2f7;
                        font-size: 0.88rem;
                        cursor: pointer;
                      "
                      >查看</span
                    ></template
                  >
                  <el-table
                    :data="gridData"
                    :data="taskData"
                    width="100%"
                    :header-cell-style="{
                      color: '#fff',
@@ -138,37 +137,39 @@
                      background: '#1373A8',
                    }"
                  >
                    <el-table-column property="date" label="车型" />
                    <el-table-column property="name" label="车组" />
                    <el-table-column property="address" label="股道" />
                    <el-table-column property="address" label="车厢号位置" />
                    <el-table-column property="address" label="转向架位置" />
                    <el-table-column property="address" label="检修班组" />
                    <el-table-column property="trainKind" label="车型" />
                    <el-table-column property="trainNum" label="车组" />
                    <el-table-column property="track" label="股道" />
                    <el-table-column property="coachNum" label="车厢号位置" />
                    <el-table-column property="bogie" label="转向架位置" />
                    <el-table-column property="processDept" label="检修班组" />
                  </el-table>
                </el-popover> -->
                </div>
              </div>
            </div>
          </div>
          <div class="rect-item2">
            <div>
              <span style="color: rgba(26, 200, 254, 1); font-size: 0.75rem"
                >工艺项点/步骤共<span style="font-size: 1rem; font-weight: bold"
                  >23</span
                >
              </span>
              <span
                style="
                  margin-left: 1rem;
                  color: rgba(26, 200, 254, 1);
                  font-size: 0.75rem;
                "
                >当前作业项点/步骤<span
                  style="font-size: 1rem; font-weight: bold"
                  >3</span
                >
              </span>
            </div>
        </div>
        <div class="rect-item2">
          <div>
            <span style="color: rgba(26, 200, 254, 1); font-size: 1.2rem"
              >工艺项点/步骤共<span
                style="font-size: 1.5rem; font-weight: bold"
                >{{ sunNUm }}</span
              >
            </span>
            <span
              style="
                margin-left: 1rem;
                color: rgba(26, 200, 254, 1);
                font-size: 1.2rem;
              "
              >当前作业项点/步骤<span
                style="font-size: 1.5rem; font-weight: bold"
                >{{ obj.setpNum }}</span
              >
            </span>
          </div>
          <div style="position: absolute; width: 47rem; height: 2.5rem">
            <el-table
              style="margin-top: 0.88rem"
              :data="gridData"
@@ -185,103 +186,397 @@
              }"
            >
              <el-table-column
                property="date"
                property="craftsStep"
                label="工艺项点/步骤"
                min-width="30%"
              >
                <template #default="scope">
                  <span
                    style="color: #1ac2f7; font-size: 0.88rem"
                  ></span></template
              ></el-table-column>
                    @click="showDetail1(!contentShow)"
                    style="
                      color: #1ac2f7;
                      font-size: 0.88rem;
                      cursor: pointer;
                      text-decoration: underline;
                    "
                    >{{ scope.row.craftsStep }}
                  </span></template
                ></el-table-column
              >
              <el-table-column
                property="name"
                property="craftContent"
                label="工艺内容"
                min-width="70%"
              />
              >
                <template #default="scope">
                  <span
                    @click="true"
                    style="
                      color: #ffffff;
                      font-size: 0.88rem;
                      display: -webkit-box; /* è®¾ç½®ä¸ºWebKit内核的弹性盒子模型 */
                      -webkit-box-orient: vertical; /* åž‚直排列 */
                      -webkit-line-clamp: 2; /* é™åˆ¶æ˜¾ç¤ºä¸¤è¡Œ */
                      overflow: hidden; /* éšè—è¶…出范围的内容 */
                      text-overflow: ellipsis; /* ä½¿ç”¨çœç•¥å· */
                    "
                    >{{ scope.row.craftContent }}</span
                  ></template
                ></el-table-column
              >
            </el-table>
            <div class="consten" v-if="contentShow">
              <el-table
                :data="gridData"
                width="100%"
                :header-cell-style="{
                  height: '1.61rem',
                  color: '#fff',
                  background: '#0A5B91',
                  fontSize: '0.88rem',
                }"
                :cell-style="{
                  color: '#fff',
                  background: '#147BAF',
                }"
              >
                <el-table-column
                  property="craftsStep"
                  label="工艺内容"
                  min-width="30%"
                >
                  <template #default="scope">
                    <span @click="true" style="color: #fff; font-size: 0.88rem"
                      >{{ scope.row.craftContent }}
                    </span></template
                  ></el-table-column
                >
                <el-table-column
                  property="craftsStep"
                  label="工具"
                  min-width="10%"
                >
                  <template #default="scope">
                    <span style="color: #ffffff">{{
                      scope.row.tools
                    }}</span></template
                  ></el-table-column
                >
                <el-table-column
                  property="craftsStep"
                  label="物料"
                  min-width="10%"
                >
                  <template #default="scope">
                    <span style="color: #ffffff">{{
                      scope.row.material
                    }}</span></template
                  ></el-table-column
                >
              </el-table>
            </div>
          </div>
        </div>
        <div class="rect-item3">
          <div>
          <div style="overflow: hidden">
            <img src="@/assets/TheCurrentJob/icon/icon.png" alt="" />
            <span style="color: rgba(26, 201, 255, 1); font-size: 0.88rem"
              >力矩值显示</span
            >
            <el-scrollbar>
              <div
                style="
                  display: flex;
                  justify-content: center;
                  flex-direction: column;
                  padding-left: 1.5rem;
                  padding-top: 0.5rem;
                  padding-bottom: 1.5rem;
                  box-sizing: border-box;
                "
              >
                <span
                  style="color: #ffffff; font-size: 1rem; margin: 0.5rem 0"
                  v-for="(item, index) in Torque"
                  :key="item.id"
                  >{{
                    index + 1 + "、" + item.torqueSize + "&nbsp;" + "N*m"
                  }}</span
                >
              </div>
            </el-scrollbar>
          </div>
        </div>
      </div>
      <div class="rect-content">
        <div
          style="
            display: flex;
            justify-content: center;
            align-items: center;
            width: 21.31rem;
            height: 26.88rem;
            background-color: rgba(25, 189, 241, 0.1);
            color: rgba(16, 16, 16, 1);
            font-size: 0.75rem;
            border: 0.06rem solid rgba(26, 200, 254, 1);
          "
        >
          <span style="color: rgba(26, 194, 247, 1); font-size: 1.25rem"
            >爆炸图显示</span
          >
        </div>
      <div
        ref="screenDom"
        style="
          margin: 0 auto;
          display: flex;
          justify-content: center;
          align-items: center;
          z-index: 999;
          position: absolute;
          top: 42%;
          left: 15%;
        "
      >
        <model-gltf
          :width="400"
          :height="400"
          :backgroundAlpha="0"
          :backgroundColor="'#000000'"
          src="ThreeModel/test.gltf"
          :controlsOptions="{
            enableZoom,
          }"
        />
      </div>
      <div
        style="
          display: flex;
          justify-content: center;
          align-items: center;
          margin-top: 4.25rem;
          margin-top: 30rem;
        "
      >
        <el-button
          :disabled="obj.setpNum == 1"
          @click="Previous(false)"
          type="primary"
          style="
            width: 5rem;
            height: 1.88rem;
            background-color: rgba(164, 173, 179, 1);
            color: rgba(255, 255, 255, 1);
            font-size: 0.88rem;
          "
          :style="{
            width: '5rem',
            height: '1.88rem',
            background:
              obj.setpNum == 1
                ? 'rgba(164, 173, 179, 1)'
                : 'rgba(26, 194, 247, 1)',
            color: 'rgba(255, 255, 255, 1)',
            fontSize: '0.88rem;',
          }"
          >上一步</el-button
        >
        <el-button
          :disabled="obj.setpNum == sunNUm"
          @click="Next(false)"
          type="primary"
          style="
            width: 5rem;
            height: 1.88rem;
            background-color: rgba(26, 194, 247, 1);
            color: rgba(255, 255, 255, 1);
            font-size: 0.88rem;
          "
          :style="{
            width: '5rem',
            height: '1.88rem',
            background:
              obj.setpNum != sunNUm
                ? 'rgba(26, 194, 247, 1)'
                : 'rgba(164, 173, 179, 1)',
            color: ' rgba(255, 255, 255, 1)',
            fontSize: '0.88rem',
          }"
          >下一步</el-button
        >
        <el-button
          :disabled="obj.setpNum != sunNUm"
          @click="Completee"
          type="primary"
          style="
            height: 1.88rem;
            width: 5rem;
            background-color: rgba(164, 173, 179, 1);
            color: rgba(255, 255, 255, 1);
            font-size: 0.88rem;
          "
          :style="{
            height: '1.88rem',
            width: '5rem',
            background:
              obj.setpNum == sunNUm
                ? 'rgba(26, 194, 247, 1)'
                : 'rgba(164, 173, 179, 1)',
            color: 'rgba(255, 255, 255, 1)',
            fontSize: '0.88rem',
          }"
          >完成作业</el-button
        >
      </div>
    </div>
    <!-- å¼ºåˆ¶è·³è½¬ç¡®è®¤æ¡† -->
    <el-dialog v-model="centerDialogVisible" title="确认" width="300" center>
      <span> å½“前任务未完成,是否强制跳转到下一步? </span>
      <template #footer>
        <div class="dialog-footer">
          <el-button style="width: 5rem" @click="centerDialogVisible = false"
            >取消</el-button
          >
          <el-button style="width: 5rem" type="primary" @click="Next(true)">
            ç¡®è®¤
          </el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import {
  GetScreenData,
  GetPre,
  GetNext,
  Complete,
  GetTorque,
  ChangeStatus,
} from "@/api/newapi/Thecurrentjob";
import { GetPageData } from "@/api/newapi/NjTask";
import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus";
import { ModelCollada, ModelGltf } from "vue-3d-model";
const router = useRouter();
const gridData = ref([]);
const contentShow = ref(false);
const contentShow1 = ref(false);
const info = ref({});
info.value = history.state?.info ? JSON.parse(history.state?.info) : {};
const title = ref("");
title.value = history.state?.title ? history.state?.title : "机械";
const enableZoom = ref(false);
const obj = ref({});
const sunNUm = ref(0);
const Torque = ref("");
const showDetail1 = (va1) => {
  contentShow1.value = false;
  contentShow.value = va1;
};
const showDetail = (va1) => {
  contentShow1.value = va1;
  contentShow.value = false;
  checko();
};
const taskData = ref([]);
const centerDialogVisible = ref(false);
const from = ref({
  group: "",
  takeid: "",
  setnum: 0,
});
const flag = ref(false);
//上一步
const Previous = (val) => {
  from.value.group = info.value.grouptype;
  from.value.takeid = info.value.njtakeid;
  from.value.setnum = obj.value.setpNum;
  flag.value = val;
  console.log(from.value, info.value);
  GetPre(from.value, flag.value).then((res) => {
    gridData.value = [res.data.nex];
    obj.value = res.data.nex;
    queryData.value.setnum = obj.value.setpNum;
    GetTorque(queryData.value).then((res) => {
      Torque.value = res.data;
    });
  });
};
//下一步
const Next = (val) => {
  console.log(obj.value);
  from.value.group = info.value.grouptype;
  from.value.takeid = info.value.njtakeid;
  from.value.setnum = obj.value.setpNum;
  flag.value = val;
  GetNext(from.value, flag.value).then((res) => {
    if (res.message == "没有完成当前步骤") {
      gridData.value = res.data.nowdate;
      obj.value = res.data.nowdate[0];
      if (res.data.nowdate[0].setpNum == obj.value.setpNum) {
        centerDialogVisible.value = true;
        return;
      }
      return;
    }
    centerDialogVisible.value = false;
    gridData.value = [res.data.nex];
    obj.value = res.data.nex;
    queryData.value.setnum = obj.value.setpNum;
    GetTorque(queryData.value).then((res) => {
      Torque.value = res.data;
    });
  });
};
//完成
const Completee = () => {
  from.value.gruops = info.value.grouptype;
  from.value.id = info.value.njtakeid;
  from.value.creater = info.value.creater;
  console.log(from.value, info.value);
  ChangeStatus(from.value).then((res) => {
    ElMessage({
      message: "操作完成",
      type: "success",
    });
    router.push("/Thecurrentjob");
  });
};
//查看数据
const checko = () => {
  console.log(info.value);
  GetPageData({
    page: 1,
    rows: 10,
    total: 100,
    tableName: "",
    sort: "",
    order: "",
    wheres: "",
    export: true,
    value: "",
    filter: [
      {
        name: "njtaskid",
        value: info.value.njtakeid,
        displayType: "String",
      },
    ],
  }).then((res) => {
    console.log(res);
    taskData.value = res.rows;
  });
};
const queryData = ref({
  grop: info.value.grouptype,
  takeid: info.value.njtakeid,
  setnum: "",
});
const initData = () => {
  GetScreenData({
    group: info.value.grouptype,
    takeid: info.value.njtakeid,
  }).then((res) => {
    if (res.message == "返回工艺表中的第一条") {
      gridData.value = res.data.proNoe;
      obj.value = res.data.proNoe[0];
      sunNUm.value = res.data.maxproce;
      queryData.value.setnum = obj.value.setpNum;
      GetTorque(queryData.value).then((res) => {
        Torque.value = res.data;
      });
      return;
    }
    gridData.value = res.data.maxpro;
    sunNUm.value = res.data.maxproce;
    obj.value = res.data.maxpro[0];
    queryData.value.setnum = obj.value.setpNum;
    GetTorque(queryData.value).then((res) => {
      Torque.value = res.data;
    });
  });
};
onMounted(() => {
  initData();
});
</script>
<style lang="scss" scoped>
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
.Startjob {
  width: 100%;
  height: 100%;
@@ -297,6 +592,8 @@
  padding: 0.2rem;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  .rect {
    display: flex;
    flex-direction: column;
@@ -304,6 +601,7 @@
    height: 100%;
    border: 0.1rem solid #02cde6;
    box-shadow: 0rem 0rem 0.3rem #02cde6;
    .rect-top {
      display: flex;
      justify-content: center;
@@ -312,48 +610,61 @@
      height: 3rem;
      background: #051d3f;
      text-align: center;
      img {
        width: 3.75rem;
        height: 2.81rem;
      }
      span {
        color: rgba(26, 194, 247, 1);
        font-size: 1.25rem;
      }
    }
    .rect-center {
      display: flex;
      justify-content: space-between;
      width: 100%;
      width: 170vh;
      margin: 0 auto;
      padding: 0.8rem 2.15rem;
      box-sizing: border-box;
      .rect-item1 {
        display: flex;
        flex-direction: column;
        width: 11.31rem;
        height: 12.38rem;
        width: 14.31rem;
        height: 15.38rem;
        background-image: url("../../../assets/TheCurrentJob/bg.png");
        background-repeat: no-repeat;
        background-size: 100% 100%;
        padding: 0.28rem 0.28rem;
        box-sizing: border-box;
      }
      .rect-item2 {
        width: 49.88rem;
        height: 12.38rem;
        height: 15.38rem;
        border: 0.1rem solid #02cde6;
        padding: 0.69rem 1.44rem;
        margin-left: 6rem;
        .el-table :deep(.el-table__header th) {
          border: solid 1px #1ac0f6;
          color: white;
        }
        .consten {
          position: relative;
          top: 0;
          z-index: 999;
        }
      }
      .rect-item3 {
        display: flex;
        flex-direction: column;
        width: 11.31rem;
        height: 12.38rem;
        height: 15.38rem;
        background-image: url("../../../assets/TheCurrentJob/bg.png");
        background-repeat: no-repeat;
        background-size: 100% 100%;
@@ -361,6 +672,7 @@
        box-sizing: border-box;
      }
    }
    .rect-content {
      display: flex;
      justify-content: space-between;
@@ -370,6 +682,7 @@
    }
  }
}
// .el-table :deep(.el-table__header th) {
//   border-bottom: solid 1px #1ac2f7;
//   color: white;
@@ -378,14 +691,17 @@
  border: solid 1px #1ac2f7;
  color: white;
}
.el-table :deep(.el-table__empty-block) {
  background-color: #137aaf;
  color: #1ac2f7;
}
// .el-table :deep(.el-table__body-wrapper) {
//   background-color: #1ac2f7;
// }
// .el-popper :deep(.el-popper) {
//   background-color: #ad2525;
// }
.el-table :deep(.el-table__body-wrapper) {
  background-color: #1ac2f7;
}
:deep(.el-popper) {
  background-color: #ad2525;
}
</style>
ÏîÄ¿´úÂë/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue
@@ -3,18 +3,21 @@
    <div class="content">
      <div class="checkbox">
        <div
          v-if="show == '超级' || show == '机械'"
          :class="['item', isactive == '机械' ? 'isactive' : '']"
          @click="changeactive('机械')"
        >
          æœºæ¢°
        </div>
        <div
          v-if="show == '超级' || show == '电气'"
          :class="['item', isactive == '电气' ? 'isactive' : '']"
          @click="changeactive('电气')"
        >
          ç”µæ°”
        </div>
        <div
          v-if="show == '超级' || show == '地沟'"
          :class="['item', isactive == '地沟' ? 'isactive' : '']"
          @click="changeactive('地沟')"
        >
@@ -59,7 +62,7 @@
            size="small"
          />
        </div>
        <!-- <div class="serch_box">
        <div class="serch_box">
          <div class="serchb">
            <el-select
              v-model="queryForm.selectType"
@@ -80,7 +83,7 @@
            placeholder="请输入关键词搜索"
            style="border-left: 0.06rem solid #e2e2e2"
          />
        </div> -->
        </div>
        <el-button
          @click="handleQuery"
          type="primary"
@@ -201,11 +204,15 @@
            label="派工日期"
            align="center"
          />
          <el-table-column
            prop="finishedtime"
            label="完成日期"
            align="center"
          />
          <el-table-column prop="finishedtime" label="完成日期" align="center">
            <template #default="scope">
              {{
                scope.row.finishedtime != "1900-01-01 00:00:00"
                  ? scope.row.finishedtime
                  : ""
              }}
            </template></el-table-column
          >
          <el-table-column label="操作" align="center">
            <template #default="scope">
              <el-button
@@ -224,7 +231,7 @@
                v-if="scope.row.pustatus == 1"
                size="small"
                type="text"
                @click="router.push('/Startjob')"
                @click="toDetail(scope.row, isactive)"
                >开始作业</el-button
              >
              <el-button
@@ -344,11 +351,15 @@
            label="派工日期"
            align="center"
          />
          <el-table-column
            prop="finishedtime"
            label="完成日期"
            align="center"
          />
          <el-table-column prop="finishedtime" label="完成日期" align="center">
            <template #default="scope">
              {{
                scope.row.finishedtime != "1900-01-01 00:00:00"
                  ? scope.row.finishedtime
                  : ""
              }}
            </template>
          </el-table-column>
          <el-table-column label="操作" align="center">
            <template #default="scope">
              <el-button
@@ -367,7 +378,7 @@
                v-if="scope.row.pustatus == 1"
                size="small"
                type="text"
                @click="claim(scope.row, 2)"
                @click="toDetail(scope.row, isactive)"
                >开始作业</el-button
              >
              <el-button
@@ -487,11 +498,15 @@
            label="派工日期"
            align="center"
          />
          <el-table-column
            prop="finishedtime"
            label="完成日期"
            align="center"
          />
          <el-table-column prop="finishedtime" label="完成日期" align="center">
            <template #default="scope">
              {{
                scope.row.finishedtime != "1900-01-01 00:00:00"
                  ? scope.row.finishedtime
                  : ""
              }}
            </template>
          </el-table-column>
          <el-table-column label="操作" align="center">
            <template #default="scope">
              <el-button
@@ -510,7 +525,7 @@
                v-if="scope.row.pustatus == 1"
                size="small"
                type="text"
                @click="claim(scope.row, 2)"
                @click="toDetail(scope.row, isactive)"
                >开始作业</el-button
              >
              <el-button
@@ -638,9 +653,7 @@
      <template #footer>
        <div class="dialog-footer" style="text-align: right">
          <el-button @click="claimdialogVisible2 = false">取消</el-button>
          <el-button type="primary" @click="claimdialogVisible = false">
            ç¡®è®¤
          </el-button>
          <el-button type="primary" @click="changeStatus"> ç¡®è®¤ </el-button>
        </div>
      </template>
    </el-dialog>
@@ -685,13 +698,19 @@
  </div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, toRef } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router";
import { GetPageData, ExportApi } from "@/api/newapi/Thecurrentjob";
import { formatTime } from "@/utils/index.js";
import { GetDetail, ChangeStatus } from "@/api/newapi/Thecurrentjob";
import {
  GetDetail,
  ChangeStatus,
  GetPageData,
  ExportApi,
  GetPageDataNew,
} from "@/api/newapi/Thecurrentjob";
import { GetSleeveandStep } from "@/api/newapi/Process";
import { GetUserInfo } from "@/api/user";
const router = useRouter();
const obj = {
@@ -700,12 +719,7 @@
  selectType: "",
  inputcontent: "",
};
const queryForm = ref({
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
  selectType: "",
  inputcontent: "",
});
const queryForm = toRef({ ...obj });
const selectoptions = ref([
  {
    value: "takename",
@@ -718,6 +732,14 @@
  {
    value: "gonzhang",
    label: "检修工长",
  },
  {
    value: "zhijianyuan",
    label: "质检员",
  },
  {
    value: "lijuzouyeyuan",
    label: "力矩作业员",
  },
]);
const tableData = ref([]);
@@ -763,21 +785,16 @@
  queryForm.selectType = value;
  initData();
};
//弹出框
const dialogVisible = ref(false);
//删除方法
const add = () => {
  dialogVisible.value = true;
};
//编辑方法
const Edit = () => {
  dialogVisible.value = true;
};
const claimdata = ref({
  id: "",
  gruops: "",
  creater: JSON.parse(localStorage.getItem("user")).userName,
  createDate: formatTime(new Date()),
});
const TTnum = ref(0);
//页面数
const pageTotal = ref(0);
//确认领取
const claim = (val, num) => {
  claimdata.value.id = val.njtakeid;
@@ -801,13 +818,17 @@
    }
  });
};
//改变状态
const changeStatus = () => {
  console.log(claimdata.value);
  ChangeStatus(claimdata.value).then((res) => {
    ElMessage({
      message: res.msg,
      message: "成功",
      type: "success",
    });
    claimdialogVisible.value = false;
    claimdialogVisible1.value = false;
    claimdialogVisible2.value = false;
    initData();
  });
};
@@ -825,7 +846,7 @@
  page: 1, //当前页面
  rows: 10, //每页显示条数
  order: "desc", //排序方式
  sort: "dispatchtime", //排序字段
  sort: "", //排序字段
  wheres: "", //条件查询
});
@@ -840,8 +861,18 @@
  pageQuery.value.page = val;
  initData();
};
const pageTotal = ref(0);
//数据初始化
const initData = () => {
  let obj = {
    userId: JSON.parse(localStorage.getItem("user")).id,
    group: isactive.value,
  };
  console.log(obj);
  // GetPageDataNew(obj).then((res) => {
  //   tableData.value = res.data;
  //   pageTotal.value = res.data.length;
  // });
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
@@ -854,7 +885,7 @@
    {
      name: queryForm.value.selectType,
      value: queryForm.value.inputcontent,
      displayType: "String",
      displayType: "like",
    },
    {
      name: "pustatus",
@@ -872,7 +903,7 @@
    pageTotal.value = res.total;
  });
};
//打印数据
const printExcel = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.value.selectTime[0]);
@@ -906,15 +937,44 @@
  pageQuery.value.page = 1;
  initData();
};
//重置检索事件
const resetQuery = () => {
  queryForm.value = Object.assign({}, obj);
  pageQuery.value.page = 1;
  initData();
};
//重置表单
const resetForm = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
};
const userInfo = ref("");
//路由跳转
const toDetail = (row, title) => {
  router.push({
    name: "Startjob",
    state: { info: JSON.stringify(row), title: title },
  });
};
const show = ref("");
const getuserinfo = () => {
  GetUserInfo().then((res) => {
    console.log(res);
    show.value = res.data.roleName.substring(0, 2);
    if (show.value != "超级") {
      isactive.value = show.value;
      initData();
    }
  });
};
//数据初始化
onMounted(() => {
  initData();
  getuserinfo();
  userInfo.value = JSON.parse(localStorage.getItem("user")).userName;
});
</script>
ÏîÄ¿´úÂë/client/src/views/tts/UserManagement/Usermanagement.vue
@@ -39,7 +39,7 @@
            size="small"
          />
        </div>
        <!-- <div class="serch_box">
        <div class="serch_box">
          <div class="serchb">
            <el-select
              v-model="queryForm.selectType"
@@ -56,11 +56,11 @@
            </el-select>
          </div>
          <input
            v-model="queryForm.selectName"
            v-model="queryForm.selectInput"
            placeholder="请输入关键词搜索"
            style="border-left: 0.06rem solid #e2e2e2"
          />
        </div> -->
        </div>
        <el-button
          @click="handleQuery"
          type="primary"
@@ -87,7 +87,7 @@
              display: flex;
              align-items: center;
            "
            ><el-icon style="margin-right: 0.2rem"><Plus /></el-icon
            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
            >新建</el-button
          >
          <!-- ç”¨æˆ·è§’色新建 -->
@@ -103,7 +103,7 @@
              display: flex;
              align-items: center;
            "
            ><el-icon style="margin-right: 0.2rem"><Plus /></el-icon
            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
            >新建</el-button
          >
          <el-button
@@ -181,7 +181,7 @@
            <template #default="scope">
              <el-image
                style="width: 70px; height: 70px"
                :src="scope.row.headImageUrl"
                :src="'http://115.159.85.185:9098' + scope.row.headImageUrl"
                show-progress
                :initial-index="4"
                fit="cover"
@@ -206,12 +206,21 @@
          />
          <el-table-column label="操作" align="center" min-width="3%">
            <template #default="scope">
              <el-button size="small" type="text" @click="Edit(scope.row)"
              <el-button
                size="small"
                type="text"
                @click="Edit(scope.row)"
                :disabled="
                  scope.row.userName == 'admin' || scope.row.user_Id == '1'
                "
                >编辑</el-button
              >
              <el-button
                size="small"
                type="text"
                :disabled="
                  scope.row.userName == 'admin' || scope.row.user_Id == '1'
                "
                @click="Editpassword(scope.row)"
                >修改密码</el-button
              >
@@ -244,12 +253,8 @@
          <el-table-column prop="name" label="角色权限" align="center">
            <template #default="scope">
              <span
                @click="
                  router.replace({
                    path: `/permission`,
                    state: { info: JSON.stringify(scope.row) },
                  })
                "
                v-if="scope.row.roleId != '20'"
                @click="toDetail(scope.row)"
                style="color: #4386ff; cursor: pointer"
                >管理</span
              >
@@ -270,6 +275,7 @@
          <el-table-column label="操作" align="center">
            <template #default="scope">
              <span
                v-if="scope.row.roleId != '20'"
                style="color: blue; font-size: 0.88rem; cursor: pointer"
                @click="EditRole(scope.row)"
                >编辑</span
@@ -298,17 +304,6 @@
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
        />
        <el-pagination
          v-if="isactive == 2"
          size="small"
          background
          layout="prev, pager, next"
          :current-page="pageQuery.page"
          :page-size="pageQuery.rows"
          :total="pageTotal"
          @size-change="RoleSizeChange"
          @current-change="RoleCurrentChange"
        />
      </div>
    </div>
@@ -320,6 +315,7 @@
      :before-close="handleClose"
      :show-close="false"
      :align-center="true"
      @close="resetForm(formUserRef)"
    >
      <template #title>
        <div
@@ -339,7 +335,9 @@
        :model="formUser"
        label-width="auto"
        label-position="top"
        ref="formRef"
        :rules="rules"
        ref="formUserRef"
        :hide-required-asterisk="true"
      >
        <el-row :gutter="20">
          <el-col :span="8">
@@ -399,14 +397,14 @@
        </el-row>
        <el-row :gutter="20">
          <el-col :span="8">
            <el-form-item>
            <el-form-item prop="role_Id">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
                  <span
                    style="font-size: 0.88rem; color: black; font-weight: bold"
                    >用户角色</span
                  >
                    >用户角色
                  </span>
                </div>
              </template>
              <el-select
@@ -415,6 +413,7 @@
                size="small"
              >
                <el-option
                  :disabled="item.value == 20"
                  v-for="item in groupOptions"
                  :key="item.value"
                  :label="item.label"
@@ -424,7 +423,32 @@
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item>
            <el-form-item prop="roleName">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
                  <span
                    style="font-size: 0.88rem; color: black; font-weight: bold"
                    >用户类型
                  </span>
                </div>
              </template>
              <el-select
                v-model="formUser.roleName"
                placeholder="请选择"
                size="small"
              >
                <el-option
                  v-for="item in roleNameList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item prop="enable">
              <template #label>
                <div style="display: flex; align-items: flex-end">
                  <span style="color: red; margin-right: 0.2rem">*</span>
@@ -458,25 +482,32 @@
                  <span
                    style="font-size: 0.88rem; color: black; font-weight: bold"
                    >人脸图片</span
                  ><span
                  >
                  <!-- <span
                    style="
                      color: rgba(255, 0, 0, 1);
                      font-size: 0.75rem;
                      margin-left: 0.5rem;
                    "
                    >注:最多可上传三张,图片需要正规的人像证件照</span
                  >
                  > -->
                </div>
              </template>
              <el-upload
                ref="uploadRef"
                name="files"
                class="avatar-uploader"
                action="#"
                action="http://115.159.85.185:9098/api/User/SaveFiles"
                list-type="picture-card"
                :auto-upload="false"
                limit="1"
                :auto-upload="true"
                @before-upload="beforeAvatarUpload"
                :on-change="handleAvatarSuccess"
                :on-success="handleAvatarSuccess"
                :file-list="fileList != [] ? fileList : []"
              >
                <el-icon><Plus /></el-icon>
                <el-icon>
                  <Plus />
                </el-icon>
                <template #file="{ file }">
                  <div>
                    <img
@@ -496,14 +527,18 @@
                        class="el-upload-list__item-delete"
                        @click="handleDownload(file)"
                      >
                        <el-icon size="15"><Download /></el-icon>
                        <el-icon size="15">
                          <Download />
                        </el-icon>
                      </span>
                      <span
                        v-if="!disabled"
                        class="el-upload-list__item-delete"
                        @click="handleRemove(file)"
                      >
                        <el-icon size="15"><Delete /></el-icon>
                        <el-icon size="15">
                          <Delete />
                        </el-icon>
                      </span>
                    </span>
                  </div>
@@ -525,7 +560,7 @@
          <el-button
            size="small"
            type="primary"
            @click="saveObj"
            @click="saveObj(formUserRef)"
            style="height: 2rem; font-size: 0.88rem"
          >
            ä¿å­˜
@@ -558,7 +593,7 @@
        </div>
      </template>
      <el-form
        :model="formpassword"
        :model="formUser"
        label-width="auto"
        label-position="top"
        ref="formpasswordRef"
@@ -585,11 +620,11 @@
            </div>
          </el-col>
        </el-row>
        <el-form-item prop="password">
        <el-form-item prop="newPwd">
          <el-input
            style="margin-top: 1rem"
            size="large"
            v-model="formpassword.password"
            v-model="formUser.newPwd"
            placeholder="请输入"
          />
        </el-form-item>
@@ -623,6 +658,7 @@
      :before-close="handleClose"
      :show-close="false"
      :align-center="true"
      @close="resetForm1(formRoleRef)"
    >
      <template #title>
        <div
@@ -717,7 +753,7 @@
  </div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, toRef } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import {
  GetUserList,
@@ -726,6 +762,10 @@
  DelApi,
  ExportApi,
  ExportApi1,
  UpdatePassword,
  UpdatePwd,
  AddUserApi,
  EditUserApi,
} from "@/api/user";
import { useRouter } from "vue-router";
import { formatTime } from "@/utils/index.js";
@@ -736,17 +776,19 @@
  UpdateRoleApi,
  DeleteRoleApi,
} from "@/api/role";
const queryForm = reactive({
let obj = {
  selectName: "",
  selectTime: [], // æ—¶é—´èŒƒå›´
  selectType: "",
  selectInput: "",
});
};
const queryForm = toRef({ ...obj });
const router = useRouter();
const tableData = ref([]);
const grideData = ref([{ id: 1 }]);
const formRef = ref();
const grideData = ref([]);
//新建用户ref
const formUserRef = ref();
const options = ref([]);
const props = { multiple: true };
const isoptins = ref([
@@ -758,17 +800,16 @@
]);
//分组
const groupOptions = ref([
  { value: 1, label: "超级管理员" },
  { value: 2, label: "质检组" },
  { value: 3, label: "电气组" },
  { value: 4, label: "机械组" },
  { value: 5, label: "地沟组" },
  { value: 20, label: "超级管理员" },
  { value: 21, label: "质检组" },
  { value: 22, label: "电气组" },
  { value: 23, label: "机械组" },
  { value: 24, label: "地沟组" },
]);
const table = ref(false);
const formUser = ref({
  user_Id: undefined,
  userName: "",
  role_Id: 2,
  role_Id: 21,
  roleName: "",
  phoneNo: "",
  remark: "",
@@ -777,14 +818,47 @@
  dept_Id: 0,
  enable: 1,
  headImageUrl: "",
  createDate: formatTime(new Date()), //创建时间
  creater: JSON.parse(localStorage.getItem("user")).userName, //创建人
  newPwd: "",
});
const userform = reactive({
  userName: "",
  description: "",
const rules = reactive({
  userName: {
    required: true,
    message: "请输入用户名",
    trigger: "blur",
  },
  role_Id: {
    required: true,
    message: "请选择角色",
    trigger: "change",
  },
  newPwd: [
    {
      required: true,
      message: "请输入密码",
      trigger: "blur",
    },
  ],
  realName: {
    required: true,
    message: "请输入姓名",
    trigger: "blur",
  },
  phoneNo: {
    required: true,
    message: "请输入手机号",
    trigger: "blur",
  },
  userTrueName: {
    required: true,
    message: "请输入真实姓名",
    trigger: "blur",
  },
});
const formpasswordRef = ref();
const isactive = ref(1);
const claimdialogVisible = ref(false);
const dialogVisible = ref(false);
const imgdialogVisible = ref(false);
const dialogImageUrl = ref("");
@@ -792,27 +866,7 @@
const dialogVisible1 = ref(false);
//用户角色新建
const dialogVisible2 = ref(false);
const TorquedialogVisible = ref(false);
//分页请求参数
const pageQuery = ref({
  page: 1, //当前页面
  rows: 10, //每页显示条数
  order: "desc", //排序方式
  sort: "createDate", //排序字段
  wheres: "", //条件查询
});
const changeactive = (index) => {
  isactive.value = index;
  if (isactive.value == 1) {
    selectoptions.value = userOptions;
    initData();
  } else {
    selectoptions.value = roleOptions;
    getRole();
  }
};
//筛选条件
const userOptions = [
  {
    value: "userName",
@@ -827,7 +881,18 @@
    label: "联系方式",
  },
];
const fileList = ref([]);
const roleNameList = ref([
  { value: "电气质检", label: "电气质检" },
  { value: "机械质检", label: "机械质检" },
  { value: "地沟质检", label: "地沟质检" },
  { value: "电气力矩", label: "电气力矩" },
  { value: "电气辅助", label: "电气辅助" },
  { value: "机械力矩", label: "机械力矩" },
  { value: "机械辅助", label: "机械辅助" },
  { value: "地沟力矩", label: "地沟力矩" },
  { value: "地沟辅助", label: "地沟辅助" },
]);
const roleOptions = [
  {
    value: "roleName",
@@ -836,27 +901,70 @@
];
const selectoptions = ref([]);
selectoptions.value = userOptions;
//用户修改密码
const formpassword = ref({
  password: "",
  oldPwd: "",
  newPwd: "",
});
const passwordrules = reactive({
  password: {
    required: true,
    message: "请输入密码",
    trigger: "blur",
  },
  newPwd: [
    {
      required: true,
      message: "请输入密码",
      trigger: "blur",
    },
    {
      min: 6,
      max: 12,
      message: "密码长度在 6 åˆ° 12 ä¸ªå­—符",
      trigger: "blur",
    },
  ],
});
const uploadRef = ref();
// //用户修改密码
// const handleUpdatePassword = (row) => {
//   dialogVisible1.value = true;
//   formUser.value = Object.assign({}, row);
// };
// const UpdatePassword = () => {
//   formpasswordRef.value.validate((valid) => {
//     if (valid) {
//       UpdatePassword({
//         user_Id: formUser.value.user_Id,
//         oldPwd: formpassword.value.oldPwd,
//         newPwd: formpassword.value.newPwd,
//       }).then((res) => {
//         if (res.code == 200) {
//           ElMessage({
//             message: "修改成功",
//             type: "success",
//           });
//           dialogVisible1.value = false;
//           initData();
//         } else {
//           ElMessage({
//             message: res.msg,
//             type: "error",
//           });
//         }
//       });
//     }
//   });
// };
const pageTotal = ref(0);
//登录记录
const initData = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.selectTime[0]);
  const endTime = formatTime(queryForm.selectTime[1]);
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
  const filter = [
    {
      name: "",
      value: queryForm.selectType,
      displayType: "int",
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "like",
    },
    { name: "createDate", value: startTime, displayType: "ThanOrEqual" },
    { name: "createDate", value: endTime, displayType: "LessOrEqual" },
@@ -869,56 +977,111 @@
    pageTotal.value = res.total;
  });
};
//分页请求参数
const pageQuery = ref({
  page: 1, //当前页面
  rows: 10, //每页显示条数
  order: "desc", //排序方式
  sort: "", //排序字段
  wheres: "", //条件查询
});
//数据检索事件
const handleQuery = () => {
  pageQuery.value.page = 1;
  initData();
  if (isactive.value == 1) {
    initData();
  } else {
    getRole();
  }
};
//重置查询条件
const resetQuery = () => {
  queryForm.selectName = "";
  queryForm.selectInput = "";
  queryForm.selectTime = [];
  queryForm.selectType = "";
  queryForm.value = Object.assign({}, obj);
  pageQuery.value.page = 1;
  initData();
  if (isactive.value == 1) {
    initData();
  } else {
    getRole();
  }
};
//分页页面大小改变
const handleSizeChange = (val) => {
  pageQuery.value.rows = val;
  initData();
  if (isactive.value == 1) {
    initData();
  } else {
    getRole();
  }
};
//分页页面改变
const handleCurrentChange = (val) => {
  pageQuery.value.page = val;
  initData();
  if (isactive.value == 1) {
    initData();
  } else {
    getRole();
  }
};
//分页页面大小改变
const RoleSizeChange = (val) => {
  pageQuery.value.rows = val;
  getRole();
const handleAvatarSuccess = (val) => {
  formUser.value.headImageUrl = "/image/" + val.data;
};
//重置表单
const resetForm = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
  formUser.value = {
    user_Id: undefined,
    userName: "",
    role_Id: 21,
    roleName: "",
    phoneNo: "",
    remark: "",
    userPwd: "123456",
    userTrueName: "",
    dept_Id: 0,
    enable: 1,
    headImageUrl: "",
    newPwd: "",
  };
};
const resetForm1 = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
  formRole.value = {
    roleName: "",
    description: "",
  };
};
//分页页面改变
const RoleCurrentChange = (val) => {
  pageQuery.value.page = val;
  getRole();
};
const handlePictureCardPreview = (uploadFile) => {
  dialogImageUrl.value = uploadFile.url;
  imgdialogVisible.value = true;
};
const handleAvatarSuccess = (val) => {
  console.log(val);
const handleRemove = (val) => {
  fileList.value = [];
  //移除已上传的图片
  formUser.value.headImageUrl = "";
};
const beforeAvatarUpload = (val) => {
  console.log(val);
};
// const submitUpload = () => {
//   let promise = new Promise((resolve, reject) => {
//     setTimeout(async () => {
//       await uploadRef.value.submit();
//       resolve("上传成功");
//     });
//   });
//   return promise;
// };
//新建用户账号
const saveObj = () => {
  formRef.value.validate((valid) => {
const saveObj = async (formEl) => {
  // submitUpload();
  if (!formEl) return;
  await formEl.validate((valid, fields) => {
    if (valid) {
      if (formUser.value.user_Id != undefined) {
        UpdateUser(formUser.value).then((res) => {
@@ -933,6 +1096,8 @@
          initData();
        });
      }
    } else {
      console.log("error submit!", fields);
    }
  });
};
@@ -958,26 +1123,47 @@
};
//编辑用户账号
const Edit = (val) => {
  console.log(val);
  let obj = Object.assign({}, val);
  formUser.value = {
    ...obj,
  };
  if (obj.headImageUrl != "") {
    fileList.value = [
      {
        name: "1",
        url: "http://192.168.0.80:5000" + obj.headImageUrl,
      },
    ];
  }
  dialogVisible.value = true;
  formUser.value = obj;
};
const newobj = ref({});
//修改密码
const Editpassword = (val) => {
  let obj = Object.assign({}, val);
  formUser.value = obj;
  formpassword.value = val;
  newobj.value = val;
  newobj.value = Object.assign({}, val);
  console.log(newobj.value);
  dialogVisible1.value = true;
};
//保存修改密码
const savePassword = async (formEl) => {
  let obj = Object.assign({}, newobj);
  obj.password = formpassword.value.password;
  // obj.password = formpassword.value.password;
  console.log(formUser.value);
  let formdata = {
    id: formUser.value.user_Id,
    oldPwd: formUser.value.userPwd,
    newPwd: formUser.value.newPwd,
  };
  if (!formEl) return;
  await formEl.validate((valid, fields) => {
    if (valid) {
      UpdateUser(obj).then((res) => {
      UpdatePwd(formdata).then((res) => {
        ElMessage({ message: "修改密码成功", type: "success" });
        dialogVisible1.value = false;
        initData();
@@ -1003,7 +1189,10 @@
const formRole = ref({
  roleName: "",
  description: "",
  createDate: formatTime(new Date()), //创建时间
  creater: JSON.parse(localStorage.getItem("user")).userName, //创建人
});
//新建角色
const AddRole = () => {
  Roletype.value = "新建";
@@ -1040,29 +1229,25 @@
  formRole.value = obj;
  dialogVisible2.value = true;
};
//获取角色
const getRole = () => {
  GetPageDataApi({
    page: 1,
    rows: 10,
    total: 100,
    tableName: "",
    sort: "",
    order: "",
    wheres: "",
    export: true,
    value: "",
    filter: [
      {
        name: "string",
        value: "string",
        displayType: "string",
      },
    ],
  }).then((res) => {
  const startTime = formatTime(queryForm.value.selectTime[0]);
  const endTime = formatTime(queryForm.value.selectTime[1]);
  const filter = [
    {
      name: queryForm.value.selectType,
      value: queryForm.value.selectInput,
      displayType: "like",
    },
    { name: "createDate", value: startTime, displayType: "ThanOrEqual" },
    { name: "createDate", value: endTime, displayType: "LessOrEqual" },
  ];
  GetPageDataApi({ ...pageQuery.value, filter }).then((res) => {
    grideData.value = res.rows;
    pageTotal.value = res.total;
  });
};
//打印数据
const printExcel = () => {
  // æŸ¥è¯¢æ¡ä»¶
  const startTime = formatTime(queryForm.selectTime[0]);
@@ -1094,6 +1279,17 @@
    });
  }
};
//切换页面
const changeactive = (index) => {
  isactive.value = index;
  if (isactive.value == 1) {
    selectoptions.value = userOptions;
    initData();
  } else {
    selectoptions.value = roleOptions;
    getRole();
  }
};
//批量删除
const ids = ref([]);
@@ -1122,6 +1318,11 @@
    });
  }
};
//管理
//路由跳转
const toDetail = (row) => {
  router.push({ name: "permission", state: { info: JSON.stringify(row) } });
};
onMounted(() => {
  initData();
@@ -1131,16 +1332,19 @@
.Usermanagement {
  display: flex;
  background-color: #fff;
  .content {
    width: 100%;
    display: flex;
    flex-direction: column;
    .checkbox {
      width: 11rem;
      display: flex;
      justify-content: space-between;
      margin-top: 1rem;
      margin-left: 1.31rem;
      .item {
        width: 5rem;
        height: 1.88rem;
@@ -1152,20 +1356,24 @@
        line-height: 1.88rem;
        cursor: pointer;
      }
      .isactive {
        background-color: rgba(16, 16, 16, 1);
        color: rgba(255, 255, 255, 1);
      }
    }
    .serch {
      display: flex;
      margin-top: 1.31rem;
      align-items: center;
      .time_box {
        display: flex;
        align-items: center;
        text-align: center;
        margin-left: 0.98rem;
        .time {
          box-sizing: border-box;
          width: 6.88rem;
@@ -1179,12 +1387,14 @@
          justify-content: center;
        }
      }
      .serch_box {
        display: flex;
        align-items: center;
        text-align: center;
        margin-left: 0.98rem;
        border-radius: 0.38rem;
        .serchb {
          box-sizing: border-box;
          width: 6.88rem;
@@ -1195,6 +1405,7 @@
          align-items: center;
          justify-content: center;
        }
        input {
          box-sizing: border-box;
          outline: none;
@@ -1207,6 +1418,7 @@
        }
      }
    }
    .btns {
      display: flex;
      justify-content: space-between;
@@ -1217,17 +1429,20 @@
      box-sizing: border-box;
    }
  }
  .my-header {
    height: 3.84rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 0.06rem solid rgba(233, 233, 233, 1);
  }
  .avatar-uploader .avatar {
    width: 7rem;
    height: 7rem;
    display: block;
  }
  :deep(.avatar-uploader .el-upload) {
    width: 7rem;
    height: 7rem;
@@ -1238,10 +1453,12 @@
    overflow: hidden;
    transition: var(--el-transition-duration-fast);
  }
  :deep(.el-upload-list__item) {
    width: 7rem;
    height: 7rem;
  }
  .avatar-uploader .el-upload:hover {
    border-color: var(--el-color-primary);
  }
@@ -1259,6 +1476,7 @@
.confirmButtonClass {
  margin-right: 10px;
}
.el-message-box .el-message-box__btns {
  flex-direction: row-reverse !important;
  justify-content: normal !important;
ÏîÄ¿´úÂë/client/tests/unit/example.spec.js
ÎļþÒÑɾ³ý
ÏîÄ¿´úÂë/client/vite.config.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
import { fileURLToPath, URL } from 'node:url'
import { resolve } from 'path';
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    vueJsx(),
    vueDevTools(),
  ],
  resolve: {
    alias: [
      {
        find: '@',
        replacement: resolve(__dirname, './src')
      }
    ]
  },
  server: {
    proxy: {
      '/api': {
        target: 'http://115.159.85.185:9098/', // ç›®æ ‡æŽ¥å£çš„域名
        changeOrigin: true, // æ˜¯å¦è·¨åŸŸ
        rewrite: (path) => path.replace(/^\/api/, '') // è·¯å¾„重写
      }
    },
    host: '0.0.0.0',
  },
  css: {
    //查看CSS属于哪个css文件
    sourceMap: true,
  },
  configureWebpack: {
    module: {
      rules: [
        {
          test: /\.mjs$/,
          include: /node_modules/,
          type: "javascript/auto",
        },
      ],
    },
  },
})
ÏîÄ¿´úÂë/client/vue.config.js
ÎļþÒÑɾ³ý