研发图纸文件管理系统-前端项目
he wei
2022-09-02 44af6009e30145b77c6b8a27c82c487b2fac4443
U 清除下载权限相关代码
10个文件已修改
60 ■■■■ 已修改文件
.env 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/login/Login.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/details/details.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/materialsCenter/list.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/product/details/details.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/product/list.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/software/list.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/user/components/userInfo.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/WorkPlace.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/account.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env
@@ -10,6 +10,5 @@
VUE_APP_API_BASE_URL=http://api.iczer.com
VUE_APP_ROLE_LIST=admin.roleList
VUE_APP_DEPARTMENT_LIST=admin.departmentList
VUE_APP_DOWNLOAD_FLAG=admin.downloadFlag
VUE_APP_PROJECT_MANAGER_LIST= admin.projectManagerList
VUE_APP_GENERAL_MANAGER_LIST = admin.generalManagerList
src/pages/login/Login.vue
@@ -108,7 +108,7 @@
  },
  methods: {
    ...mapMutations('account', ['setUser', 'setPermissions', 'setRoles', 'setRoleList',
      'setDepartmentList', 'setDownloadFlag', 'setProjectManagerList', 'setGeneralManagerList']),
      'setDepartmentList', 'setProjectManagerList', 'setGeneralManagerList']),
    onSubmit (e) {
      let vm = this;
      e.preventDefault()
@@ -137,13 +137,12 @@
      this.logging = false
      const loginRes = res.data
      if (loginRes.code >= 0) {
        const {user, permissions, roles, roleList, departmentList, downloadFlag} = this.getData(loginRes.data2, loginRes.data3);
        const {user, permissions, roles, roleList, departmentList } = this.getData(loginRes.data2, loginRes.data3);
        this.setUser(user);
        this.setPermissions(permissions);
        this.setRoles(roles);
        this.setRoleList(roleList);
        this.setDepartmentList(departmentList);
        this.setDownloadFlag(downloadFlag);
        this.getUserByRoleId(1002);
        this.getUserByRoleId(1003);
@@ -190,7 +189,6 @@
          item.value = item.id;
          return item;
        }),
        downloadFlag: data.dloadFlag,
        departmentList: data3.departs.map(item=>{
          item.key = item.departId;
          item.label = item.departName;
src/pages/resourceManage/details/details.vue
@@ -95,7 +95,7 @@
        <a-card>
          <template v-if="record.subCode">
            <a-button @click="dwgReview(record.dwgUrl)">预览</a-button>
            <a-button v-if="downloadFlag" @click="downloadLog(record)"
            <a-button @click="downloadLog(record)"
              >下载</a-button
            >
          </template>
@@ -131,7 +131,6 @@
    YcList,
  },
  computed: {
    ...mapGetters("account", ["downloadFlag"]),
  },
  methods: {
    getInfo() {
src/pages/resourceManage/materialsCenter/list.vue
@@ -60,7 +60,7 @@
              <template v-if="record.dwgUrl">
                <a-divider type="vertical"></a-divider>
                <a @click="dwgReview(record.dwgUrl)">预览</a>
                <template v-if="downloadFlag">
                <template>
                  <a-divider type="vertical"></a-divider>
                  <a @click="downloadLog(record)">下载</a>
                </template>
@@ -297,7 +297,6 @@
      return this.isAdd ? "批量增加关联关系" : "批量解除关联关系";
    },
    ...mapGetters("setting", ["affixed"]),
    ...mapGetters("account", ["downloadFlag"]),
  },
  components: {
    AdvanceTable,
src/pages/resourceManage/product/details/details.vue
@@ -77,12 +77,12 @@
              <files-table slot="content" :list="otherDoc"></files-table>
              <a-button type="primary">其他附件</a-button>
            </a-popover>
            <a-button type="primary" v-if="downloadFlag" @click="zipDownload"
            <a-button type="primary" @click="zipDownload"
              >bom下载</a-button
            >
            <a-button
              type="primary"
              v-if="downloadFlag && softwareList.length"
              v-if="softwareList.length"
              @click="showSoftwareDownload"
              >软件下载</a-button
            >
@@ -309,7 +309,6 @@
    FilesTable,
  },
  computed: {
    ...mapGetters("account", ["downloadFlag"]),
    ...mapGetters("setting", ["affixed"]),
  },
  watch: {
src/pages/resourceManage/product/list.vue
@@ -55,7 +55,7 @@
                <a-space direction="vertical" slot="content">
                  <a-button type="primary" @click="edit(record)">编辑</a-button>
                  <a-button
                    v-if="downloadFlag"
                    type="primary"
                    @click="download(record)"
                    >下载</a-button
@@ -673,7 +673,6 @@
  },
  computed: {
    ...mapGetters("account", [
      "downloadFlag",
      "roles",
      "projectManagerList",
      "generalManagerList",
src/pages/resourceManage/software/list.vue
@@ -33,7 +33,7 @@
              <span class="title">软件中心</span>
            </template>
            <template slot="action" slot-scope="{ record }">
              <template v-if="downloadFlag">
              <template >
                <a @click="download(record)">下载</a>
              </template>
            </template>
@@ -206,7 +206,6 @@
    },
  },
  computed: {
    ...mapGetters("account", ["downloadFlag"]),
  },
  mounted() {
    this.searchData();
src/pages/user/components/userInfo.vue
@@ -114,19 +114,6 @@
                  </a-select>
                </a-form-model-item>
              </a-col>
              <a-col :span="24">
                <a-form-model-item
                  label="下载权限"
                  :labelCol="{ span: 8 }"
                  :wrapperCol="{ span: 15, offset: 1 }"
                  prop="downloadF"
                >
                  <a-switch :default-checked="!!info.dloadFlag" @change="changeDload">
                    <a-icon slot="checkedChildren" type="check" />
                    <a-icon slot="unCheckedChildren" type="close" />
                  </a-switch>
                </a-form-model-item>
              </a-col>
            </a-row>
          </a-layout-content>
        </a-layout>
@@ -158,7 +145,6 @@
  drole: {
    roleName: "",
  },
  dloadFlag: 0,
  desc: "4165465",
};
function getBase64(file) {
@@ -278,15 +264,15 @@
    },
    submit() {
      let formData = new FormData();
      let { id, tel, phone, departId, faceId, roleId, name, dloadFlag } = this.info;
      let { id, tel, phone, departId, faceId, roleId, name } = this.info;
      let params = {};
      let operation;
      if (this.isEdit) {
        operation = editUser;
        params = { id, tel, phone, departId, faceId, roleId, dloadFlag };
        params = { id, tel, phone, departId, faceId, roleId };
      } else {
        operation = addUser;
        params = { name, tel, phone, departId, faceId, roleId, dloadFlag };
        params = { name, tel, phone, departId, faceId, roleId };
      }
      let json = JSON.stringify(params);
      // console.log(json);
@@ -363,10 +349,6 @@
    resetFields() {
      this.$refs.formRef.resetFields();
    },
    changeDload(checked) {
      // console.log(checked, 99)
      this.info.dloadFlag = checked * 1;
    }
  },
  mounted() {
src/pages/workplace/WorkPlace.vue
@@ -131,7 +131,7 @@
    }
  },
  computed: {
    ...mapGetters('account', ['roles', "roleList", "departmentList", "downloadFlag"]),
    ...mapGetters('account', ['roles', "roleList", "departmentList"]),
    ...mapGetters("setting", ["affixed", "minHeight"]),
  },
  mounted() {
src/store/modules/account.js
@@ -7,7 +7,6 @@
    routesConfig: null,
    roleList: null,
    departmentList: null,
    downloadFlag: null,
    projectManagerList: null,   // 项目经理列表
    generalManagerList: null,   // 总经理列表
  },
@@ -83,11 +82,6 @@
      }
      return state.roleList;
    },
    downloadFlag: state=>{
      const downloadFlag = localStorage.getItem(process.env.VUE_APP_DOWNLOAD_FLAG);
      state.downloadFlag = downloadFlag;
      return state.downloadFlag == 1?true:false;
    },
    projectManagerList: state=>{
      if(!state.projectManagerList) {
        try {
@@ -137,10 +131,6 @@
    setDepartmentList(state, departmentList) {
      state.departmentList = departmentList;
      localStorage.setItem(process.env.VUE_APP_DEPARTMENT_LIST, JSON.stringify(departmentList));
    },
    setDownloadFlag(state, downloadFlag) {
      state.downloadFlag = downloadFlag;
      localStorage.setItem(process.env.VUE_APP_DOWNLOAD_FLAG, downloadFlag);
    },
    setProjectManagerList(state, projectManagerList) {
      state.projectManagerList = projectManagerList;