Просмотр исходного кода

Merge branch 'mergeBranch' of http://124.70.211.186:3000/zhangqi/yos_web into mergeBranch

codeMan 2 лет назад
Родитель
Сommit
4abde166dc

+ 8 - 8
src/SManagement/archives_ad/components/list.vue

@@ -20,7 +20,7 @@
             <span>{{item.newcount}}</span>
           </div>
         </div>
-        <div class="handle">
+        <div class="handle" v-if="type == 1">
           <slot name="edit" :data="item"></slot>
           <slot name="delete" :data="item"></slot>
         </div>
@@ -39,12 +39,12 @@ export default {
       currentItem:[]
     };
   },
-  props: ['fileData'],
+  props: ['fileData','type'],
   computed: {
-    
+
   },
   components: {
-    
+
   },
   watch: {
   },
@@ -55,18 +55,18 @@ export default {
     getCover(item) {
       let result = item.attinfos.find(item1 => item1.fileType == 'image')
       if(result) {
-        return item.attinfos.find(item => item == result).cover        
+        return item.attinfos.find(item => item == result).cover
       } else if(item.attinfos[0] && item.attinfos[0].subfiles[0]) {
         return item.attinfos[0].subfiles[0].url
       }else {
         return require('@/assets/video.png')
       }
-      
+
     },
     itemClick (data) {
       this.$emit('listItemClick', data)
     },
-    
+
   },
 };
 </script>
