Quellcode durchsuchen

文件命名格式大驼峰修改部分功能修改

pm vor 10 Monaten
Ursprung
Commit
43a1f6765a

+ 8 - 8
src/router/index.js

@@ -101,7 +101,7 @@ export const dynamicRoutes = [
     children: [
       {
         path: 'role/:userId(\\d+)',
-        component: () => import('@/views/system/user/authRole'),
+        component: () => import('@/views/system/user/AuthRole.vue'),
         name: 'AuthRole',
         meta: { title: '分配角色', activeMenu: '/system/user' }
       }
@@ -209,9 +209,9 @@ export const dynamicRoutes = [
     permissions: ['iscs:machinery:list'],
     children: [
       {
-        path: 'craftDetail',
-        component: () => import('@/views/system/technology/technologyDetail/craftDetail'),
-        name: 'craftDetail',
+        path: 'CraftDetail',
+        component: () => import('@/views/system/technology/technologyDetail/CraftDetail.vue'),
+        name: 'CraftDetail',
         meta: { title: '工艺详情' }
       }
     ]
@@ -224,9 +224,9 @@ export const dynamicRoutes = [
     permissions: ['iscs:machinery:list'],
     children: [
       {
-        path: 'deviceDetail',
-        component: () => import('@/views/system/technology/technologyDetail/deviceDetail'),
-        name: 'deviceDetail',
+        path: 'DeviceDetail',
+        component: () => import('@/views/system/technology/technologyDetail/DeviceDetail.vue'),
+        name: 'DeviceDetail',
         meta: { title: '设备详情' }
       }
     ]
@@ -267,7 +267,7 @@ export const dynamicRoutes = [
     children: [
       {
         path: 'user/:roleId(\\d+)',
-        component: () => import('@/views/system/role/authUser'),
+        component: () => import('@/views/system/role/AuthUser.vue'),
         name: 'AuthUser',
         meta: { title: '分配用户', activeMenu: '/system/role' }
       }

+ 5 - 2
src/views/mes/hw/lotoStation/index.vue

@@ -322,7 +322,7 @@ export default {
   },
   created() {
     this.getList();
-
+    this.getOtherList()
   },
   methods: {
 
@@ -348,6 +348,10 @@ export default {
         this.total = response.data.total;
         this.loading = false;
       });
+
+
+    },
+    getOtherList(){
       const data={
         pasge:1,
         size:-1
@@ -366,7 +370,6 @@ export default {
         );
 
       });
-
     },
     /** 转换部门数据结构 */
     Marsnormalizer(node) {

+ 4 - 1
src/views/mes/job/jobm/index.vue

@@ -302,7 +302,7 @@ export default {
   },
   created() {
     this.getList();
-
+    this.getOtherList()
   },
 
   methods: {
@@ -342,6 +342,9 @@ export default {
         this.loading = false;
       });
 
+
+    },
+    getOtherList(){
       const data={
         pasge:1,
         size:-1

+ 123 - 4
src/views/mes/sop/sopm/index.vue

@@ -36,6 +36,26 @@
         >新增
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button v-no-more-click
+                   type="warning"
+                   plain
+                   icon="el-icon-download"
+                   size="mini"
+                   @click="handleExport"
+                   v-hasPermi="['iscs:sop:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button v-no-more-click
+                   type="info"
+                   plain
+                   icon="el-icon-upload2"
+                   size="mini"
+                   @click="handleImport"
+                   v-hasPermi="['iscs:sop:import']"
+        >导入</el-button>
+      </el-col>
 <!--      <el-col :span="1.5">-->
 <!--        <el-button v-no-more-click-->
 <!--                   type="info"-->
@@ -98,6 +118,7 @@
                      v-hasPermi="['iscs:mars:sop:remove']"
           >删除
           </el-button>
+
         </template>
       </el-table-column>
     </el-table>
@@ -177,6 +198,51 @@
         <el-button v-no-more-click @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+<!--    导入文件-->
+    <el-dialog
+      :title="upload.title"
+      :visible.sync="upload.open"
+      width="400px"
+      append-to-body
+    >
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <div class="el-upload__tip" slot="tip">
+            <el-checkbox v-model="upload.updateSupport" />
+            是否更新已经存在的用户数据
+          </div>
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link
+            type="primary"
+            :underline="false"
+            style="font-size: 12px; vertical-align: baseline"
+            @click="importTemplate"
+          >下载模板</el-link
+          >
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-no-more-click type="primary" @click="submitFileForm"
+        >确 定</el-button
+        >
+        <el-button v-no-more-click @click="upload.open = false"
+        >取 消</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -191,6 +257,7 @@ import { listMarsDept } from '@/api/system/marsdept'
 import {listLoto} from '@/api/mes/lotoStation/lotoStation'
 import { listTechnology } from '@/api/system/machinery'
 import Template from '@/views/print/printtemplate/list.vue'
+import { getToken } from '@/utils/auth'
 
 export default {
   name: 'Dept',
@@ -249,16 +316,32 @@ export default {
           { required: true, message: '岗位不能为空', trigger: 'blur' }
         ],
         lotoId:[
-          { required: true, message: '电柜不能为空', trigger: 'blur' }
+          { required: true, message: '锁定站不能为空', trigger: 'blur' }
         ],
         machineryId:[
           { required: true, message: '设备/工艺不能为空', trigger: 'blur' }
         ]
-      }
+      },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/iscs/mars/sop/importSop"
+      },
     }
   },
   created() {
     this.getList()
+    this.getOtherList()
   },
   watch:{
     "form.workstationId":function(newVal,oldVal){
@@ -290,6 +373,9 @@ export default {
         this.total = response.data.total;
         this.loading = false
       })
+
+    },
+    getOtherList(){
       const data={
         pasge:1,
         size:-1
@@ -437,7 +523,40 @@ export default {
         this.$modal.msgSuccess('删除成功')
       }).catch(() => {
       })
-    }
-  }
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('iscs/mars/sop/exportIsMarsSop', {
+        ...this.queryParams
+      }, `sop_${new Date().getTime()}.xlsx`)
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "sop导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.download('iscs/mars/sop/importTemplate', {
+      }, `sop_item_${new Date().getTime()}.xlsx`)
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+  },
+
 }
 </script>

