Jelajahi Sumber

提交文件

zhuxinbo 5 tahun lalu
induk
melakukan
c7f00c9af3

+ 1 - 0
debug.log

@@ -1,3 +1,4 @@
 [0525/133323.308:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
 [0529/110148.397:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
 [0529/112937.608:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
+[0619/110835.729:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0

TEMPAT SAMPAH
dist.zip


+ 1 - 1
src/defaultSettings.js

@@ -20,7 +20,7 @@ export default {
   contentWidth: 'Fixed', // layout of content: Fluid or Fixed, only works when layout is topmenu
   fixedHeader: true, // sticky header
   fixSiderbar: false, // sticky siderbar
-  autoHideHeader: false, //  auto hide header
+  autoHideHeader: true, //  auto hide header
   colorWeak: false,
   multipage: false, //默认多页签模式
   // vue-ls options

+ 5 - 5
src/store/modules/app.js

@@ -52,16 +52,16 @@ const app = {
       state.layout = layout
     },
     TOGGLE_FIXED_HEADER: (state, fixed) => {
-      Vue.ls.set(DEFAULT_FIXED_HEADER, fixed)
-      state.fixedHeader = fixed
+      Vue.ls.set(DEFAULT_FIXED_HEADER, true)
+      state.fixedHeader = true
     },
     TOGGLE_FIXED_SIDERBAR: (state, fixed) => {
-      Vue.ls.set(DEFAULT_FIXED_SIDEMENU, fixed)
+      Vue.ls.set(DEFAULT_FIXED_SIDEMENU, true)
       state.fixSiderbar = true
     },
     TOGGLE_FIXED_HEADER_HIDDEN: (state, show) => {
-      Vue.ls.set(DEFAULT_FIXED_HEADER_HIDDEN, show)
-      state.autoHideHeader = show
+      Vue.ls.set(DEFAULT_FIXED_HEADER_HIDDEN, false)
+      state.autoHideHeader = false
     },
     TOGGLE_CONTENT_WIDTH: (state, type) => {
       Vue.ls.set(DEFAULT_CONTENT_WIDTH_TYPE, type)

+ 0 - 7
src/views/dashboard/Analysis.vue

@@ -281,13 +281,6 @@
                   <li><span class="circular"></span>添加了视频上传时间字段</li>
                 </ul>
               </div>
-               <div class="updateBox">
-                <h3 class="textTitle">4.修复系统bug</h3>
-                
-              </div>
-              <div class="updateBox">
-                <h3 class="textTitle">5.更新公告上线</h3>
-              </div>             
             </div>
         </div>
          

+ 1 - 1
src/views/modules/Statistics/Statistics.vue

@@ -1219,7 +1219,7 @@ export default {
           var dataNew = []
           var dataX = []
           if (res.success) {
-            that.kuaishou = res.result
+            that.kuaishou = res.result.aclick?res.result:{aclick: 0,cost: 0, photoClick: 0,photoShow: 0,}
             //   this.drawPieAll(res)
           } else {
             that.kuaishou.aclick = 0

+ 1 - 1
src/views/modules/Statistics/dataDisplayStatistics.vue

@@ -779,7 +779,7 @@ export default {
         getReportList(params).then(res => {
           if (res.success) {
             if (res.result) {
-              that.kuaishou = res.result.summary
+              that.kuaishou = res.result.summary.aclick?res.result.summary:{aclick:0,cost:0,photoClick:0,photoShow:0,discountCost:0}
               that.dataDetail = res.result.trend
               that.drawPie(that.noTitleKey, res.result.trend)
             } else {

+ 3 - 1
src/views/modules/advertiser/ProjectMemberList.vue

@@ -95,7 +95,9 @@
             <a-radio-group buttonStyle="outline" v-model="loginType">
               <a-radio-button value="kuaishou">快手</a-radio-button>
               <a-radio-button value="bytedance">头条</a-radio-button>
+             
             </a-radio-group>
+             <br><span style="color:red;" v-if="loginType == 'bytedance'">*重要:如存在一户多开情况,请勾选所以子账号进行授权!!!</span>
           </a-form-item>
           <a-form-item label="是否本代理商开户:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }" v-if="loginType == 'kuaishou'">
@@ -581,7 +583,7 @@
           this.getMemberList(item.id)
         } else {
           this.mode = 'authorization'
-          this.loginType = item.mediaId == '1' ? 'bytedance' : 'kuaishou'
+          this.loginType = item.mediaId == '1'||item.mediaId == '3' ? 'bytedance' : 'kuaishou'
           this.record = item
           this.visibleBind = true
         }

+ 172 - 0
src/views/modules/material/modules/WpsFileModal.vue

@@ -0,0 +1,172 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="name">
+          <a-input placeholder="请输入name" v-decorator="['name', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="version">
+          <a-input-number v-decorator="[ 'version', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="size">
+          <a-input-number v-decorator="[ 'size', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="creator">
+          <a-input placeholder="请输入creator" v-decorator="['creator', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="modifier">
+          <a-input placeholder="请输入modifier" v-decorator="['modifier', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="modifyTime">
+          <a-input placeholder="请输入modifyTime" v-decorator="['modifyTime', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="downloadUrl">
+          <a-input placeholder="请输入downloadUrl" v-decorator="['downloadUrl', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="deleted">
+          <a-input placeholder="请输入deleted" v-decorator="['deleted', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="canDelete">
+          <a-input placeholder="请输入canDelete" v-decorator="['canDelete', {}]" />
+        </a-form-item>
+		
+      </a-form>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+
+  export default {
+    name: "WpsFileModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+        },
+        url: {
+          add: "/ctop/wpsFile/add",
+          edit: "/ctop/wpsFile/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'name','version','size','creator','modifier','modifyTime','downloadUrl','deleted','canDelete'))
+		  //时间格式化
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            //时间格式化
+            
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
+
+
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 401 - 0
src/views/modules/material/scriptFile.vue

@@ -0,0 +1,401 @@
+<style>
+  #wps-iframe {
+    height: 100%
+  }
+</style>
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <selectTable :projectId.sync="queryParam.projectId"></selectTable>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="脚本名称">
+              <a-input placeholder="请输入脚本名称" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="创建人">
+              <!-- <a-input placeholder="请输入创建人" v-model="queryParam.creator_dictText"></a-input> -->
+              <a-select v-model="queryParam.creator" showSearch allowClear placeholder="请选择创建人"
+                optionFilterProp="children" style="width: 100%" :filterOption="true">
+                <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
+                  :value="appModel.userId">
+                  {{ appModel.realName }}
+                  &#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+    <div style="float:right;margin:0 0 20px 20px">
+      <a-upload name="file" :multiple="false" :action="uploadAction" :headers="tokenHeader" :showUploadList="false"
+        :beforeUpload="beforeUpload" @change="handleChange" style="margin-right:20px">
+        <a-button :disabled="loadingElse">
+          <a-icon type="upload" />
+          {{loadingElse?'上传中,请稍后':'文件上传'}}
+        </a-button>
+      </a-upload>
+      <a-dropdown placement="bottomRight">
+        <a-button>新增</a-button>
+        <a-menu slot="overlay">
+          <a-menu-item>
+            <a-icon type="file-word" /><span style="text-align: center" @click="creatWps('word')">文字文档</span>
+          </a-menu-item>
+          <a-menu-item>
+            <a-icon type="file-excel" /><span style="text-align: center" @click="creatWps('excel')">表格文档</span>
+          </a-menu-item>
+          <a-menu-item>
+            <a-icon type="file-ppt" /><span style="text-align: center" @click="creatWps('ppt')">演示文档</span>
+          </a-menu-item>
+
+          <!-- <a-menu-item>
+            <a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">1st menu item</a>
+          </a-menu-item>
+          <a-menu-item>
+            <a target="_blank" rel="noopener noreferrer" href="http://www.taobao.com/">2nd menu item</a>
+          </a-menu-item>
+          <a-menu-item>
+            <a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">3rd menu item</a>
+          </a-menu-item> -->
+        </a-menu>
+      </a-dropdown>
+    </div>
+    <div style="clear:both"></div>
+    <div>
+      <a-table ref="table" size="middle" bordered rowKey="name" :columns="columns" :dataSource="dataSource"
+        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+        <span slot="modifyTime" slot-scope="text">{{text|getDate}}</span>
+        <span slot="size" slot-scope="text">{{text|sizeShow}}</span>
+        <span slot="projectId_dictText" slot-scope="text">{{text?text:'-'}}</span>
+        <span slot="action" slot-scope="text, record">
+          <a @click="getViewUrlDbPath(record)">编辑</a>
+          <a-divider type="vertical" />
+          <a @click="bindProject(record)">项目绑定</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- <div id="show"></div> -->
+    <a-modal :maskClosable="false" :title="type=='add'?'脚本新建':'脚本编辑'" v-model="visibleBind" :width="1200"
+      :footer="null">
+
+      <iframe :src="src" frameborder="0" style="width:100%;height:600px" v-if="type=='add'"></iframe>
+      <div id="showWps" style="height:600px" v-show="type=='edit'"></div>
+
+
+    </a-modal>
+    <a-modal :maskClosable="false" title="绑定项目" v-model="visibleProject" @ok="handleOk">
+      <span>项目选择:</span>
+      <a-select v-model="projectId" showSearch style="width:300px" optionFilterProp="children"
+        :filterOption="filterOption">
+        <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
+          {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+        </a-select-option>
+      </a-select>
+    </a-modal>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <wpsFile-modal ref="modalForm" @ok="modalFormOk"></wpsFile-modal>
+
+  </a-card>
+</template>
+
+<script>
+  import {
+    getAction,
+    postAction,
+    postFile,
+    deleteAction,
+    putAction
+  } from '@/api/manage'
+  import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
+  import WpsFileModal from './modules/WpsFileModal'
+  import {
+    mapGetters
+  } from 'vuex'
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import qs from 'qs';
+  const fileSuffix = [
+    'xls', 'xlt', 'et', 'xlsx', 'xltx', 'csv', 'xlsm', 'xltm',
+    'doc', 'dot', 'wps', 'wpt', 'docx', 'dotx', 'docm', 'dotm',
+    'ppt', 'pptx', 'pptm', 'ppsx', 'ppsm', 'pps', 'potx', 'potm', 'dpt', 'dps',
+    'pdf'
+  ];
+  export default {
+    name: "WpsFileList",
+    mixins: [JeecgListMixin],
+    components: {
+      WpsFileModal,
+      selectTable
+    },
+    data() {
+      return {
+        description: 'wps文件管理页面',
+        dataElse: [],
+        projectId: '',
+        visibleProject: false,
+        // 表头
+        visibleBind: false,
+        wpsType: 'word',
+        type: "add",
+        uploadAction: "http://api.tjyourong.com.cn/ctop/wpsFile/uploadFile",
+        columns: [{
+            title: '脚本名称',
+            align: "center",
+            dataIndex: 'name'
+          },
+          {
+            title: '文件大小(KB)',
+            align: "center",
+            dataIndex: 'size',
+            scopedSlots: {
+              customRender: 'size'
+            },
+          },
+          {
+            title: '绑定项目',
+            align: "center",
+            dataIndex: 'projectId_dictText',
+            scopedSlots: {
+              customRender: 'projectId_dictText'
+            },
+          },
+          {
+            title: '创建人',
+            align: "center",
+            dataIndex: 'creator_dictText'
+          },
+          {
+            title: '发布时间',
+            align: "center",
+            dataIndex: 'modifyTime',
+            scopedSlots: {
+              customRender: 'modifyTime'
+            },
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: "center",
+            scopedSlots: {
+              customRender: 'action'
+            },
+          }
+        ],
+        url: {
+          list: "/ctop/wpsFile/list",
+          delete: "/ctop/wpsFile/delete",
+          deleteBatch: "/ctop/wpsFile/deleteBatch",
+          exportXlsUrl: "ctop/wpsFile/exportXls",
+          importExcelUrl: "ctop/wpsFile/importExcel",
+        },
+        src: "",
+        loadingElse: false,
+        fileId: '',
+        loadingOk: false,
+        options: []
+      }
+    },
+    computed: {
+      importExcelUrl: function () {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    watch: {
+      visibleBind(n, o) {
+        if (!n) {
+          this.src = ''
+          this.loadData(1)
+        }
+      }
+    },
+    filters: {
+      getDate(value) {
+        let date = new Date(value)
+        let y = date.getFullYear()
+        let MM = date.getMonth() + 1
+        MM = MM < 10 ? '0' + MM : MM
+        let d = date.getDate()
+        d = d < 10 ? '0' + d : d
+        return y + '-' + MM + '-' + d
+      },
+      sizeShow(value) {
+        return (value / 1024).toFixed(2)
+      }
+    },
+    mounted() {
+      this.getParticipateList()
+      getAction('/sys/user/getAllUserList', '').then(res => {
+        if (res.success) {
+          this.options = res.result
+        }
+      })
+    },
+    methods: {
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      getParticipateList() {
+        getAction('/ctop/projectMember/participateList', {
+          userId: this.userInfo().id
+        }).then(res => {
+          if (res.code == 0) {
+            this.dataElse = res.result
+          }
+        })
+      },
+      beforeUpload(file) {
+        this.loadingElse = true
+        const size = (Number(file.size) / (1024 * 1024)).toFixed(2);
+        const fileName = file.name;
+        const fileStrArr = fileName.split(".");
+        const suffix = fileStrArr[fileStrArr.length - 1];
+
+        let result = fileSuffix.some((item) => {
+          return item === suffix
+        });
+
+        if (!result) {
+          this.$message.error("不支持该文件类型");
+          this.loadingElse = false
+          return false;
+        }
+
+        if (size > 10) {
+          this.$message.error("文件不能大于10MB");
+          this.loadingElse = false
+          return false;
+        }
+      },
+      handleChange(info) {
+
+        if (info.file.status !== 'uploading') {
+          console.log(info.file, info.fileList);
+        }
+        if (info.file.status === 'done') {
+          this.$message.success(`${info.file.name} 上传成功`);
+          this.loadingElse = false
+          this.loadData(1)
+        } else if (info.file.status === 'error') {
+          this.$message.error(`${info.file.name} file upload failed.`);
+          this.loadingElse = false
+        }
+      },
+      handleOk(e) {
+        this.loadingOk = true
+        var params = qs.stringify({
+          projectId: this.projectId,
+          fileId: this.fileId
+        })
+        postAction('/ctop/wpsFile/bindProject', params).then(res => {
+          if (res.success) {
+            this.visibleProject = false
+            this.projectId = ""
+            this.loadingOk = false
+            this.loadData()
+          } else {
+            this.$message.error('绑定失败')
+            this.loadingOk = false
+          }
+        })
+      },
+      creatWps(type) {
+        console.log(type)
+        this.visibleBind = true
+        this.wpsType = type
+        this.type = 'add'
+        getAction('/ctop/wpsFile/createTemplateFile', {
+          template: type
+        }).then(res => {
+          console.log(res)
+          if (res.code == 200) {
+            this.src = res.msg;
+            console.log(this.src)
+          } else {
+            this.$message.error('请求错误!')
+          }
+        })
+        // getCreateFilePath({
+        //   template: type
+        // }).then(res => {
+        //   console.log(res)
+        //   // if (res.data.data){
+        //   this.src = res.data.msg;
+        //   // }else {
+        //   // this.showErrMeg('请求错误!');
+        //   // }
+        // }).catch(() => {
+        //   this.showErrMeg('请求错误!');
+        // });
+
+      },
+
+      bindProject(item) {
+        this.visibleProject = true
+        this.projectId = ''
+        this.fileId = item.id
+        // this.getParticipateList()
+      },
+      getViewUrlDbPath(item) {
+        // this.loading = true;
+        const params = {
+          fileId: item.id,
+          userId: item.creator
+        };
+        getAction('/v1/api/file/getViewUrlDbPath', params).then((res) => {
+          console.log(res)
+          if (res.data) {
+            let r = res.data;
+            this.visibleBind = true
+            // this.src = r.wpsUrl;
+            this.type = 'edit'
+            this.openWps(r.wpsUrl, r.token)
+
+          } else {
+            this.$message.error('请求错误')
+          }
+        })
+      },
+      openWps(url, token) {
+
+        this.$nextTick(() => {
+          let _this = this;
+          const wps = _this.wps.config({
+            mode: 'simple',
+            mount: document.querySelector('#showWps'),
+            wpsUrl: url,
+          });
+          wps.setToken({
+            "token": token
+          });
+          let app = wps.Application;
+        })
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 298 - 169
src/views/modules/material/scriptMaterialNew.vue

@@ -1,268 +1,397 @@
+<style>
+  #wps-iframe {
+    height: 100%
+  }
+</style>
 <template>
   <a-card :bordered="false">
     <!-- 查询区域 -->
-    <!-- <div class="table-page-search-wrapper">
+    <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="24">
           <a-col :md="6" :sm="8">
-            <a-form-item label="广告主开户主体名称">
-              <a-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input>
+            <selectTable :projectId.sync="queryParam.projectId"></selectTable>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="脚本名称">
+              <a-input placeholder="请输入脚本名称" v-model="queryParam.name"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="6">
-            <a-form-item label="行业">
-              <j-tree-select
-                v-model="queryParam.industryId"
-                ref="treeSelect"
-                placeholder="请选择行业"
-                dict="sys_category,name,id"
-                pidField="pid"
-                pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
-              >
-              </j-tree-select>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="创建人">
+              <!-- <a-input placeholder="请输入创建人" v-model="queryParam.creator_dictText"></a-input> -->
+              <a-select v-model="queryParam.creator" showSearch allowClear placeholder="请选择创建人"
+                optionFilterProp="children" style="width: 100%" :filterOption="true">
+                <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
+                  :value="appModel.userId">
+                  {{ appModel.realName }}
+                  &#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
           </a-col>
+
         </a-row>
       </a-form>
-    </div> -->
-
-    <!-- 操作按钮区域 -->
-    <div class="table-operator" style="float:right">
-      <!-- <a-button @click="handleAddElse" type="primary" icon="plus">新增</a-button> -->
-      <a-dropdown :trigger="['click']">
-        <a class="ant-dropdown-link" @click="e => e.preventDefault()">
-          Click me
-          <a-icon type="down" />
-        </a>
+    </div>
+    <div style="float:right;margin:0 0 20px 20px">
+      <a-upload name="file" :multiple="false" :action="uploadAction" :headers="tokenHeader" :showUploadList="false"
+        :beforeUpload="beforeUpload" @change="handleChange" style="margin-right:20px">
+        <a-button :disabled="loadingElse">
+          <a-icon type="upload" />
+          {{loadingElse?'上传中,请稍后':'文件上传'}}
+        </a-button>
+      </a-upload>
+      <a-dropdown placement="bottomRight">
+        <a-button>新增</a-button>
         <a-menu slot="overlay">
-          <a-menu-item key="0">
-            <a href="http://www.alipay.com/">1st menu item</a>
+          <a-menu-item>
+            <a-icon type="file-word" /><span style="text-align: center" @click="creatWps('word')">文字文档</span>
           </a-menu-item>
-          <a-menu-item key="1">
-            <a href="http://www.taobao.com/">2nd menu item</a>
+          <a-menu-item>
+            <a-icon type="file-excel" /><span style="text-align: center" @click="creatWps('excel')">表格文档</span>
           </a-menu-item>
-          <a-menu-divider />
-          <a-menu-item key="3">
-            3rd menu item
+          <a-menu-item>
+            <a-icon type="file-ppt" /><span style="text-align: center" @click="creatWps('ppt')">演示文档</span>
           </a-menu-item>
+
+          <!-- <a-menu-item>
+            <a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">1st menu item</a>
+          </a-menu-item>
+          <a-menu-item>
+            <a target="_blank" rel="noopener noreferrer" href="http://www.taobao.com/">2nd menu item</a>
+          </a-menu-item>
+          <a-menu-item>
+            <a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">3rd menu item</a>
+          </a-menu-item> -->
         </a-menu>
       </a-dropdown>
     </div>
-
-    <!-- table区域-begin -->
+    <div style="clear:both"></div>
     <div>
-      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
+      <a-table ref="table" size="middle" bordered rowKey="name" :columns="columns" :dataSource="dataSource"
         :pagination="ipagination" :loading="loading" @change="handleTableChange">
+        <span slot="modifyTime" slot-scope="text">{{text|getDate}}</span>
+        <span slot="size" slot-scope="text">{{text|sizeShow}}</span>
+        <span slot="projectId_dictText" slot-scope="text">{{text?text:'-'}}</span>
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-
+          <a @click="getViewUrlDbPath(record)">编辑</a>
+          <a-divider type="vertical" />
+          <a @click="bindProject(record)">项目绑定</a>
           <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
             <a>删除</a>
           </a-popconfirm>
         </span>
-      </a-table>
-      <a-modal title="新建文件" v-model="visible" @ok="handleSubmit" :width="800"
-        :okButtonProps="{ props: { disabled: false } }" :cancelButtonProps="{ props: { disabled: false } }">
 
-      </a-modal>
+      </a-table>
     </div>
+    <!-- <div id="show"></div> -->
+    <a-modal :maskClosable="false" :title="type=='add'?'脚本新建':'脚本编辑'" v-model="visibleBind" :width="1200"
+      :footer="null">
+
+      <iframe :src="src" frameborder="0" style="width:100%;height:600px" v-if="type=='add'"></iframe>
+      <div id="showWps" style="height:600px" v-show="type=='edit'"></div>
+
+
+    </a-modal>
+    <a-modal :maskClosable="false" title="绑定项目" v-model="visibleProject" @ok="handleOk">
+      <span>项目选择:</span>
+      <a-select v-model="projectId" showSearch style="width:300px" optionFilterProp="children"
+        :filterOption="filterOption">
+        <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
+          {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+        </a-select-option>
+      </a-select>
+    </a-modal>
     <!-- table区域-end -->
 
     <!-- 表单区域 -->
-    <j-select-user ref="userForm" @ok="modalFormOk"></j-select-user>
+    <wpsFile-modal ref="modalForm" @ok="modalFormOk"></wpsFile-modal>
+
   </a-card>
 </template>
 
 <script>
   import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
-  import JTreeSelect from '@/components/jeecg/JTreeSelect'
-  import AFormItem from 'ant-design-vue/es/form/FormItem'
-  import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
-  import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
-  import JSelectUser from '@/components/jeecgbiz/JSelectUser'
-  // import { postAction } from '../../../api/manage'
-  import {
     getAction,
     postAction,
     postFile,
-    deleteAction
+    deleteAction,
+    putAction
   } from '@/api/manage'
+  import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
+  import WpsFileModal from './modules/WpsFileModal'
   import {
-    mapActions,
     mapGetters
   } from 'vuex'
-
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import qs from 'qs';
+  const fileSuffix = [
+    'xls', 'xlt', 'et', 'xlsx', 'xltx', 'csv', 'xlsm', 'xltm',
+    'doc', 'dot', 'wps', 'wpt', 'docx', 'dotx', 'docm', 'dotm',
+    'ppt', 'pptx', 'pptm', 'ppsx', 'ppsm', 'pps', 'potx', 'potm', 'dpt', 'dps',
+    'pdf'
+  ];
   export default {
-    name: 'AdvertiserList',
+    name: "WpsFileList",
     mixins: [JeecgListMixin],
     components: {
-      AFormItem,
-      JTreeSelect,
-      JSelectUserByDep,
-      JSelectDepart,
-      JSelectUser
+      WpsFileModal,
+      selectTable
     },
     data() {
       return {
-        departDisabled: false, //是否是我的部门调用该页面
-        users: this.userInfo().realname, //用户名称
-        departmentId: this.userInfo().departId, //部门id
-        description: '广告主信息表管理页面',
-        visible: false,
-        accountName: '',
-        password: '',
-        mode: 'login',
-        showLogin: true,
-        showAuthorization: false,
-        authorizationType: 'kuaishou',
-        loginType: 'kuaishou',
-        form: this.$form.createForm(this),
+        description: 'wps文件管理页面',
+        dataElse: [],
+        projectId: '',
+        visibleProject: false,
         // 表头
+        visibleBind: false,
+        wpsType: 'word',
+        type: "add",
+        uploadAction: "https://trac.tjyourong.com.cn/ctop/wpsFile/uploadFile",
         columns: [{
             title: '脚本名称',
-            align: 'center',
+            align: "center",
             dataIndex: 'name'
           },
           {
-            title: '分类',
-            align: 'center',
-            dataIndex: 'industryId_dictText'
+            title: '文件大小(KB)',
+            align: "center",
+            dataIndex: 'size',
+            scopedSlots: {
+              customRender: 'size'
+            },
           },
           {
-            title: '项目名称',
-            align: 'center',
-            dataIndex: 'contact'
+            title: '绑定项目',
+            align: "center",
+            dataIndex: 'projectId_dictText',
+            scopedSlots: {
+              customRender: 'projectId_dictText'
+            },
           },
           {
-            title: '上传人',
-            align: 'center',
-            dataIndex: 'mobile'
+            title: '创建人',
+            align: "center",
+            dataIndex: 'creator_dictText'
           },
           {
             title: '发布时间',
-            align: 'center',
-            dataIndex: 'email'
+            align: "center",
+            dataIndex: 'modifyTime',
+            scopedSlots: {
+              customRender: 'modifyTime'
+            },
           },
-
           {
             title: '操作',
             dataIndex: 'action',
-            align: 'center',
+            align: "center",
             scopedSlots: {
               customRender: 'action'
-            }
+            },
           }
         ],
         url: {
-          list: '/ctop/wpsFile/list',
-          delete: '/ctop/advertiser/delete',
-          deleteBatch: '/ctop/advertiser/deleteBatch',
-          exportXlsUrl: 'ctop/advertiser/exportXls',
-          importExcelUrl: 'ctop/advertiser/importExcel',
-          bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
-          bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
-          getLoginInfo: '/ctop/bindAccount/getLoginInfo',
-          userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url
-          userWithDepart: '/sys/user/userDepartList' // 引入为指定用户查看部门信息需要的url
-        }
+          list: "/ctop/wpsFile/list",
+          delete: "/ctop/wpsFile/delete",
+          deleteBatch: "/ctop/wpsFile/deleteBatch",
+          exportXlsUrl: "ctop/wpsFile/exportXls",
+          importExcelUrl: "ctop/wpsFile/importExcel",
+        },
+        src: "",
+        loadingElse: false,
+        fileId: '',
+        loadingOk: false,
+        options: []
       }
     },
     computed: {
       importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    watch: {
+      visibleBind(n, o) {
+        if (!n) {
+          this.src = ''
+          this.loadData(1)
+        }
       }
     },
-    created() {
-      this.queryParam.userId = this.userInfo().id
+    filters: {
+      getDate(value) {
+        let date = new Date(value)
+        let y = date.getFullYear()
+        let MM = date.getMonth() + 1
+        MM = MM < 10 ? '0' + MM : MM
+        let d = date.getDate()
+        d = d < 10 ? '0' + d : d
+        return y + '-' + MM + '-' + d
+      },
+      sizeShow(value) {
+        return (value / 1024).toFixed(2)
+      }
+    },
+    mounted() {
+      this.getParticipateList()
+      getAction('/sys/user/getAllUserList', '').then(res => {
+        if (res.success) {
+          this.options = res.result
+        }
+      })
     },
     methods: {
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
       ...mapGetters(['nickname', 'avatar', 'userInfo']),
-      handleAddElse() {
-
+      getParticipateList() {
+        getAction('/ctop/projectMember/participateList', {
+          userId: this.userInfo().id
+        }).then(res => {
+          if (res.code == 0) {
+            this.dataElse = res.result
+          }
+        })
       },
-      searchRe() {
-        this.queryParam.name = ''
-        this.queryParam.industryId = ''
-        this.loadData()
+      beforeUpload(file) {
+        this.loadingElse = true
+        const size = (Number(file.size) / (1024 * 1024)).toFixed(2);
+        const fileName = file.name;
+        const fileStrArr = fileName.split(".");
+        const suffix = fileStrArr[fileStrArr.length - 1];
+
+        let result = fileSuffix.some((item) => {
+          return item === suffix
+        });
+
+        if (!result) {
+          this.$message.error("不支持该文件类型");
+          this.loadingElse = false
+          return false;
+        }
+
+        if (size > 10) {
+          this.$message.error("文件不能大于10MB");
+          this.loadingElse = false
+          return false;
+        }
       },
-      handleSubmit() {
-        let params = {}
-        params.advertiserId = this.record.id
-        params.advertiser_name = this.record.name
-        params.userId = this.userInfo().id
-        params.userName = this.userInfo().realname
-        params.projectId = this.record.projectId
-        params.projectName = this.record.projectName
+      handleChange(info) {
 
-        // 触发表单验证
-        this.form.validateFields(err => {
-          if (!err) {
-            if (this.mode == 'login') {
-              params.accountName = this.accountName
-              params.password = this.password
-              params.loginType = this.loginType
-              if (this.loginType == 'kuaishou') {
-                params.mediaId = 2
-              } else if (this.loginType == 'bytedance') {
-                params.mediaId = 1
-              }
-              postAction(this.url.bindAccountLoginUrl, params).then(res => {
-                if (res.success) {
-                  alert('绑定成功')
-                  this.accountName = ''
-                  this.password = ''
-                  this.loginType = ''
-                } else {
-                  alert(res.message)
-                }
-              })
-            }
-            // 授权登录
-            if (this.mode == 'authorization') {
-              params.authorizationType = this.authorizationType
-              if (this.authorizationType == 'kuaishou') {
-                params.mediaId = 2
-              } else if (this.authorizationType == 'bytedance') {
-                params.mediaId = 1
-              }
-              postAction(this.url.bindAuthorizationUrl, params).then(res => {
-                if (res.success) {
-                  window.open(res.message, '_blank')
-                } else {
-                  alert('绑定失败')
-                }
-              })
-            }
+        if (info.file.status !== 'uploading') {
+          console.log(info.file, info.fileList);
+        }
+        if (info.file.status === 'done') {
+          this.$message.success(`${info.file.name} 上传成功`);
+          this.loadingElse = false
+          this.loadData(1)
+        } else if (info.file.status === 'error') {
+          this.$message.error(`${info.file.name} file upload failed.`);
+          this.loadingElse = false
+        }
+      },
+      handleOk(e) {
+        this.loadingOk = true
+        var params = qs.stringify({
+          projectId: this.projectId,
+          fileId: this.fileId
+        })
+        postAction('/ctop/wpsFile/bindProject', params).then(res => {
+          if (res.success) {
+            this.visibleProject = false
+            this.projectId = ""
+            this.loadingOk = false
+            this.loadData()
+          } else {
+            this.$message.error('绑定失败')
+            this.loadingOk = false
           }
         })
       },
+      creatWps(type) {
+        console.log(type)
+        this.visibleBind = true
+        this.wpsType = type
+        this.type = 'add'
+        getAction('/ctop/wpsFile/createTemplateFile', {
+          template: type
+        }).then(res => {
+          console.log(res)
+          if (res.code == 200) {
+            this.src = res.msg;
+            console.log(this.src)
+          } else {
+            this.$message.error('请求错误!')
+          }
+        })
+        // getCreateFilePath({
+        //   template: type
+        // }).then(res => {
+        //   console.log(res)
+        //   // if (res.data.data){
+        //   this.src = res.data.msg;
+        //   // }else {
+        //   // this.showErrMeg('请求错误!');
+        //   // }
+        // }).catch(() => {
+        //   this.showErrMeg('请求错误!');
+        // });
 
-      onChageLogin() {
-        console.log(this.mode)
-        if (this.mode == 'login') {
-          this.showLogin = true
-          this.showAuthorization = false
-        } else {
-          this.showLogin = false
-          this.showAuthorization = true
-        }
       },
-      showModal(record) {
-        this.record = record
-        this.visible = true
+
+      bindProject(item) {
+        this.visibleProject = true
+        this.projectId = ''
+        this.fileId = item.id
+        // this.getParticipateList()
       },
+      getViewUrlDbPath(item) {
+        // this.loading = true;
+        const params = {
+          fileId: item.id,
+          userId: item.creator
+        };
+        getAction('/v1/api/file/getViewUrlDbPath', params).then((res) => {
+          console.log(res)
+          if (res.data) {
+            let r = res.data;
+            this.visibleBind = true
+            // this.src = r.wpsUrl;
+            this.type = 'edit'
+            this.openWps(r.wpsUrl, r.token)
 
-      handleCancel() {
-        this.close()
+          } else {
+            this.$message.error('请求错误')
+          }
+        })
+      },
+      openWps(url, token) {
+
+        this.$nextTick(() => {
+          let _this = this;
+          const wps = _this.wps.config({
+            mode: 'simple',
+            mount: document.querySelector('#showWps'),
+            wpsUrl: url,
+          });
+          wps.setToken({
+            "token": token
+          });
+          let app = wps.Application;
+        })
       }
     }
   }

+ 1 - 2
src/views/modules/material/videoMaterial.vue

@@ -593,7 +593,6 @@ a {
                   </a-popconfirm>
                   <a
                     v-show="active!='3'"
-                    v-if="role.roleCode == 'plane' || role.roleCode == 'admin'"
                     style="margin-right:20px"
                     @click="addImage(items)"
                     >添加封面</a
@@ -1597,7 +1596,7 @@ export default {
       item.showVideo = true
     },
     tongbu() {
-      this.$refs.check.getData('/ctop/userAllocation/getAccountsByProjectId', {
+      this.$refs.check.getData('/ctop/userAllocation/getAccountListByProjectId', {
         userId: this.userInfo().id,
         projectId: this.queryParam.projectId
       })

+ 1 - 1
src/views/report/KuaishouChannelRegInfoList.vue

@@ -28,7 +28,7 @@
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
       </a-upload>
-      &nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="http://39.97.120.42:8080/jeecg-boot/ureport/preview?_u=mysql:%E8%B6%A3%E7%BA%A6%E4%BC%9A%E6%97%A5%E6%8A%A5-%E5%BF%AB%E6%89%8B.ureport.xml">趣头条日报预览</a>
+      &nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="http://api.tjyourong.com.cn/jeecg-boot/ureport/preview?_u=mysql:%E8%B6%A3%E7%BA%A6%E4%BC%9A%E6%97%A5%E6%8A%A5-%E5%BF%AB%E6%89%8B.ureport.xml">趣头条日报预览</a>
     </div>
 
     <!-- table区域-begin -->

+ 1 - 1
src/views/report/autodebit.vue

@@ -128,7 +128,7 @@
               console.log(res)
               if(res.success){
                 this.filepath = res.path;
-                this.downloadUrl = "http://39.97.120.42:8080/jeecg-boot/"+this.url.downloadUrl+"?path="+this.filepath;
+                this.downloadUrl = "http://api.tjyourong.com.cn/jeecg-boot/"+this.url.downloadUrl+"?path="+this.filepath;
                 this.showDownLoad = true;
               }else{
                 alert(res.message);

+ 1 - 1
src/views/ureport/UReportFileBindUserList.vue

@@ -97,7 +97,7 @@ export default {
       if (process.env.NODE_ENV === 'development') {
         url = 'http://39.106.184.70:8080/jeecg-boot/ureport/preview?_u=mysql:' + item.fileName
       } else if (process.env.NODE_ENV === 'production') {
-        url = 'http://39.97.120.42:8080/jeecg-boot/ureport/preview?_u=mysql:' + item.fileName
+        url = 'http://api.tjyourong.com.cn/jeecg-boot/ureport/preview?_u=mysql:' + item.fileName
       }
       window.open(url, '_blank')
     }

+ 4 - 4
src/views/ureport/UReportFileList.vue

@@ -189,18 +189,18 @@ export default {
     editData(item) {
       var url = ''
       if (process.env.NODE_ENV === 'development') {
-        url = 'http://39.97.120.42:8080/jeecg-boot/ureport/designer?_u=mysql:' + item.name
+        url = 'http://api.tjyourong.com.cn/jeecg-boot/ureport/designer?_u=mysql:' + item.name
       } else if (process.env.NODE_ENV === 'production') {
-        url = 'http://39.97.120.42:8080/jeecg-boot/ureport/designer?_u=mysql:' + item.name
+        url = 'http://api.tjyourong.com.cn/jeecg-boot/ureport/designer?_u=mysql:' + item.name
       }
       window.open(url, '_blank')
     },
     addData(){
       var url = ''
       if (process.env.NODE_ENV === 'development') {
-        url = 'http://39.97.120.42:8080/jeecg-boot/ureport/designer'
+        url = 'http://api.tjyourong.com.cn/jeecg-boot/ureport/designer'
       } else if (process.env.NODE_ENV === 'production') {
-        url = 'http://39.97.120.42:8080/jeecg-boot/ureport/designer'
+        url = 'http://api.tjyourong.com.cn/jeecg-boot/ureport/designer'
       }
       window.open(url, '_blank')
     },

+ 5 - 4
vue.config.js

@@ -73,12 +73,13 @@ module.exports = {
         // target: 'http://192.168.1.54:8080', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.165:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目 
+        // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
+        target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         ws: false,
         changeOrigin: true,
-        // pathRewrite: {
-        //     '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉
-        // }
+        pathRewrite: {
+            '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉
+        }
       },
     },
     // before(app) {