瀏覽代碼

返回正确的页面号

wucl 2 年之前
父節點
當前提交
c128d1049b

+ 0 - 2
.env.development

@@ -5,8 +5,6 @@ ENV = 'development'
 VUE_APP_BASE_API = '/api/'
 VUE_APP_BASE_API2 = '/api'
 VUE_APP_BASE_WEB = ''
-VUE_APP_BASE_WEB_URL = '/adminm'
-VUE_APP_BASE_WEB_URL_STUDENT = '/studentm'
 
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 

+ 0 - 2
.env.production

@@ -5,6 +5,4 @@ ENV = 'production'
 VUE_APP_BASE_API = '/api/'
 VUE_APP_BASE_API2 = '/api'
 VUE_APP_BASE_WEB = '/admin'
-VUE_APP_BASE_WEB_URL = '/adminm'
-VUE_APP_BASE_WEB_URL_STUDENT = '/studentm'
 

+ 0 - 1
.env.test

@@ -6,6 +6,5 @@ ENV = 'staging'
 # base api
 VUE_APP_BASE_API = '/api/'
 VUE_APP_BASE_API2 = '/api'
-VUE_APP_BASE_WEB_URL = '/adminm'
 VUE_APP_BASE_WEB = '/admin'
 

+ 1 - 1
README.md

@@ -35,7 +35,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
 >添加一个模块,只需要在api/modules/目录下 添加一个js 文件即可工程化引入
 
 #### 2.项目图标
-直接将png 和 svg 图标放入 /src/icons 下得对应目录。 访问http://localhost:9527/#/icons 即可查看,点击复制使用.支持svg,png,element图标以及base64、网络地址
+直接将png 和 svg 图标放入 /src/icons 下得对应目录。 访问http://localhost:9518/#/icons 即可查看,点击复制使用.支持svg,png,element图标以及base64、网络地址
 >图标做了工程化管理,
 
 #### 3. 代码质量

+ 0 - 9
deploy/config.js

@@ -11,14 +11,5 @@ const SERVER_LIST = [
     password: 'B89cukAsnvwbclMX',
     path: '/usr/local/nginx/html/admin' // 项目静态文件存放地址
   },
-  {
-    id: 'prod',
-    name: '正式环境',
-    host: '101.x.xx.xx',
-    port: 22,
-    username: 'root',
-    password: '******',
-    path: '/opt/xxx/front'
-  }
 ]
 module.exports = SERVER_LIST

+ 0 - 1
public/index.html

@@ -7,7 +7,6 @@
   <meta name="renderer" content="webkit">
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
   <link rel="shortcut icon" href="<%= BASE_URL %>dayou_favicon.ico">
-  <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3982342_d30pzxlair.css"/>
   <title><%= webpackConfig.name %></title>
 </head>
 <body>

+ 22 - 22
src/components/YPageListLayout/index.vue

@@ -1,29 +1,29 @@
 <template>
-    <div class="y-page-list-layout">
-      <div class="y-info" v-if="$slots.left || $slots.right">
-        <div class="y-left">
-          <slot name="left"></slot>
-        </div>
-        <div class="y-right">
-          <slot name="right"></slot>
-          <el-dropdown trigger="click" v-show="showExportBox">
-            <el-button type="primary" round>
-              导出<i class="el-icon-arrow-down el-icon--right"></i>
-            </el-button>
-            <el-dropdown-menu slot="dropdown">
-              <div class="y-page-list-export-box" ref="exportBtnBox"></div>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </div>
+  <div class="y-page-list-layout">
+    <div class="y-info" v-if="$slots.left || $slots.right">
+      <div class="y-left">
+        <slot name="left"></slot>
       </div>
-      <div class="y-twostart">
-        <slot name="twostart"></slot>
+      <div class="y-right">
+        <slot name="right"></slot>
+        <el-dropdown trigger="click" v-show="showExportBox">
+          <el-button type="primary" round>
+            导出<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <div class="y-page-list-export-box" ref="exportBtnBox"></div>
+          </el-dropdown-menu>
+        </el-dropdown>
       </div>
-      <template>
-        <slot name="table"></slot>
-      </template>
-      <pagination style="border: 1px solid #EBECED" v-if="pageList.total>0" :total="pageList.total" :page.sync="pagePara.current" :limit.sync="pagePara.size" @pagination="getPageList" />
     </div>
