Sfoglia il codice sorgente

Merge branch 'blueBranch' into allTestUrgent

qymljy 1 anno fa
parent
commit
60fda98518

+ 0 - 3
src/HDrpManagement/contactProfile/modules/detail.vue

@@ -84,9 +84,6 @@
               <el-descriptions-item :label="$t(`生日`)">
                 {{ detailInfo.birthday }}</el-descriptions-item
               >
-              <el-descriptions-item :label="$t(`单位`)">{{
-                detailInfo.company
-              }}</el-descriptions-item>
               <el-descriptions-item :label="$t('负责人')"
                 ><span
                   style="color: #e85b5b; font-size: 16px; font-weight: bold"

+ 2 - 1
src/HManagement/archives_ad/modules/filterList.vue

@@ -84,7 +84,8 @@ export default {
         },
         /* 返回分类ID */
         setId() {
-            this.$emit("changeTypeId", this.returnId)
+          console.log('返回分类ID')
+          this.$emit("changeTypeId", this.returnId)
         },
         /* 开始搜索 */
         changeSearchContent() {

+ 2 - 1
src/SManagement/archives_ad/index.vue

@@ -101,6 +101,7 @@ export default {
     },
     /* 改变分类ID */
     changeTypeId(id) {
+      console.log(id,'输出id')
       this.params.content.where.sat_sharematerial_classid = id == 0 ? null : id;
       this.getFileList(true);
     },
@@ -198,4 +199,4 @@ export default {
   bottom: 0;
   margin-top: 16px;
 }
-</style>
+</style>

+ 201 - 0
src/SManagement/archives_ad/indexCopy.vue

@@ -0,0 +1,201 @@
+<template>
+  <div>
+    <div class="normal-card">
+      <!-- 搜索及分类筛选 -->
+      <filterList :customParam="select" @changeTypeId="changeTypeId" @startSearch="startSearch">
+        <span style="flex: 1;display: flex;justify-content: flex-end;">
+          <hot-new-control @sortTypeChange="sortTypeChange" />
+        </span>
+      </filterList>
+      <!--素材列表-->
+      <list :fileData="fileData" @listItemClick="listItemClick" :isHandle="false">
+      </list>
+      <pagination :total="total" :pageSize="params.content.pageSize" :currentPage="params.content.pageNumber"
+        @pageChange="pageChange">
+      </pagination>
+      <detail ref="detail" v-if="currentFile" :currentSelectFile="currentFile"></detail>
+    </div>
+  </div>
+</template>
+
+<script>
+import filterList from "@/HManagement/archives_ad/modules/filterList.vue";
+import HotNewControl from '@/components/hot-new-control/HotNewControl'
+import CategorySelect from '@/components/category-select/CategorySelect'
+import list from '@/SManagement/archives_ad/components/list'
+import search from '@/components/search/index'
+import detail from '@/SManagement/archives_ad/components/detail'
+import Delete from '@/SManagement/archives_ad/components/delete'
+import Edit from '@/SManagement/archives_ad/components/Edit'
+import Pagination from '@/components/pagination/Pagination'
+export default {
+  name: 'index',
+  data() {
+    return {
+      params: {
+        "classname": "saletool.sharematerial.sharematerial",
+        "method": "selectList",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 12,
+          "nocache": true,
+          "where": {
+            "condition": "",
+            "sat_sharematerial_classid": null
+          }
+        }
+      },
+      //分类配置
+      select: {
+        "classname": "saletool.sharematerial.sharematerial",
+        "method": "select",
+        "content": {
+          "parentid": 0
+        }
+      },
+      fileData: [],
+      //列表数据
+      list: [],
+      //分类列表
+      total: 0,
+      //当前查看的素材
+      currentFile: ''
+    };
+  },
+  components: {
+    HotNewControl,
+    CategorySelect,
+    Pagination,
+    list,
+    search,
+    detail,
+    Delete,
+    Edit,
+    filterList
+  },
+  computed: {
+  },
+  created() {
+    this.getFileList()
+  },
+  methods: {
+    //获取文件数据
+    async getFileList(init = false) {
+      if (init) this.params.content.pageNumber = 1;
+      let res = await this.$api.requested(this.params)
+      this.total = res.total
+      for (let i = 0; i < res.data.length; i++) {
+        let list = this.fileType.fileList(res.data[i].attinfos)
+        if (!list.length) continue;
+        let obj = list.find(item => item.fileType == 'image')
+        if (!obj) continue;
+        res.data[i].cover = this.fileType.getSpecifiedImage(obj)
+        res.data.attinfos = list
+      }
+      let initID = '9999' + JSON.parse(window.sessionStorage.getItem("active_account")).userid;
+      let deleteList = [];
+      res.data.forEach(v => (initID == v.sat_sharematerial_classid && v.title == '') ? deleteList.push(v.sat_sharematerialid) : '');
+      if (deleteList.length != 0) this.handleDelete(deleteList);
+      this.fileData = res.data
+      this.params.content.sort = res.sort
+    },
+    /* 改变分类ID */
+    changeTypeId(id) {
+      this.params.content.where.sat_sharematerial_classid = id == 0 ? null : id;
+      this.getFileList(true);
+    },
+    /* 开始搜索 */
+    startSearch(value) {
+      this.params.content.where.condition = value;
+      this.getFileList(true);
+    },
+    /* 处理批量删除 */
+    handleDelete(list) {
+      this.$api.requested({
+        "classname": "webmanage.saletool.sharematerial.sharematerial",
+        "method": "delete",
+        "content": {
+          "sat_sharematerialid": list
+        }
+      }).then(res => {
+        if (res.msg == '成功') this.getList();
+      })
+    },
+    sortTypeChange(name) {
+      for (let i = 0; i < this.params.content.sort.length; i++) {
+        this.params.content.sort[i].sorted = this.params.content.sort[i].sortname == name ? 1 : 0
+      }
+      this.getFileList()
+    },
+    //列表单击事件
+    async listItemClick(data) {
+      let param = {
+        "classname": "saletool.sharematerial.sharematerial",
+        "method": "selectDetail",
+        "content": {
+          "sat_sharematerialid": data.sat_sharematerialid
+        }
+      }
+      let res = await this.$api.requested(param)
+      res.data.attinfos = this.fileType.fileList(res.data.attinfos)
+      this.currentFile = res.data
+      this.$nextTick(() => {
+        this.$refs.detail.isFileInfoPanlShow = true
+      })
+    },
+    clearData() {
+      this.params.content.where.condition = ''
+      this.getFileList()
+    },
+    uploadClick() {
+      this.$router.push({
+        path: '/upload_archives'
+      })
+    },
+    pageChange(n) {
+      this.params.content.pageNumber = n
+      this.getFileList()
+    }
+  },
+};
+</script>
+
+<style scoped>
+.normal-card {
+  min-height: calc(100vh - 138px);
+  box-sizing: border-box;
+  position: relative;
+}
+
+.normal-card .header-panl {
+  display: flex;
+  justify-content: space-between;
+  margin: 20px 0 30px 0;
+}
+
+.normal-card .header-panl .left {
+  display: flex;
+  align-items: center;
+}
+
+.normal-card .header-panl .left .select {
+  margin-right: 16px;
+  display: flex;
+  align-items: center;
+}
+
+.normal-card .header-panl .left .select span {
+  margin-right: 8px;
+}
+
+/deep/ .input-with-select {
+  height: 34px;
+}
+
+.el-pagination {
+  position: absolute;
+  right: 16px;
+  bottom: 0;
+  margin-top: 16px;
+}
+</style>

+ 1 - 1
src/SManagement/archivesmag/index.vue

@@ -43,7 +43,7 @@ export default {
           "pageSize": 108,
           "parentid": JSON.parse(sessionStorage.getItem("folderid")).salematerialfolderid,
           "where": {
-              "condition": "",
+            "condition": "",
           }
         }
       },