소스 검색

添加模态框message

306132416@qq.com 4 년 전
부모
커밋
83074ce638
5개의 변경된 파일53개의 추가작업 그리고 19개의 파일을 삭제
  1. 10 0
      package-lock.json
  2. 2 0
      package.json
  3. 3 2
      src/App.vue
  4. 12 12
      src/main.js
  5. 26 5
      src/views/account/AccountIndex.vue

+ 10 - 0
package-lock.json

@@ -2478,6 +2478,11 @@
         "resolve": "^1.12.0"
       }
     },
+    "babel-helper-vue-jsx-merge-props": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+      "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
+    },
     "babel-loader": {
       "version": "8.2.2",
       "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.2.2.tgz?cache=0&sync_timestamp=1606424869752&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.2.2.tgz",
@@ -11245,6 +11250,11 @@
         }
       }
     },
+    "vue-notifyjs": {
+      "version": "0.4.3",
+      "resolved": "https://registry.npmjs.org/vue-notifyjs/-/vue-notifyjs-0.4.3.tgz",
+      "integrity": "sha512-noZGki6q5B7YPmruA8+GYjSJC4WWXfmZxIpeWbfYYPYJ9ZBr+ggcswbIRFIuINlZYsOFaflb4Hpzd8bBZdHY7g=="
+    },
     "vue-router": {
       "version": "3.5.1",
       "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.5.1.tgz?cache=0&sync_timestamp=1615477530268&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.5.1.tgz",

+ 2 - 0
package.json

@@ -9,9 +9,11 @@
   },
   "dependencies": {
     "axios": "^0.21.1",
+    "babel-helper-vue-jsx-merge-props": "^2.0.3",
     "core-js": "^3.6.5",
     "qs": "^6.10.1",
     "vue": "^2.6.11",
+    "vue-notifyjs": "^0.4.3",
     "vue-router": "^3.2.0"
   },
   "devDependencies": {

+ 3 - 2
src/App.vue

@@ -15,6 +15,7 @@
       </div>
     </div>
     <FooterBanner/>
+    <notifications></notifications>
   </div>
 </template>
 
@@ -36,7 +37,7 @@ export default {
     return {
       navTitle1: ' > 数据管理',
       navTitle2: '',
-      isManufacturer: 'distributor', // distributor 经销商 manufacturer 厂商
+      isManufacturer: 'manufacturer', // distributor 经销商 manufacturer 厂商
     }
   },
   methods: {
@@ -90,7 +91,7 @@ export default {
   }
 };
 </script>
-
+<style src="../node_modules/vue-notifyjs/themes/default.css"></style>
 <style lang="less">
 * {
   padding: 0;

+ 12 - 12
src/main.js

@@ -1,12 +1,12 @@
-import Vue from 'vue'
-import App from './App.vue'
-import router from './router'
-import axiosApi from './request/api'
-
-Vue.config.productionTip = false
-Vue.prototype.$http = axiosApi
-
-new Vue({
-  router,
-  render: h => h(App)
-}).$mount('#app')
+import Vue from 'vue'
+import App from './App.vue'
+import router from './router'
+import axiosApi from './request/api'
+import Notify from 'vue-notifyjs'
+Vue.config.productionTip = false
+Vue.prototype.$http = axiosApi
+Vue.use(Notify)
+new Vue({
+  router,
+  render: h => h(App)
+}).$mount('#app')

+ 26 - 5
src/views/account/AccountIndex.vue

@@ -76,10 +76,10 @@ export default {
       plateValue: "",
       tableData: [],
       getDateList: [
-        { num: "1", id: "123", dlr: 'L0201', area: '北区', distributor: '北京博瑞',plate:'微信公众号', account: '雷克萨斯北京博瑞4S店', isAttest: 0, fans: 118529},
-        { num: "1", id: "123", dlr: 'L0201', area: '北区', distributor: '北京博瑞',plate:'微信公众号', account: '雷克萨斯北京博瑞4S店', isAttest: 0, fans: 118529},
-        { num: "1", id: "123", dlr: 'L0201', area: '北区', distributor: '北京博瑞',plate:'微信公众号', account: '雷克萨斯北京博瑞4S店', isAttest: 0, fans: 118529},
-        { num: "1", id: "123", dlr: 'L0201', area: '北区', distributor: '北京博瑞',plate:'微信公众号', account: '雷克萨斯北京博瑞4S店', isAttest: 1, fans: 118529}
+        // { num: "1", id: "123", dlr: 'L0201', area: '北区', distributor: '北京博瑞',plate:'微信公众号', account: '雷克萨斯北京博瑞4S店', isAttest: 0, fans: 118529},
+        // { num: "1", id: "123", dlr: 'L0201', area: '北区', distributor: '北京博瑞',plate:'微信公众号', account: '雷克萨斯北京博瑞4S店', isAttest: 0, fans: 118529},
+        // { num: "1", id: "123", dlr: 'L0201', area: '北区', distributor: '北京博瑞',plate:'微信公众号', account: '雷克萨斯北京博瑞4S店', isAttest: 0, fans: 118529},
+        // { num: "1", id: "123", dlr: 'L0201', area: '北区', distributor: '北京博瑞',plate:'微信公众号', account: '雷克萨斯北京博瑞4S店', isAttest: 1, fans: 118529}
       ],
       functionData: [],
     };
@@ -116,6 +116,21 @@ export default {
     submit: function () {
       console.log(this.plateValue);
       console.log(this.areaValue);
+        this.$http({
+            method: 'post',
+            url: '/sys/agent/selectAgentInfoPage',
+            data: {
+                queryParams:this.areaValue
+            },
+        }).then((res) => {
+            if(res.data.code === 200) {
+                this.getDateList = res.data.data;
+            }else {
+                console.log('message', res.data.message);
+            }
+        }).catch((err) => {
+            console.log(err);
+        })
     },
     getData: function () {
       this.tableData = [];
@@ -143,12 +158,18 @@ export default {
     getDealerListRequest(){//获取经销商列表
       this.$http({
         method: 'post',
-        url: '/sys/agent/selectAgentInfoPage',
+        url: '/sys/mediaAccount/selectMediaAccountPage',
         data: {
         },
       }).then((res) => {
           if(res.data.code === 200) {
             this.getDateList = res.data.data;
+            this.$notify({
+              message:"成功",
+              type: "success",
+              horizontalAlign:'center',
+              showClose:false
+              });
           }else {
             console.log('message', res.data.message);
           }