+ 2 - 2
src/views/system/role/authUser.vue → src/views/system/role/AuthUser.vue

@@ -101,7 +101,7 @@
 
 <script>
 import { allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/system/role";
-import selectUser from "./selectUser";
+import selectUser from "./SelectUser.vue";
 
 export default {
   name: "AuthUser",
@@ -196,4 +196,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 0 - 0
src/views/system/role/selectUser.vue → src/views/system/role/SelectUser.vue


+ 4 - 0
src/views/system/technology/technologyDetail/craftDetail.vue → src/views/system/technology/technologyDetail/CraftDetail.vue

@@ -438,6 +438,7 @@ export default {
   },
   created() {
     this.getList()
+    this.getOtherList()
     this.form.machineryId = this.$route.query.machineryId
   },
   watch: {
@@ -492,6 +493,9 @@ export default {
         console.log(this.deptList, '设备列表')
         this.loading = false
       })
+
+    },
+    getOtherList(){
       const data = {
         pasge: 1,
         size: -1

+ 0 - 0
src/views/system/technology/technologyDetail/deviceDetail.vue → src/views/system/technology/technologyDetail/DeviceDetail.vue


+ 6 - 2
src/views/system/technology/technologyList/index.vue

@@ -379,6 +379,7 @@ export default {
   },
   created() {
     this.getList()
+    this.getOtherList()
   },
   watch: {
     'form.workstationId': function(newVal, oldVal) {
@@ -442,6 +443,9 @@ export default {
 
         this.loading = false
       })
+
+    },
+    getOtherList(){
       const data = {
         pasge: 1,
         size: -1
@@ -771,10 +775,10 @@ export default {
     handleLook(row) {
       // 工艺详情
       if (this.tabPosition == "craft") {
-        this.$router.push("/system/technology/technologyDetail/craftDetail?machineryId=" + row.machineryId);
+        this.$router.push("/system/technology/technologyDetail/CraftDetail?machineryId=" + row.machineryId);
       } else {
         // 设备详情
-        this.$router.push("/system/technology/technologyDetail/deviceDetail?machineryId=" + row.machineryId);
+        this.$router.push("/system/technology/technologyDetail/DeviceDetail?machineryId=" + row.machineryId);
       }
     },
 

+ 1 - 1
src/views/system/unit/index.vue

@@ -75,7 +75,7 @@
       <el-table-column prop="unitName" label="单位名称" width="260"></el-table-column>
       <el-table-column prop="unitType" label="单位类型" width="260"></el-table-column>
       <el-table-column prop="orderNum" label="排序" width="260"></el-table-column>
-      <el-table-column prop="remark" label="备注" width="260"></el-table-column>
+      <el-table-column prop="remark" label="备注" ></el-table-column>
       <el-table-column prop="status" label="状态" width="260">
         <template slot-scope="scope">
           <el-switch

+ 0 - 0
src/views/system/user/authRole.vue → src/views/system/user/AuthRole.vue


+ 4 - 0
src/views/system/user/index.vue

@@ -549,6 +549,7 @@ export default {
   },
   created() {
     this.getList();
+    this.getOtherList()
     this.getTreeselect();
     this.getConfigKey("sys.user.initPassword").then(response => {
       this.initPassword = response.msg;
@@ -564,6 +565,9 @@ export default {
           this.loading = false;
         }
       );
+
+    },
+    getOtherList(){
       getUser().then(response => {
         this.roleOptions = response.roles;
       });

+ 0 - 0
src/views/system/user/profile/resetPwd.vue → src/views/system/user/profile/ResetPwd.vue


+ 0 - 0
src/views/system/user/profile/userAvatar.vue → src/views/system/user/profile/UserAvatar.vue


+ 0 - 0
src/views/system/user/profile/userInfo.vue → src/views/system/user/profile/UserInfo.vue


+ 3 - 3
src/views/system/user/profile/index.vue

@@ -59,9 +59,9 @@
 </template>
 
 <script>
-import userAvatar from "./userAvatar";
-import userInfo from "./userInfo";
-import resetPwd from "./resetPwd";
+import userAvatar from "./UserAvatar.vue";
+import userInfo from "./UserInfo.vue";
+import resetPwd from "./ResetPwd.vue";
 import { getUserProfile } from "@/api/system/user";
 
 export default {