@@ -122,7 +122,7 @@ export default {
   justify-content: space-between;
 }
 .list-box .list .bottom .icon-box .item {
-  
+
 }
 .list-box .list .bottom .icon-box .item span {
   font-size: 10px;

+ 9 - 11
src/SManagement/archives_admag/index.vue

@@ -10,7 +10,7 @@
           <div style="display:flex;align-items:center">
             <div style="display:flex;align-items:center;padding-bottom:15px">
               <p style="font-size:14px;margin-right:10px;width:50px">范围:</p>
-              <el-select v-model="params.content.where.type" placeholder="请选择素材范围" size="small" @change="getFileList">
+              <el-select v-model="params.content.where.type" placeholder="请选择素材范围" size="small" @change="getFileList(true)">
                 <el-option
                   label="总部"
                   :value="0">
@@ -30,13 +30,13 @@
           </div>
 
           <!--素材列表-->
-          <list :fileData="fileData" @listItemClick="listItemClick"
+          <list :fileData="fileData" @listItemClick="listItemClick" :type="params.content.where.type"
             v-if="tool.checkAuth($route.name, 'read')">
             <template v-slot:edit="scope">
-              <Edit :fileData="scope.data" :disabled="tool.checkAuth($route.name, 'update') && scope.data.isAuth"></Edit>
+              <Edit :fileData="scope.data" :disabled="tool.checkAuth($route.name, 'update') && scope.data.isAuth" ></Edit>
             </template>
             <template v-slot:delete="scope">
-              <Delete :data="scope.data" @removeSuccess="getFileList"  :disabled="tool.checkAuth($route.name, 'delete') && scope.data.isAuth"></Delete>
+              <Delete :data="scope.data" @removeSuccess="getFileList(true)"  :disabled="tool.checkAuth($route.name, 'delete') && scope.data.isAuth" ></Delete>
             </template>
           </list>
           <pagination :total="total" :pageSize="params.content.pageSize" :currentPage="params.content.pageNumber"
@@ -132,7 +132,7 @@ export default {
   watch: {
     $route (val) {
       if (val.path == '/archives_admag') {
-        this.getFileList()
+        this.getFileList(true)
         this.$refs.add.dialogVisible = false
       }
     },
@@ -141,7 +141,7 @@ export default {
     }
   },
   created() {
-    this.getFileList()
+    this.getFileList(true)
   },
   methods: {
     inputChange () {
@@ -172,8 +172,6 @@ export default {
       if (deleteList.length != 0) return this.handleDelete(deleteList);
       this.total = res.total
       this.fileData = res.data
-      console.log(this.fileData);
-
       this.fileData.forEach((item) => {
         item.attinfos = matchingFileType.fileList(item.attinfos)
       })
@@ -188,14 +186,14 @@ export default {
         }
       }).then(res => {
         console.log("处理删除", res);
-        if (res.msg == '成功') this.getFileList()
+        if (res.msg == '成功') this.getFileList(true)
       })
     },
     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()
+      this.getFileList(true)
     },
     //列表单击事件
     async listItemClick(data) {
@@ -221,7 +219,7 @@ export default {
     },
     clearData() {
       this.params.content.where.condition = ''
-      this.getFileList()
+      this.getFileList(true)
     },
     pageChange(n) {
       this.params.content.pageNumber = n

+ 30 - 4
src/SManagement/archives_upload/index.vue

@@ -5,7 +5,7 @@
       <save type="save" @click.native="save()"></save>
     </Header>-->
     <el-row>
-      <el-col :span="24">
+      <el-col :span="14" v-if="$route.path === '/upload_archives'">
         <!--标题 分类-->
         <Set ref="set" @setSelectChange="selectChange" @setTitleChange="titleChange" />
         <!--文件列表-->
@@ -28,8 +28,31 @@
           ></Editor>
         </file-text>
       </el-col>
+      <el-col :span="24" v-else>
+        <!--标题 分类-->
+        <Set ref="set" @setSelectChange="selectChange" @setTitleChange="titleChange" />
+        <!--文件列表-->
+        <file-list ref="attFileList" v-if="uploadType == '1' || uploadType == '2'">
+          <upload slot="upload" @onSuccess="onSuccess" target="archives" :classType="uploadType"></upload>
+          <template v-slot:delete="scope">
+            <delete1 @deleteFile="deleteFile" :obj="scope.data"></delete1>
+          </template>
+          <template v-slot:download="scope">
+            <download :data="scope.data"></download>
+          </template>
+        </file-list>
+        <!--富文本-->
+        <file-text ref="text" v-if="uploadType == '3'">
+          <Editor
+              ref="editor"
+              slot="editor"
+              :content="cacheInfo.content.content"
+              :id="uploadCacheData.sat_sharematerialid"
+          ></Editor>
+        </file-text>
+      </el-col>
       <!-- 授权范围 -->
-<!--      <el-col :span="10">
+      <el-col :span="10" v-if="$route.path === '/upload_archives'">
         <scopeOfauth
           style="margin-left:10px;"
           :defaultData="defaultData"
@@ -38,7 +61,7 @@
           obiectName="sat_sharematerialid"
           @onChecked="onChecked"
         />
-      </el-col>-->
+      </el-col>
     </el-row>
     <div class="fixed__btn__panel">
       <el-button size="small" @click="$store.dispatch('DrawerShowChange',false)" class="normal-btn-width">取 消</el-button>
@@ -173,7 +196,10 @@ export default {
           this.$api.requested(this.cacheInfo).then(res => {
             this.tool.showMessage(res, () => {
               this.uploadCacheData.status = '完成'
-             /* this.insertCoursewareauth()*/
+              if (this.$route.path === '/upload_archives'){
+                this.insertCoursewareauth()
+              }
+
               this.$store.dispatch('DrawerShowChange',false)
               this.$router.back()
               this.$emit('onSuccess')

+ 5 - 5
src/components/normal-basic-layout/details/modules/followUp/addLog.vue

@@ -26,10 +26,10 @@
             </el-tag>
             <contactsList style="float: left" @onSelect="onSelect" :selects="form.dataextend.contactsid"></contactsList>
           </el-form-item>
-          <el-form-item label="跟进动态" prop="content" :rules="{ required: true, message: '请填写跟进动态', trigger: 'blur'}">
+          <el-form-item label="跟进动态" prop="content" :rules="{ required: true, message: '请填写跟进动态', trigger: 'blur'}" v-if="$route.path !== '/projectChangeDetail' && $route.path !== '/customerDetail' && $route.path !== '/PublicCustomerDetail'">
             <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.content" placeholder="请输入跟进动态" autocomplete="off"></el-input>
           </el-form-item>
-<!--          <el-form-item label="目的" prop="target" :rules="{ required: false, message: '请填写跟进目的', trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
+          <el-form-item label="目的" prop="target" :rules="{ required: false, message: '请填写跟进目的', trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
             <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.target" placeholder="请输入跟进目的" autocomplete="off"></el-input>
           </el-form-item>
           <el-form-item label="过程" prop="content" :rules="{ required: false, message: '请填写跟进过程', trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
@@ -40,7 +40,7 @@
           </el-form-item>
           <el-form-item label="下次跟进计划" prop="nextplan" :rules="{ required: false, message: '请填写下次跟进计划', trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
             <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.nextplan" placeholder="请输入下次跟进计划" autocomplete="off"></el-input>
-          </el-form-item>-->
+          </el-form-item>
           <el-form-item>
             <upload
               ref="upload"
@@ -134,9 +134,9 @@ export default {
             "ownerid":this.$route.query.id,
             "type":this.form.type,
             "content":this.form.content,
-            /*"target":this.form.target,//目的
+            "target":this.form.target,//目的
             "results":this.form.results,//结果
-            "nextplan":this.form.nextplan,//下次跟进计划*/
+            "nextplan":this.form.nextplan,//下次跟进计划
             "dataextend": {
               "contactsid": this.form.dataextend.contactsid // 跟进对象
             }

+ 5 - 5
src/components/normal-basic-layout/details/modules/followUp/editLog.vue

@@ -26,10 +26,10 @@
             </el-tag>
             <contactsList style="float: left" @onSelect="onSelect" ref="listData" :selects="form.dataextend.contactsid" :sys_enterpriseid="sys_enterpriseid"></contactsList>
           </el-form-item>
-          <el-form-item label="跟进动态" prop="content" :rules="{ required: true, message: '请填写跟进动态', trigger: 'blur'}" >
+          <el-form-item label="跟进动态" prop="content" :rules="{ required: true, message: '请填写跟进动态', trigger: 'blur'}" v-if="$route.path !== '/projectChangeDetail' && $route.path !== '/customerDetail' && $route.path !== '/PublicCustomerDetail'">
             <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.content" placeholder="请输入跟进动态" autocomplete="off"></el-input>
           </el-form-item>
-<!--          <el-form-item label="目的" prop="target" :rules="{ required: false, message: '请填写跟进目的', trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
+          <el-form-item label="目的" prop="target" :rules="{ required: false, message: '请填写跟进目的', trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
             <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.target" placeholder="请输入跟进目的" autocomplete="off"></el-input>
           </el-form-item>
           <el-form-item label="过程" prop="content" :rules="{ required: false, message: '请填写跟进过程', trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
@@ -40,7 +40,7 @@
           </el-form-item>
           <el-form-item label="下次跟进计划" prop="nextplan" :rules="{ required: false, message: '请填写下次跟进计划', trigger: 'blur'}" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
             <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.nextplan" placeholder="请输入下次跟进计划" autocomplete="off"></el-input>
-          </el-form-item>-->
+          </el-form-item>
           <div class="flex-align-center flex-between pionter" v-for="file in data.attinfos" :key="file.index">
             <div class="flex-align-center">
               <img width="30" :src="checkFileType(file.postfix) === 'file'?require('@/assets/file_icons/file.svg'):file.url" class="inline-16" alt="">
@@ -127,9 +127,9 @@ export default {
             "ownerid":this.$route.query.id,
             "type":this.form.type,
             "content":this.form.content,
-           /* "target":this.form.target,//目的
+            "target":this.form.target,//目的
             "results":this.form.results,//结果
-            "nextplan":this.form.nextplan,//下次跟进计划*/
+            "nextplan":this.form.nextplan,//下次跟进计划
             "dataextend": {
               "contactsid": this.form.dataextend.contactsid // 跟进对象
             }

+ 3 - 4
src/components/normal-basic-layout/details/modules/followUp/followUp.vue

@@ -72,7 +72,7 @@
 
                   </span>
                 </div>
-<!--                <div v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
+                <div v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
                   <span>目的:{{i.target}}</span>
                 </div>
                 <div v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
@@ -83,10 +83,9 @@
                 </div>
                 <div v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
                   <span>下次跟进计划:{{i.nextplan}}</span>
-                </div>-->
+                </div>
                 <div class="follow-progress">
-                  <p >{{i.content}}</p>
-<!--                  <p v-if="$route.path !== '/projectChangeDetail' && $route.path !== '/customerDetail' && $route.path !== '/PublicCustomerDetail'">{{i.content}}</p>-->
+                  <p v-if="$route.path !== '/projectChangeDetail' && $route.path !== '/customerDetail' && $route.path !== '/PublicCustomerDetail'">{{i.content}}</p>
                   <div>
                     <!-- <previewImage v-show="checkFileType(img.postfix) === 'img'" style="width:60px;height:60px;margin-left:5px" v-for="img in i.attinfos" :key="img.index" :image="img" :deletebtn="true" @onSuccess="queryLogs"></previewImage> -->
                     <div class="flex-align-center flex-between pionter" v-for="img in i.attinfos" :key="img.index" style="padding:10px;margin-bottom:5px">

+ 6 - 6
src/components/scopeOfAuthority/index.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="container normal-panel ">
     <div class="tab flex-align-center">
-      <p :class="activeName === '组织架构'?'tab-act':''" @click="tabChange('组织架构')">组织架构</p>
-      <p :class="activeName === '营销组织'?'tab-act':''" @click="tabChange('营销组织')">营销组织</p>
+      <p :class="activeName === '公司内部'?'tab-act':''" @click="tabChange('公司内部')">公司内部</p>
+      <p :class="activeName === '客户/经销商'?'tab-act':''" @click="tabChange('客户/经销商')">客户/经销商</p>
     </div>
     <div style="padding:16px 0;">
-      <dep ref="dep" :disabled="disabled" v-show="activeName === '组织架构'" :defaultData="defaultData" :scrollHeight="scrollHeight" :obiectName="obiectName" :obiectId="obiectId" @onParams="onParams"></dep>
-      <mar ref="mar" v-show="activeName === '营销组织'" :defaultData="defaultData" :scrollHeight="scrollHeight" :obiectName="obiectName" :obiectId="obiectId" @onAgentParams="onAgentParams"></mar>
+      <dep ref="dep" :disabled="disabled" v-show="activeName === '公司内部'" :defaultData="defaultData" :scrollHeight="scrollHeight" :obiectName="obiectName" :obiectId="obiectId" @onParams="onParams"></dep>
+      <mar ref="mar" v-show="activeName === '客户/经销商'" :defaultData="defaultData" :scrollHeight="scrollHeight" :obiectName="obiectName" :obiectId="obiectId" @onAgentParams="onAgentParams"></mar>
     </div>
   </div>
 </template>
@@ -23,7 +23,7 @@ export default {
   },
   data () {
     return {
-      activeName:'组织架构',
+      activeName:'公司内部',
       param:{
         "isonlymanager_dept":false,
         "isonlymanager_agent":false,
@@ -89,4 +89,4 @@ export default {
   color:#3874F6 !important;
   border-bottom: 2px solid #3874F6 !important;
 }
-</style>
+</style>

+ 92 - 0
src/components/scopeOfAuthority/indexCopy.vue

@@ -0,0 +1,92 @@
+<template>
+  <div class="container normal-panel ">
+    <div class="tab flex-align-center">
+      <p :class="activeName === '组织架构'?'tab-act':''" @click="tabChange('组织架构')">组织架构</p>
+      <p :class="activeName === '营销组织'?'tab-act':''" @click="tabChange('营销组织')">营销组织</p>
+    </div>
+    <div style="padding:16px 0;">
+      <dep ref="dep" :disabled="disabled" v-show="activeName === '组织架构'" :defaultData="defaultData" :scrollHeight="scrollHeight" :obiectName="obiectName" :obiectId="obiectId" @onParams="onParams"></dep>
+      <mar ref="mar" v-show="activeName === '营销组织'" :defaultData="defaultData" :scrollHeight="scrollHeight" :obiectName="obiectName" :obiectId="obiectId" @onAgentParams="onAgentParams"></mar>
+    </div>
+  </div>
+</template>
+
+<script>
+import dep from './modules/dep_auth.vue'
+import mar from './modules/mar_auth.vue'
+
+export default {
+  props:['defaultData','scrollHeight','appidname','dataid','obiectName','obiectId','disabled'],
+  components:{
+    dep,
+    mar
+  },
+  data () {
+    return {
+      activeName:'组织架构',
+      param:{
+        "isonlymanager_dept":false,
+        "isonlymanager_agent":false,
+        "departmentid":[],
+        "hrid":[],
+        "sa_saleareaid":[],
+        "sa_agentsid":[]
+      }
+    }
+  },
+  methods:{
+    onParams (dep,men,isonlymanager) {
+      console.log(dep,men,isonlymanager)
+      this.param.isonlymanager_dept = isonlymanager
+      this.param.hrid = men
+      this.param.departmentid = dep
+      this.param[this.appidname] = this.dataid
+      this.$emit('onChecked',this.param)
+    },
+    onAgentParams (area,agent,isonlymanager) {
+      console.log(area,agent,isonlymanager)
+      this.param.isonlymanager_agent = isonlymanager
+      this.param.sa_agentsid = agent
+      this.param.sa_saleareaid = area
+      this.$emit('onChecked',this.param)
+    },
+    tabChange (val) {
+      this.activeName = val
+      this.$emit('tabChange')
+    },
+  },
+  watch:{
+    defaultData (val) {
+      this.param = Object.assign({},this.param,val)
+      this.$emit('onChecked',this.param)
+    }
+  }
+}
+
+</script>
+<style>
+.panel .el-checkbox__input.is-checked+.el-checkbox__label{
+  color:#777 !important;
+}
+</style>
+<style scoped>
+.panel{
+  border:1px solid #CCCCCC;
+  border-radius: 4px;
+}
+.tab p{
+  flex:1;
+  height: 39px;
+  line-height: 39px;
+  text-align: center;
+  font-weight: 500;
+  font-size: 14px;
+  color:#999;
+  border-bottom: 2px solid #eeeeee;
+  cursor:pointer;
+}
+.tab-act{
+  color:#3874F6 !important;
+  border-bottom: 2px solid #3874F6 !important;
+}
+</style>

+ 67 - 0
src/components/table/index7.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
+    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="data.length <= 4?'260px':''"  @row-click="rowClick"
+              style="width:100%;min-height:260px;max-height: calc(100vh - 420px)" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange" >
+      <el-table-column
+          type="selection"
+          width="35" fixed v-if="checkbox">
+      </el-table-column>
+      <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title"  :width="col.width" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+        <template slot-scope="scope">
+          <div class="table-panel">
+            <!-- 自定义表格显示内容 -->
+            <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
+            <!-- 否则就是默认 -->
+            <span v-else>{{scope.row[col.columnname]}}</span>
+            <!-- 操作结构内容 -->
+            <slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import {mapGetters} from "vuex"
+export default {
+  /*
+    layout:表结构数据;
+    data:表渲染数据;
+    custom:是否启用自定义结构;
+    opwidth:操作列宽度
+  */
+  props:['layout','data','custom','height','fixedName','width','checkbox'],
+  data () {
+    return {
+      list:[],
+      allArr:[],
+      loading:false
+    }
+  },
+  /*computed:{
+    ...mapGetters({
+      loading:'loading'
+    })
+  },*/
+  methods:{
+    rowClick (row) {
+      this.$emit('rowClick',row)
+    },
+    tableClassName ({row,rowIndex}) {
+      row.index = rowIndex
+    },
+    selectionChange(row){
+      this.allArr = row
+      this.$emit('selectionChange',row)
+    }
+  },
+  mounted () {
+  }
+}
+
+</script>
+<style>
+</style>

+ 2 - 2
src/views/mediaStatistics/modules/salesfunnel.vue

@@ -83,7 +83,7 @@
     </div>
     <div>
       <p class="title">{{projectTile}}</p>
-      <tableTemp :layout="tablecols" :data="projectList" :opwidth="200" :custom="true"  :height="tableHieght">
+      <tableTemp :layout="tablecols" :data="projectList" :opwidth="200" :custom="true"  >
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname === 'status'">
             <span style="color:#52c41a" v-if="scope.column.data[[scope.column.columnname]] == '跟进中'">{{scope.column.data[[scope.column.columnname]]}}</span>
@@ -152,7 +152,7 @@
 </template>
 
 <script>
-import tableTemp from '@/components/table/index5'
+import tableTemp from '@/components/table/index7'
 import { Funnel,G2 } from '@antv/g2plot';
 const G = G2.getEngine('canvas');
 export default {