+    <div class="y-twostart">
+      <slot name="twostart"></slot>
+    </div>
+    <template>
+      <slot name="table"></slot>
+    </template>
+    <pagination style="border: 1px solid #EBECED" v-if="pageList.total>0" :total="pageList.total" :page.sync="pagePara.current" :limit.sync="pagePara.size" @pagination="getPageList" />
+  </div>
 </template>
 
 <script>

+ 0 - 1
src/main.js

@@ -29,7 +29,6 @@ import './router/permission' // permission control
 
 // vueConfig
 import './VueConfig'
-import './styles/iconfont.css'
 // 引入复制链接
 import VueClipboard from 'vue-clipboard2'
 Vue.use(VueClipboard)

+ 0 - 8
src/styles/iconfont.css

@@ -1,8 +0,0 @@
-[class^="el-icon-ali-"],[class*="el-icon-ali-"]
-{
-  font-family: "iconfont" !important;
-  font-size: 16px;
-  font-style: normal;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}

+ 15 - 3
src/views/item/detail.vue

@@ -374,9 +374,21 @@
       },
       // 上传
       changeres(res, file) {
-        this.postForm.contractUrl = res.data.url;
-        const arr = res.data.url.split("-");
-        this.contractName = arr[1];
+        if (res.code === 200){
+          const date = new Date();
+          this.postForm.contractUrl = res.data.url;
+          this.postForm.uploadDate = date.getFullYear() + "-" + (this.getZero(date.getMonth() + 1)) + "-" + this.getZero((date.getDate()));
+          const arr = res.data.url.split("-");
+          this.contractName = arr[1];
+        }else {
+          this.$notify({
+            title: '错误',
+            message: '合同上传失败',
+            type: 'error',
+            duration: 2000
+          });
+          return;
+        }
       },
       changePrefix(e){
         this.postForm.belongTo = e;

+ 11 - 1
src/views/item/itemIndex.vue

@@ -56,7 +56,17 @@
     },
     methods: {
       toItemPage(itemName){
-        this.$router.push(`/item/list?name=${itemName}`);
+        let dft = false;
+        const menus = this.$store.getters.permission_menus;
+        menus.forEach((item) => {
+          console.log(item.menuCode);
+          if (item.menuCode === "_view_item") {
+            dft = true;
+          }
+        });
+        if (dft){
+          this.$router.push(`/item/list?name=${itemName}`)
+        }
       },
       getStageList(state){
         this.state = state;

+ 15 - 0
src/views/market/customer/list.vue

@@ -67,6 +67,15 @@
             @fath="getList"
           />
         </PermissionButton>
+        <PermissionButton
+          menu-code="_views_customer_export"
+          class-name="filter-item"
+          round
+          type="primary"
+          name="导出"
+          @click="customerExport"
+        >
+        </PermissionButton>
       </template>
       <parentTable
         v-loading="listLoading"
@@ -220,6 +229,12 @@
       that.getList();
     },
     methods: {
+      customerExport(){
+        this.$utils.exportUtil(
+          "/customer/export", this.listQuery,
+          "导出"
+        );
+      },
       handleDownload() {
         this.$utils.exportUtil('/customer/download/importTemplate', {}, '模板下载')
       },

+ 48 - 24
src/views/market/index.vue

@@ -3,12 +3,13 @@
     <y-data-view-page-layout title="市场管理首页" class="staff-admin-index">
       <y-data-view-module>
         <div style="width: 1660px">
-          <y-d-v-over-view style="width: 250px" title="本年签约目标" :typeId="1" :ico="require('@/assets/statics/pg8.png')" :data="[{text:marketStaticsInfo.yearSaleTarget,value:'元'}]" @click.native="openSet('本年签约目标')"></y-d-v-over-view>
-          <y-d-v-over-view style="width: 250px" title="本年回款目标" :typeId="2" :ico="require('@/assets/statics/pg8.png')" :data="[{text:marketStaticsInfo.yearPaymentTarget,value:'元'}]" @click.native="openSet('本年回款目标')"></y-d-v-over-view>
-          <y-d-v-over-view style="width: 250px" title="潜在商机" :typeId="3" :ico="require('@/assets/statics/pg8.png')" :data="[{text:marketStaticsInfo.businessNum,value:'个'}]" @click.native="toBusinessPage()"></y-d-v-over-view>
-          <y-d-v-over-view style="width: 250px" title="本年已签约" :typeId="4" :ico="require('@/assets/statics/pg9.png')" :data="[{text:marketStaticsInfo.yearSaleDone,value:'元'}]" @click.native="toItemPage()"></y-d-v-over-view>
-          <y-d-v-over-view style="width: 250px" title="本年已回款" :typeId="5" :ico="require('@/assets/statics/pg9.png')" :data="[{text:marketStaticsInfo.yearPaymentDone,value:'元'}]" @click.native="toPaymentPage('year')"></y-d-v-over-view>
-          <y-d-v-over-view style="width: 250px" title="本月已回款" :typeId="6" :ico="require('@/assets/statics/pg9.png')" :data="[{text:marketStaticsInfo.monthPaymentDone,value:'元'}]" @click.native="toPaymentPage('month')"></y-d-v-over-view>
+          <y-d-v-over-view style="width: 220px" title="本年签约目标" :typeId="1" :ico="require('@/assets/statics/pg8.png')" :data="[{text:marketStaticsInfo.yearSaleTarget,value:'元'}]" @click.native="openSet('本年签约目标')"></y-d-v-over-view>
+          <y-d-v-over-view style="width: 220px" title="本年回款目标" :typeId="2" :ico="require('@/assets/statics/pg8.png')" :data="[{text:marketStaticsInfo.yearPaymentTarget,value:'元'}]" @click.native="openSet('本年回款目标')"></y-d-v-over-view>
+          <y-d-v-over-view style="width: 220px" title="潜在商机" :typeId="3" :ico="require('@/assets/statics/pg8.png')" :data="[{text:marketStaticsInfo.businessNum,value:'个'}]" @click.native="toBusinessPage()"></y-d-v-over-view>
+          <y-d-v-over-view style="width: 220px" title="预计签约金额" :typeId="6" :ico="require('@/assets/statics/pg9.png')" :data="[{text:marketStaticsInfo.estimateAmount,value:'元'}]" @click.native="toBusinessPage()"></y-d-v-over-view>
+          <y-d-v-over-view style="width: 220px" title="本年已签约" :typeId="4" :ico="require('@/assets/statics/pg9.png')" :data="[{text:marketStaticsInfo.yearSaleDone,value:'元'}]" @click.native="toItemPage()"></y-d-v-over-view>
+          <y-d-v-over-view style="width: 220px" title="本年已回款" :typeId="5" :ico="require('@/assets/statics/pg9.png')" :data="[{text:marketStaticsInfo.yearPaymentDone,value:'元'}]" @click.native="toPaymentPage('year')"></y-d-v-over-view>
+          <y-d-v-over-view style="width: 220px" title="本月已回款" :typeId="6" :ico="require('@/assets/statics/pg9.png')" :data="[{text:marketStaticsInfo.monthPaymentDone,value:'元'}]" @click.native="toPaymentPage('month')"></y-d-v-over-view>
         </div>
       </y-data-view-module>
       <div class="calendar-class">
@@ -38,11 +39,12 @@
               <y-data-view-module>
                 <el-button type="warning" style="position: absolute;top:20px;right:60px;font-weight: bolder;cursor: pointer" @click="dialogVisible = true" >添加内容</el-button>
                 <div class="plan-class">
-                  <div style="width: 530px;display: flex" v-for="(item,index) in dynamicTags">
+                  <div style="width: 530px;display: flex " v-for="(item,index) in dynamicTags">
                     <span style="display:inline-block;width:500px;word-break: break-all; white-space:normal;margin: 10px 10px 10px 10px;line-height: 25px;">
                       {{ index+1 }}、{{ item.content }}
                     </span>
-                    <el-icon class="el-icon-circle-close" style="color: red;cursor:pointer;" @click.native="deltag(item.id)"/>
+                    <el-icon class="el-icon-edit-outline" style="color: red;cursor:pointer; margin-left: 5px" @click.native="editNote(item)"/>
+                    <el-icon class="el-icon-circle-close" style="color: red;cursor:pointer; margin-left: 5px" @click.native="deltag(item.id)"/>
                   </div>
                   <span v-if="dynamicTags.length<8 & dynamicTags.length!=0" style="display:inline-block;width:530px;height:400px;word-break: break-all; white-space:normal;margin: 10px 10px 10px 10px;line-height: 25px;" >
                   </span>
@@ -181,7 +183,8 @@
           amount:null
         },
         setName:'',
-        tableData:[]
+        tableData:[],
+        noteId:null,
       }
     },
     created() {
@@ -194,6 +197,11 @@
       },
     },
     methods: {
+      editNote(item){
+        this.dialogVisible = true;
+        this.textareadata = item.content;
+        this.noteId = item.id;
+      },
       toItemPage(){
         this.$router.push(`/item/list/mine?isCurYear=true`);
       },
@@ -285,21 +293,38 @@
         let data = {
           noteDate:this.currentDate,
           content:this.textareadata,
-          userId: this.$store.getters.userInfo.id
-        }
-        this.$api.note.add(data).then(data => {
-          if (data.code ===200){
-            this.$message.success('保存成功')
-            this.dialogVisible=false
-            this.textareadata = ''
-            this.tagdata()
-            this.editId = ''
-            this.getCanlendarList();
-          }else{
-            this.$message.success(data.msg)
-          }
+          userId: this.$store.getters.userInfo.id,
+          id:this.noteId
+        };
+        if(data.id){
+          this.$api.note.edit(data).then(data => {
+            if (data.code ===200){
+              this.$message.success('修改成功');
+              this.dialogVisible=false
+              this.textareadata = '';
+              this.tagdata();
+              this.editId = '';
+              this.getCanlendarList();
+            }else{
+              this.$message.success(data.msg)
+            }
+            this.noteId = null;
+          })
+        }else{
+          this.$api.note.add(data).then(data => {
+            if (data.code ===200){
+              this.$message.success('保存成功');
+              this.dialogVisible=false;
+              this.textareadata = '';
+              this.tagdata();
+              this.editId = '';
+              this.getCanlendarList();
+            }else{
+              this.$message.success(data.msg)
+            }
 
-        })
+          })
+        }
       },
       tagdata(){
         let data = {
@@ -344,7 +369,6 @@
         clearTimeout(this.timer);
       },
       openDrawer(date){
-        console.log(date);
         this.dialog = true
         this.currentDate = date.day;
         this.tagdata();

+ 11 - 2
src/views/market/visit/list.vue

@@ -19,7 +19,13 @@
         />
         <el-input
           v-model="listQuery.keyword"
-          placeholder="名字/等级/部门/科室/职位"
+          placeholder="名字/等级/单位/科室/职位"
+          clearable
+          style="margin-left: 20px;width: 320px;float: left;">
+        </el-input>
+        <el-input
+          v-model="listQuery.userName"
+          placeholder="客户经理"
           clearable
           style="margin-left: 20px;width: 320px;float: left;">
         </el-input>
@@ -62,7 +68,7 @@
             <span v-if=" row.customerLevel==='一般客户' " style="color: green">{{row.customerLevel}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="客户部门" align="center" width="120">
+        <el-table-column label="客户单位" align="center" width="120">
           <template slot-scope="{row}">
             <span>{{ row.customerDepartment }}</span>
           </template>
@@ -185,6 +191,9 @@
       if (that.$route.query.visitType) {
         that.listQuery.visitType = that.$route.query.visitType;
       }
+      if (that.$route.query.userName) {
+        that.listQuery.userName = that.$route.query.userName;
+      }
       that.getList();
     },
     methods: {

+ 3 - 3
vue.config.js

@@ -14,8 +14,8 @@ const name = defaultSettings.title; // page title
 // use administrator privileges to execute the command line.
 // For example, Mac: sudo npm run
 // You can change the port by the following method:
-// port = 9527 npm run dev OR npm run dev --port = 9527
-const port = process.env.port || process.env.npm_config_port || 9527; // dev port
+// port = 9518 npm run dev OR npm run dev --port = 9518
+const port = process.env.port || process.env.npm_config_port || 9518; // dev port
 
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -55,7 +55,7 @@ module.exports = {
       //   pathRewrite: {}
       // },
       '/dfs': {
-        target: 'http://119.27.160.97:8531',
+        target: 'http://127.0.0.1:80',
         changeOrigin: true,
         pathRewrite: {}
       }