yangfan 2 lat temu
rodzic
commit
cf964354a9

+ 1 - 1
admin/src/views/ABtest/ABclass/edit.vue

@@ -131,7 +131,7 @@
                     type: 'warning'
                 }).then(() => {
                     window.location.href = 'about:blank'
-                    window.close()
+                    this.$router.back()()
                 }).catch(() => {
                     this.$message({
                         type: 'info',

+ 5 - 5
admin/src/views/ABtest/edit.vue

@@ -378,9 +378,9 @@ export default {
                   offset: 360,
                 });
 
-                //   setTimeout(() => {
-                //     window.close();
-                //   }, 1500);
+               setTimeout(() => {
+                this.$router.back();
+                }, 1500);
               });
             } else {
               this.form.beginTime = this.timeBox[0];
@@ -416,7 +416,7 @@ export default {
       })
         .then(() => {
           window.location.href = "about:blank";
-          window.close();
+          this.$router.back()();
         })
         .catch(() => {
           this.$message({
@@ -427,7 +427,7 @@ export default {
     },
     closeTwo() {
       window.location.href = "about:blank";
-      window.close();
+      this.$router.back()();
     },
 
     // 表填格式转换

+ 4 - 6
admin/src/views/channel/allSecondChannel.vue

@@ -44,10 +44,10 @@
         </el-table-column>
         <el-table-column prop="channelCode" label="渠道key" width="180">
         </el-table-column>
-        <el-table-column prop="channelPartner" label="合作方">
+        <el-table-column prop="partnerContacts" label="合作方">
         </el-table-column>
-        <el-table-column prop="address" label="完整渠道编码"> </el-table-column>
-        <el-table-column prop="address" label="渠道类别"> </el-table-column>
+        <el-table-column prop="fullCode" label="完整渠道编码"> </el-table-column>
+        <el-table-column prop="channelType" label="渠道类别"> </el-table-column>
         <el-table-column prop="channelStatus" label="渠道形态">
         </el-table-column>
         <el-table-column prop="onlineTime" label="生效时间"> </el-table-column>
@@ -220,9 +220,7 @@ export default {
     reset(formName) {
       // 重置
       this.searchForm = {};
-      get("/channelInfo/listChannelslistChannels", {}).then((res) => {
-        this.tableData = res.data.list;
-      });
+     
     },
     checkpushdata(e) {
       get("/channelInfo/checkpushdata", { fullCode: e }).then((res) => {

+ 59 - 146
admin/src/views/channel/channelEdit.vue

@@ -4,138 +4,55 @@
       <el-main>
         <!-- 二级 -->
         <template v-if="form.parentId || $route.query.type == 'erji'">
-          <el-form
-            ref="form"
-            :model="formm"
-            :rules="ruless"
-            label-width="160px"
-          >
+          <el-form ref="form" :model="formm" :rules="ruless" label-width="160px">
             <el-form-item label="渠道名称" prop="channelName">
-              <el-input
-                placeholder="请输入内容"
-                v-model="formm.channelName"
-                clearable
-                @blur="changeName"
-              ></el-input>
+              <el-input placeholder="请输入内容" v-model="formm.channelName" clearable @blur="changeName"></el-input>
               <!-- @change="changeInputer" -->
             </el-form-item>
             <el-form-item label="一级渠道">
-              <el-select
-                v-model="formm.parentId"
-                filterable
-                remote
-                reserve-keyword
-                placeholder="请输入关键词"
-                :remote-method="remoteMethod"
-                :loading="loading"
-              >
-                <el-option
-                  v-for="item in options"
-                  :key="item.id"
-                  :label="item.channelName"
-                  :value="item.id"
-                >
+              <el-select v-model="formm.parentId" filterable remote reserve-keyword placeholder="请输入关键词" :remote-method="remoteMethod" :loading="loading">
+                <el-option v-for="item in options" :key="item.id" :label="item.channelName" :value="item.id">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="二级编码">
-              <el-input
-                placeholder="自动生成"
-                v-model="formm.channelCode"
-                disabled
-                @change="changeInput"
-              ></el-input>
+              <el-input placeholder="自动生成" v-model="formm.channelCode" disabled @change="changeInput"></el-input>
             </el-form-item>
             <el-form-item label="完整编码">
-              <el-input
-                placeholder="自动生成"
-                v-model="formm.fullCode"
-                disabled
-                @change="changeInput"
-              ></el-input>
+              <el-input placeholder="自动生成" v-model="formm.fullCode" disabled @change="changeInput"></el-input>
             </el-form-item>
             <el-form-item label="key">
-              <el-input
-                placeholder="自动生成"
-                v-model="formm.channelKey"
-                disabled
-                @change="changeInput"
-              ></el-input>
+              <el-input placeholder="自动生成" v-model="formm.channelKey" disabled @change="changeInput"></el-input>
             </el-form-item>
             <el-form-item label="渠道类别" prop="channelType">
-              <el-select
-                v-model="formm.channelType"
-                clearable
-                placeholder="请选择"
-              >
-                <el-option
-                  v-for="item in typeList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
+              <el-select v-model="formm.channelType" clearable placeholder="请选择">
+                <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="上线时间">
               <el-col :span="11">
-                <el-date-picker
-                  type="datetime"
-                  placeholder="选择日期"
-                  v-model="formm.onlineTime"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                  range-separator="至"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  style="width: 100%"
-                >
+                <el-date-picker type="datetime" placeholder="选择日期" v-model="formm.onlineTime" start-placeholder="开始日期" end-placeholder="结束日期" range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
                 </el-date-picker>
               </el-col>
             </el-form-item>
 
             <el-form-item label="绑定策略" prop="strategyId">
-              <el-select
-                v-model="formm.strategyId"
-                filterable
-                remote
-                reserve-keyword
-                placeholder="请输入关键词"
-                :remote-method="remoteMethodstrategyId"
-                :loading="loading"
-              >
-                <el-option
-                  v-for="item in celueList"
-                  :key="item.id"
-                  :label="item.strategyName"
-                  :value="item.id"
-                >
+              <el-select v-model="formm.strategyId" filterable remote reserve-keyword placeholder="请输入关键词" :remote-method="remoteMethodstrategyId" :loading="loading">
+                <el-option v-for="item in celueList" :key="item.id" :label="item.strategyName" :value="item.id">
                 </el-option>
               </el-select>
               <span style="margin-left: 20px">
-                <el-button
-                  @click="refresh"
-                  icon="el-icon-refresh"
-                  size="mini"
-                  content="刷新"
-                ></el-button>
+                <el-button @click="refresh" icon="el-icon-refresh" size="mini" content="刷新"></el-button>
               </span>
               <span style="margin-left: 20px">
-                <el-button
-                  @click="toAdd"
-                  icon="el-icon-plus"
-                  size="mini"
-                  content="新建"
-                ></el-button>
+                <el-button @click="toAdd" icon="el-icon-plus" size="mini" content="新建"></el-button>
               </span>
               <span style="margin-left: 20px">
-                <el-button
-                  @click="toEdit(form.strategyId)"
-                  icon="el-icon-edit"
-                  size="mini"
-                  content="编辑"
-                ></el-button>
+                <el-button @click="toEdit(formm.strategyId)" icon="el-icon-edit" size="mini" content="编辑"></el-button>
               </span>
             </el-form-item>
+
             <el-form-item label="生效状态">
               <el-radio v-model="formm.channelStatus" :label="0">失效</el-radio>
               <el-radio v-model="formm.channelStatus" :label="1">生效</el-radio>
@@ -161,28 +78,14 @@
         <template v-else>
           <el-form ref="form" :model="form" :rules="rules" label-width="160px">
             <el-form-item label="渠道名称" prop="channelName">
-              <el-input
-                placeholder="请输入内容"
-                v-model="form.channelName"
-                clearable
-                @change="changeInput"
-              ></el-input>
+              <el-input placeholder="请输入内容" v-model="form.channelName" clearable @change="changeInput"></el-input>
             </el-form-item>
             <el-form-item label="一级编码">
               <el-input disabled v-model="form.channelCode"></el-input>
             </el-form-item>
             <el-form-item label="上线时间">
               <el-col :span="11">
-                <el-date-picker
-                  type="datetime"
-                  placeholder="选择日期"
-                  v-model="form.onlineTime"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                  range-separator="至"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  style="width: 100%"
-                >
+                <el-date-picker type="datetime" placeholder="选择日期" v-model="form.onlineTime" start-placeholder="开始日期" end-placeholder="结束日期" range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
                 </el-date-picker>
               </el-col>
             </el-form-item>
@@ -224,7 +127,7 @@ import XEUtils from "xe-utils";
 var text1 = "";
 export default {
   name: "SchemeEdit",
-  data() {
+  data () {
     return {
       form: {
         channelPattern: "1",
@@ -236,6 +139,7 @@ export default {
         channelStatus: 1,
         parentId: this.$route.query.id,
         onlineTime: "",
+        strategyId: ""
       },
       oldform: {},
 
@@ -309,7 +213,18 @@ export default {
       num: null,
     };
   },
-  created() {
+  created () {
+    //获取策略
+    get("/strategy/strategy-info/page", {
+      pageSize: 100,
+      pageNum: 1,
+    }).then(res => {
+      console.log(res)
+      this.celueList = res.data.list
+
+    })
+
+
     // 数据回显
     if (this.$route.query.ids) {
       // console.log(this.$route.query.ids);
@@ -338,7 +253,7 @@ export default {
 
   methods: {
     //新增历史记录
-    addHistory(type, channelId, text) {
+    addHistory (type, channelId, text) {
       post("/channel/log/create", {
         type: type,
         notes: text,
@@ -348,7 +263,7 @@ export default {
       });
     },
 
-    ontwo() {
+    ontwo () {
       var array1 = this.oldform;
       var array2 = this.formm;
       // console.log(array1, "array1", array2, "array2");
@@ -412,14 +327,14 @@ export default {
     },
 
     //   点击提交
-    onSubmit() {
+    onSubmit () {
       // console.log(this.from.parentId);
       this.$confirm("此操作将永久改变数据, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-       
+
         let type = 1;
         let channelId = 0;
         let text = "渠道:" + this.form.channelName;
@@ -476,14 +391,14 @@ export default {
         }
       });
     },
-    changeInput() {
+    changeInput () {
       this.form.channelName = this.form.channelName.includes("H5")
         ? this.form.channelName
         : `${this.form.channelName}H5`;
       // this.$set(this.form,'name',`${newV}H5`)
     },
 
-    close() {
+    close () {
       this.$confirm("此操作不会保存已编辑数据, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -499,30 +414,28 @@ export default {
           });
         });
     },
-    toAdd(e) {
-      const routeUrl = this.$router.resolve({
-        path: "/schemeV2/schemeAdd",
-        query: {
-          id: e.id,
-        },
-      });
-      window.open(routeUrl.href, "_blank");
+    toAdd (e) {
+      this.$router.push("/schemeV2/schemeAdd")
+    },
 
-      // this.$router.push("/schemeV2/schemeAdd?")
+    toEdit (id) {
+      console.log(id)
+
+      this.$router.push("/schemeV2/schemeAdd?ids=" + id)
     },
 
     // },
-    refresh() {
-      // get('/strategyInfoNew/page', {
-      //   'strategyType': 0,
-      //   'pageSize': 9999,
-      //   'pageNum': 1,
-      //   'strategyType': 0
-      // }).then(res => {
-      //   this.celueList = res.data.list
-      // })
+    refresh () {
+      get('/strategy/strategy-info/page', {
+        'strategyType': 0,
+        'pageSize': 100,
+        'pageNum': 1,
+        'strategyType': 0
+      }).then(res => {
+        this.celueList = res.data.list
+      })
     },
-    remoteMethod(query) {
+    remoteMethod (query) {
       // let that = this;
       // if (query !== "") {
       //   this.loading = true;
@@ -537,13 +450,13 @@ export default {
       //   this.options = [];
       // }
     },
-    remoteMethodstrategyId(query) {
+    remoteMethodstrategyId (query) {
       // let that = this;
       // if (query !== "") {
       //   this.loading = true;
-      //   get("/strategyInfoNew/page", {
+      //   get("/strategy/strategy-info/page", {
       //     strategyName: query,
-      //     pageSize: 9999,
+      //     pageSize: 100,
       //     pageNum: 1,
       //     strategyType: 0,
       //   }).then((res) => {
@@ -555,7 +468,7 @@ export default {
       // }
     },
     // 渠道名称输入框失焦事件
-    changeName() {
+    changeName () {
       if (!this.num && !this.$route.query.ids)
         if (this.formm.channelName) {
           this.num = 1;

+ 42 - 81
admin/src/views/channel/firstChannelList.vue

@@ -2,40 +2,18 @@
   <div class="app-container">
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="add"
-          >新增</el-button
-        >
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="add">新增</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="info"
-          icon="el-icon-upload2"
-          size="mini"
-          @click="Refresh"
-          >刷新</el-button
-        >
+        <el-button type="info" icon="el-icon-upload2" size="mini" @click="Refresh">刷新</el-button>
       </el-col>
     </el-row>
 
     <!--搜索-->
     <el-header class="searchBox">
-      <el-form
-        :inline="true"
-        :model="searchForm"
-        ref="searchForm"
-        class="demo-form-inline"
-      >
+      <el-form :inline="true" :model="searchForm" ref="searchForm" class="demo-form-inline">
         <el-form-item label="渠道名称">
-          <el-input
-            v-model="searchForm.channelName"
-            name="searchForm.channelName"
-            placeholder="策略名称"
-          />
+          <el-input v-model="searchForm.channelName" name="searchForm.channelName" placeholder="策略名称" />
         </el-form-item>
         <el-form-item label="合作方">
           <el-input v-model="searchForm.channelPartner" placeholder="合作方" />
@@ -57,43 +35,15 @@
       <el-table-column prop="channelCode" label="渠道编码"> </el-table-column>
       <el-table-column prop="channelStatus" label="状态"> </el-table-column>
       <el-table-column prop="onlineTime" label="生效时间"> </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            @click="edit(scope.row.id)"
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            >修改</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-plus"
-            @click="query(scope.row.id)"
-            >查询</el-button
-          >
-          <el-button
-            @click="del(scope.row.id)"
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            >删除</el-button
-          >
+          <el-button @click="edit(scope.row.id)" size="mini" type="text" icon="el-icon-edit">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-plus" @click="query(scope.row.id)">查询</el-button>
+          <el-button @click="del(scope.row.id)" size="mini" type="text" icon="el-icon-delete">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page="pageNo"
-      :limit="pageSizes"
-      @pagination="pagination"
-    />
+    <pagination v-show="total > 0" :total="total" :page="pageNo" :limit="pageSizes" @pagination="pagination" />
   </div>
 </template>
 
@@ -102,11 +52,11 @@ import { post, get, del, put } from "@/api/common";
 
 
 export default {
-  data() {
+  data () {
     return {
       searchForm: {
-        // channelName: "",
-        // channelPartner: "",
+        channelName: "",
+        channelPartner: "",
         pageNo: 1,
         pageSizes: 20,
       },
@@ -123,42 +73,53 @@ export default {
       tableData: [],
     };
   },
-  mounted() {
+  mounted () {
     // 获取列表
     this.getChannerList();
     // 获取分页
   },
   methods: {
-    query(id) {
+    reset () {
+      this.searchForm = {
+        channelName: "",
+        channelPartner: "",
+      }
+    },
+    query (id) {
       console.log(id);
       this.$router.push("/channel/secondChannelList?id=" + id);
     },
     //刷新
-    Refresh() {
+    Refresh () {
       console.log(11111111111);
       this.getChannerList();
     },
     // 搜索
-    init() {
-      get("/channel/info/page", this.searchForm).then((res) => {
-        this.tableData = res.data.list;
-        this.total = res.data.total;
-        // 清空
-        this.searchForm = {
-          channelName: "",
-          channelPartner: "",
-        };
-      });
+    init () {
+      if (!this.searchForm.channelName || !this.searchForm.channelPartner) {
+        this.$message.error("请输入内容")
+      } else {
+        get("/channel/info/page", this.searchForm).then((res) => {
+          this.tableData = res.data.list;
+          this.total = res.data.total;
+          // 清空
+          this.searchForm = {
+            channelName: "",
+            channelPartner: "",
+          };
+        });
+      }
+
     },
 
     // 改变页码触发
-    pagination(page) {
+    pagination (page) {
       this.pageNo = page.page;
       // 重新获取列表数据
       this.getChannerList();
     },
     // 获取订购页列表方法
-    getChannerList() {
+    getChannerList () {
       get("/channel/info/page", {
         pageNo: this.pageNo,
         pageSize: this.pageSize,
@@ -172,11 +133,11 @@ export default {
       });
     },
     //添加跳转
-    add() {
+    add () {
       this.$router.push("/channel/channelEdit");
     },
     //删除
-    del(id) {
+    del (id) {
       console.log(id);
       this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
         confirmButtonText: "确定",
@@ -218,9 +179,9 @@ export default {
         });
     },
     //编辑
-    edit(id) {
+    edit (id) {
       this.$router.push("/channel/channelEdit?ids=" + id);
-       
+
     },
   },
 };

+ 374 - 455
admin/src/views/channel/secondChannelList.vue

@@ -3,12 +3,8 @@
     <el-container style="padding: 30px">
       <el-descriptions class="margin-top" title="一级渠道信息" :column="4">
         <template slot="extra">
-          <el-button type="primary" size="small" @click="oneTOEdit(id)"
-            >编辑</el-button
-          >
-          <el-button type="primary" @click="value5 = true" size="small"
-            >历史记录</el-button
-          >
+          <el-button type="primary" size="small" @click="oneTOEdit(id)">编辑</el-button>
+          <el-button type="primary" @click="value5 = true" size="small">历史记录</el-button>
         </template>
         <el-descriptions-item label="渠道名称">
           <template slot="label"> 渠道名称 </template>
@@ -26,10 +22,7 @@
           <template slot="label"> 生效日期 </template>
           {{ content.onlineTime }}
         </el-descriptions-item>
-        <el-descriptions-item label="合作方">
-          <template slot="label"> 合作方 </template>
-          {{ content.channelPartner }}
-        </el-descriptions-item>
+
 
         <el-descriptions-item label="联系人">
           <template slot="label"> 联系人 </template>
@@ -50,57 +43,27 @@
       </el-descriptions>
       <el-divider></el-divider>
       <el-header class="searchBox">
-        <el-form
-          :inline="true"
-          :model="searchForm"
-          ref="searchForm"
-          class="demo-form-inline"
-        >
+        <el-form :inline="true" :model="searchForm" ref="searchForm" class="demo-form-inline">
           <el-form-item label="渠道名称">
-            <el-input
-              v-model="searchForm.channelName"
-              name="searchForm.channelName"
-              placeholder="策略名称"
-            />
+            <el-input v-model="searchForm.channelName" name="searchForm.channelName" placeholder="策略名称" />
           </el-form-item>
           <el-form-item label="合作方">
-            <el-input
-              v-model="searchForm.channelPartner"
-              placeholder="合作方"
-            />
+            <el-input v-model="searchForm.channelPartner" placeholder="合作方" />
           </el-form-item>
           <el-form-item style="float: right">
-            <el-button type="primary" size="mini" @click="search()"
-              >搜索</el-button
-            >
-            <el-button type="danger" size="mini" @click="pushdata = true"
-              >同步科创</el-button
-            >
+            <el-button type="primary" size="mini" @click="search()">搜索</el-button>
+            <el-button type="danger" size="mini" @click="pushdata = true">同步科创</el-button>
             <el-button size="mini" @click="reset('searchForm')">重置</el-button>
-            <el-button size="mini" type="warning" @click="download()"
-              >导出</el-button
-            >
+            <el-button size="mini" type="warning" @click="download()">导出</el-button>
           </el-form-item>
 
           <el-row :gutter="10" class="mb8">
             <el-col :span="1.5">
-              <el-button
-                type="primary"
-                plain
-                icon="el-icon-plus"
-                size="mini"
-                @click="add({ id: content.id }, 'erji', content.channelName)"
-                >新增</el-button
-              >
+              <el-button type="primary" plain icon="el-icon-plus" size="mini"
+                @click="add({ id: content.id }, 'erji', content.channelName)">新增</el-button>
             </el-col>
             <el-col :span="1.5">
-              <el-button
-                type="info"
-                icon="el-icon-upload2"
-                size="mini"
-                @click="init()"
-                >刷新</el-button
-              >
+              <el-button type="info" icon="el-icon-upload2" size="mini" @click="init()">刷新</el-button>
             </el-col>
           </el-row>
         </el-form>
@@ -123,52 +86,30 @@
         <template #default>
           <vxe-toolbar>
             <template #buttons>
-              <vxe-input
-                v-model="channelogParam.notes"
-                type="search"
-                clearable
-                placeholder="搜索操作记录"
-              ></vxe-input>
-              <vxe-input
-                v-model="channelogParam.userName"
-                type="search"
-                clearable
-                placeholder="搜索操作人"
-              ></vxe-input>
+              <vxe-input v-model="channelogParam.notes" type="search" clearable placeholder="搜索操作记录"></vxe-input>
+              <vxe-input v-model="channelogParam.userName" type="search" clearable placeholder="搜索操作人"></vxe-input>
               <vxe-button @click="searchEvent" content="搜索"></vxe-button>
             </template>
           </vxe-toolbar>
 
           <vxe-table auto-resize height="600" :data="channelog">
-            <vxe-table-column
-              field="createTime"
-              title="时间"
-            ></vxe-table-column>
+            <vxe-table-column field="createTime" title="时间"></vxe-table-column>
             <vxe-table-column field="notes" title="操作记录">
               <template slot-scope="props">
                 <div v-html="props.row.notes"></div>
               </template>
             </vxe-table-column>
-            <vxe-table-column
-              field="userName"
-              title="操作人"
-            ></vxe-table-column>
+            <vxe-table-column field="userName" title="操作人"></vxe-table-column>
           </vxe-table>
-          <vxe-pager
-            :loading="loading"
-            :current-page="channelogParam.pageNum"
-            :page-size="channelogParam.pageSize"
-            :total="channelogParam.totalResult"
-            :layouts="[
+          <vxe-pager :loading="loading" :current-page="channelogParam.pageNum" :page-size="channelogParam.pageSize"
+            :total="channelogParam.totalResult" :layouts="[
               'PrevPage',
               'JumpNumber',
               'NextPage',
               'FullJump',
               'Sizes',
               'Total',
-            ]"
-            @page-change="handlePageChangeChannelog"
-          />
+            ]" @page-change="handlePageChangeChannelog" />
         </template>
       </vxe-modal>
       <!-- 同步 -->
@@ -176,15 +117,8 @@
         <template #default>
           <el-form ref="form" label-width="80px">
             <el-form-item label="选择时间">
-              <el-date-picker
-                v-model="pushdataDate"
-                type="daterange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                format="yyyy 年 MM 月 dd 日"
-                value-format="yyyy-MM-dd"
-              >
+              <el-date-picker v-model="pushdataDate" type="daterange" range-separator="至" start-placeholder="开始日期"
+                end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
               </el-date-picker>
             </el-form-item>
             <el-form-item>
@@ -211,41 +145,11 @@
         <el-table-column prop="onlineTime" label="生效时间"> </el-table-column>
         <el-table-column prop="channelCode" label="操作">
           <template #default="{ row }">
-            <el-button
-              @click="toEdit(row.id, 'erji')"
-              size="mini"
-              type="text"
-              icon="el-icon-edit"
-              >编辑</el-button
-            >
-            <el-button
-              @click="checkpushdata(row)"
-              size="mini"
-              type="text"
-              icon="el-icon-edit"
-              >查询同步</el-button
-            >
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-plus"
-              @click="copy(row)"
-              >复制链接</el-button
-            >
-            <el-button
-              @click="giveShort(row)"
-              size="mini"
-              type="text"
-              icon="el-icon-share"
-              >短链接</el-button
-            >
-            <el-button
-              @click="ewm(row)"
-              size="mini"
-              type="text"
-              icon="el-icon-mobile-phone"
-              >二维码</el-button
-            >
+            <el-button @click="toEdit(row.id, 'erji')" size="mini" type="text" icon="el-icon-edit">编辑</el-button>
+            <el-button @click="checkpushdata(row)" size="mini" type="text" icon="el-icon-edit">查询同步</el-button>
+            <el-button size="mini" type="text" icon="el-icon-plus" @click="copy(row)">复制链接</el-button>
+            <el-button @click="giveShort(row)" size="mini" type="text" icon="el-icon-share">短链接</el-button>
+            <el-button @click="ewm(row)" size="mini" type="text" icon="el-icon-mobile-phone">二维码</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -254,185 +158,178 @@
 </template>
 
 <script>
-import { post, get, getExport } from "@/api/common";
-import QRCode from "qrcodejs2";
-import axios from "axios";
-import { getToken } from "../../utils/auth";
-import XEUtils from "xe-utils";
+  import {
+    post,
+    get,
+    getExport
+  } from "@/api/common";
+  import QRCode from "qrcodejs2";
+  import axios from "axios";
+  import {
+    getToken
+  } from "../../utils/auth";
+  import XEUtils from "xe-utils";
 
-export default {
-  name: "SchemeEdit",
-  data() {
-    return {
-      id: this.$route.query.id,
-      searchForm: {
-        channelName: "",
-        channelPartner: "",
-        parentId: 0,
-        pageNum: 1,
-        pageNo: 1,
-        pageSize: 10,
-        totalResult: 0,
-      },
-      pageNo: 1,
-      total: 100,
-      pageSizes: 20,
-      initfrom: {
-        channelName: "",
-        pageNo: 1,
-        pageSizes: 10,
-      },
-      loading: false,
-      tableData: [],
-      content: {
+  export default {
+    name: "SchemeEdit",
+    data() {
+      return {
         id: this.$route.query.id,
-      },
-      strategyStatus: [
-        {
-          label: "生效中",
-          value: "1",
-        },
-        {
-          label: "未生效",
-          value: "0",
-        },
-      ],
-      typeList: [
-        {
-          value: "集团渠道",
-          label: "集团渠道",
-        },
-        {
-          value: "省分线下渠道",
-          label: "省分线下渠道",
-        },
-        {
-          value: "省分线上渠道",
-          label: "省分线上渠道",
-        },
-        {
-          value: "互联网渠道",
-          label: "互联网渠道",
-        },
-        {
-          value: "自有线上渠道",
-          label: "自有线上渠道",
+        searchForm: {
+          channelName: "",
+          channelPartner: "",
+          parentId: 0,
+          pageNum: 1,
+          pageNo: 1,
+          pageSize: 10,
+          totalResult: 0,
         },
-        {
-          value: "社会代理和其他渠道",
-          label: "社会代理和其他渠道",
-        },
-      ],
-      patnerList: [
-        {
-          value: "0",
-          label: "V1",
+        pageNo: 1,
+        total: 100,
+        pageSizes: 20,
+        initfrom: {
+          channelName: "",
+          pageNo: 1,
+          pageSizes: 10,
         },
-        {
-          value: "1",
-          label: "V2",
+        loading: false,
+        tableData: [],
+        content: {
+          id: this.$route.query.id,
         },
-      ],
+        strategyStatus: [{
+            label: "生效中",
+            value: "1",
+          },
+          {
+            label: "未生效",
+            value: "0",
+          },
+        ],
+        typeList: [{
+            value: "集团渠道",
+            label: "集团渠道",
+          },
+          {
+            value: "省分线下渠道",
+            label: "省分线下渠道",
+          },
+          {
+            value: "省分线上渠道",
+            label: "省分线上渠道",
+          },
+          {
+            value: "互联网渠道",
+            label: "互联网渠道",
+          },
+          {
+            value: "自有线上渠道",
+            label: "自有线上渠道",
+          },
+          {
+            value: "社会代理和其他渠道",
+            label: "社会代理和其他渠道",
+          },
+        ],
+        patnerList: [{
+            value: "0",
+            label: "V1",
+          },
+          {
+            value: "1",
+            label: "V2",
+          },
+        ],
 
-      dialogVisible: false,
+        dialogVisible: false,
 
-      value5: false,
-      pushdata: false,
-      pushdataDate: "",
-      channelog: [],
-      channelogList: [],
-      filterName1: "",
-      channelogParam: {
-        channelId: this.$route.query.id,
-        pageNo: 1,
-        pageSize: 10,
-      },
-      oldform: {},
-    };
-  },
-  watch: {
-    value5(val) {
-      if (val) {
-        console.log(val, "val");
-        get("/channel/log/page", this.channelogParam).then((res) => {
-          // console.log(this.channelogParam, "历史记录");
-          // console.log(res, "历史记录");
-          this.channelog = res.data.list;
-          this.channelogParam.totalResult = res.data.total;
-        });
-        this.channelogParam.pageSize = 100;
-        get("/channel/log/page", this.channelogParam).then((res) => {
-          this.channelogList = JSON.parse(JSON.stringify(res.data.list));
-        });
-      }
+        value5: false,
+        pushdata: false,
+        pushdataDate: "",
+        channelog: [],
+        channelogList: [],
+        filterName1: "",
+        channelogParam: {
+          channelId: this.$route.query.id,
+          pageNo: 1,
+          pageSize: 10,
+        },
+        oldform: {},
+      };
     },
-  },
-  created() {
-    // console.log(this.initfrom);
-    // 在哪呢?
-    this.getSecondList();
-  },
-  methods: {
-    //获取列表
-    getSecondList() {
-      document.title = "一级渠道详情";
-      this.searchForm.parentId = this.$route.query.id;
-      get("/channel/info/get", {
-        id: this.$route.query.id,
-      }).then((res) => {
-        // console.log(res, "一级列表详情");
-        this.content = res.data;
-        this.total = res.data.total;
-      });
-      this.init();
-      // console.log(this.$route.query.id);
+    watch: {
+      value5(val) {
+        if (val) {
+          console.log(val, "val");
+          get("/channel/log/page", this.channelogParam).then((res) => {
+            // console.log(this.channelogParam, "历史记录");
+            // console.log(res, "历史记录");
+            this.channelog = res.data.list;
+            this.channelogParam.totalResult = res.data.total;
+          });
+          this.channelogParam.pageSize = 100;
+          get("/channel/log/page", this.channelogParam).then((res) => {
+            this.channelogList = JSON.parse(JSON.stringify(res.data.list));
+          });
+        }
+      },
     },
-
-    pagination(page) {
-      this.pageNo = page.page;
-      // 重新获取列表数据
+    created() {
+      // console.log(this.initfrom);
+      // 在哪呢?
       this.getSecondList();
     },
-    search() {
-      get("/channel/info/listChannels", this.searchForm).then((res) => {
-        console.log(res);
-        this.tableData=res.data.list
-      });
-    },
+    methods: {
+      //重置
+      reset() {
 
-    // 一级编辑
-    oneTOEdit(id) {
-      this.$router.push("/channel/channelEdit?ids=" + id);
-    },
-    //二级编辑
-    toEdit(id, type) {
-      this.$router.push("/channel/channelEdit?ids=" + id);
-    },
+      },
 
-    formatterWotv({ cellValue }) {
-      return cellValue !== "1" ? "关闭" : "开启";
-    },
-    //复制链接
-    copy(row) {
-      let oInput = document.createElement("input");
-      oInput.value = `https://operation.mige.tv/a/#/${row.channelKey}`;
-      document.body.appendChild(oInput);
-      oInput.select(); // 选择对象;
-      document.execCommand("Copy"); // 执行浏览器复制命令
-      this.$message({
-        message: "复制成功",
-        type: "success",
-      });
-      oInput.remove();
-    },
-    //短链接
-    giveShort(row) {
-      let stUrl = row.shortUrl;
-      // console.log(row);
-      if (stUrl) {
-        // console.log(111);
+      //获取列表
+      getSecondList() {
+        document.title = "一级渠道详情";
+        this.searchForm.parentId = this.$route.query.id;
+        get("/channel/info/get", {
+          id: this.$route.query.id,
+        }).then((res) => {
+          // console.log(res, "一级列表详情");
+          this.content = res.data;
+          this.total = res.data.total;
+        });
+        this.init();
+        // console.log(this.$route.query.id);
+      },
+
+      pagination(page) {
+        this.pageNo = page.page;
+        // 重新获取列表数据
+        this.getSecondList();
+      },
+      search() {
+        get("/channel/info/listChannels", this.searchForm).then((res) => {
+          console.log(res);
+          this.tableData = res.data.list
+        });
+      },
+
+      // 一级编辑
+      oneTOEdit(id) {
+        this.$router.push("/channel/channelEdit?ids=" + id);
+      },
+      //二级编辑
+      toEdit(id, type) {
+        this.$router.push("/channel/channelEdit?ids=" + id);
+      },
+
+      formatterWotv({
+        cellValue
+      }) {
+        return cellValue !== "1" ? "关闭" : "开启";
+      },
+      //复制链接
+      copy(row) {
         let oInput = document.createElement("input");
-        oInput.value = `http://v.mige.tv/${stUrl}`;
+        oInput.value = `https://operation.mige.tv/a/#/${row.channelKey}`;
         document.body.appendChild(oInput);
         oInput.select(); // 选择对象;
         document.execCommand("Copy"); // 执行浏览器复制命令
@@ -441,18 +338,15 @@ export default {
           type: "success",
         });
         oInput.remove();
-      } else {
-        // console.log(222);
-        let data = {
-          channel: row.channelKey,
-          longUrl: `https://operation.mige.tv/a/#/${row.channelKey}`,
-        };
-        // console.log(data);
-        post("/channel/info/shorturl", data).then((res) => {
-          // console.log(res);
-          let resUrl = res.data.shortCode;
+      },
+      //短链接
+      giveShort(row) {
+        let stUrl = row.shortUrl;
+        // console.log(row);
+        if (stUrl) {
+          // console.log(111);
           let oInput = document.createElement("input");
-          oInput.value = `http://v.mige.tv/${resUrl}`;
+          oInput.value = `http://v.mige.tv/${stUrl}`;
           document.body.appendChild(oInput);
           oInput.select(); // 选择对象;
           document.execCommand("Copy"); // 执行浏览器复制命令
@@ -461,180 +355,205 @@ export default {
             type: "success",
           });
           oInput.remove();
-        });
-      }
-    },
-
-    //导出
-    download() {
-      getExport("/channel/info/export-excel").then((res) => {
-        // let loading = this.$loading({
-        //   lock: true,
-        //   text: "下载量较大,请耐心等待",
-        //   spinner: "el-icon-loading",
-        //   background: "rgba(0, 0, 0, 0.7)",
-        // });
-        // 导出成功
-        if (res) {
-          // 关闭提示
-          // loading.close();
-          // excle配置;
-          let a = document.createElement("a");
-          let blob = new Blob([res.data], {
-            type: "application/vnd.ms-excel",
+        } else {
+          // console.log(222);
+          let data = {
+            channel: row.channelKey,
+            longUrl: `https://operation.mige.tv/a/#/${row.channelKey}`,
+          };
+          // console.log(data);
+          post("/channel/info/shorturl", data).then((res) => {
+            // console.log(res);
+            let resUrl = res.data.shortCode;
+            let oInput = document.createElement("input");
+            oInput.value = `http://v.mige.tv/${resUrl}`;
+            document.body.appendChild(oInput);
+            oInput.select(); // 选择对象;
+            document.execCommand("Copy"); // 执行浏览器复制命令
+            this.$message({
+              message: "复制成功",
+              type: "success",
+            });
+            oInput.remove();
           });
-          let objectUrl = URL.createObjectURL(blob);
-          a.setAttribute("href", objectUrl);
-          a.setAttribute("download", "渠道数据.xls");
-          a.click();
-          URL.revokeObjectURL(a.objectUrl);
         }
-      });
-    },
-    handlePageChange({ currentPage, pageSize }) {
-      this.searchForm.pageNum = currentPage;
-      this.searchForm.pageSize = pageSize;
-      this.init();
-    },
-    handlePageChangeChannelog({ currentPage, pageSize }) {
-      this.channelogParam.pageNum = currentPage;
-      this.channelogParam.pageSize = pageSize;
-      get("/channelInfo/channelogpage", this.channelogParam).then((res) => {
-        this.channelog = res.data.list;
-        this.channelogParam.totalResult = res.data.total;
-      });
-    },
-    init() {
-      get("/channel/info/listChannels", this.initfrom).then((res) => {
-        // console.log(this.$route.query.id);
-        let secondList = res.data.list.filter((item) => {
-          return item.parentId == this.$route.query.id;
+      },
+
+      //导出
+      download() {
+        getExport("/channel/info/export-excel").then((res) => {
+          // let loading = this.$loading({
+          //   lock: true,
+          //   text: "下载量较大,请耐心等待",
+          //   spinner: "el-icon-loading",
+          //   background: "rgba(0, 0, 0, 0.7)",
+          // });
+          // 导出成功
+          if (res) {
+            // 关闭提示
+
+            let a = document.createElement("a");
+            let blob = new Blob([res.data], {
+              type: "application/vnd.ms-excel",
+            });
+            let objectUrl = URL.createObjectURL(blob);
+            a.setAttribute("href", objectUrl);
+            a.setAttribute("download", "渠道数据.xls");
+            a.click();
+            URL.revokeObjectURL(a.objectUrl);
+          }
         });
-        this.tableData = secondList;
-        this.total = res.data.total;
-        this.oldform = secondList;
-        // console.log(this.tableData, "一级下的二级");
-      });
-    },
+      },
+      handlePageChange({
+        currentPage,
+        pageSize
+      }) {
+        this.searchForm.pageNum = currentPage;
+        this.searchForm.pageSize = pageSize;
+        this.init();
+      },
+      handlePageChangeChannelog({
+        currentPage,
+        pageSize
+      }) {
+        this.channelogParam.pageNum = currentPage;
+        this.channelogParam.pageSize = pageSize;
+        get("/channelInfo/channelogpage", this.channelogParam).then((res) => {
+          this.channelog = res.data.list;
+          this.channelogParam.totalResult = res.data.total;
+        });
+      },
+      init() {
+        get("/channel/info/listChannels", this.initfrom).then((res) => {
+          // console.log(this.$route.query.id);
+          let secondList = res.data.list.filter((item) => {
+            return item.parentId == this.$route.query.id;
+          });
+          this.tableData = secondList;
+          this.total = res.data.total;
+          this.oldform = secondList;
+          // console.log(this.tableData, "一级下的二级");
+        });
+      },
 
-    searchEvent() {
-      get("/channelInfo/channelogpage", this.channelogParam).then((res) => {
-        this.channelog = res.data.list;
-        this.channelogParam.totalResult = res.data.total;
-      });
-    },
-    ewm(row) {
-      this.dialogVisible = true;
-      this.$nextTick(function () {
-        document.getElementById("qrcode").innerHTML = "";
-        let qrcode = new QRCode("qrcode", {
-          width: 300,
-          height: 300,
-          text: `https://operation.mige.tv/a/#/${row.channelKey}`,
+      searchEvent() {
+        get("/channelInfo/channelogpage", this.channelogParam).then((res) => {
+          this.channelog = res.data.list;
+          this.channelogParam.totalResult = res.data.total;
         });
-      });
-    },
-    // onSubmit() {
-    //   post(
-    //     "/channelInfo/pushdata?beginTime=" +
-    //       this.pushdataDate[0] +
-    //       "&endTime=" +
-    //       this.pushdataDate[1],
-    //     {}
-    //   ).then((res) => {
-    //     this.$message({
-    //       message: res.message,
-    //       type: "success",
-    //     });
-    //     this.pushdata = false;
-    //   });
-    // },
-    checkpushdata(e) {
-      get("/channelInfo/detail", {
-        id: e.id,
-      }).then((res1) => {
-        id;
-        let channel = res1.data;
-        get("/channelInfo/checkpushdata", {
-          fullCode: channel.fullCode,
-        }).then((res) => {
-          let data = JSON.parse(res.data)[0];
-          if (data.resdesc == "ok" && data.subchannelkey !== "null") {
-            this.$message({
-              message: data.subchannelname + "已同步",
-              type: "success",
-            });
-          } else {
-            let bigentime = channel.createTime;
-            let endtime = this.dateNew(new Date(bigentime).getTime() + 3600000);
-            this.pushdataDate = [bigentime, endtime];
-            post(
-              "/channelInfo/pushdata?beginTime=" +
-                this.pushdataDate[0] +
-                "&endTime=" +
-                this.pushdataDate[1],
-              {}
-            ).then((res) => {
-              // console.log(res);
+      },
+      ewm(row) {
+        this.dialogVisible = true;
+        this.$nextTick(function () {
+          document.getElementById("qrcode").innerHTML = "";
+          let qrcode = new QRCode("qrcode", {
+            width: 300,
+            height: 300,
+            text: `https://operation.mige.tv/a/#/${row.channelKey}`,
+          });
+        });
+      },
+      // onSubmit() {
+      //   post(
+      //     "/channelInfo/pushdata?beginTime=" +
+      //       this.pushdataDate[0] +
+      //       "&endTime=" +
+      //       this.pushdataDate[1],
+      //     {}
+      //   ).then((res) => {
+      //     this.$message({
+      //       message: res.message,
+      //       type: "success",
+      //     });
+      //     this.pushdata = false;
+      //   });
+      // },
+      checkpushdata(e) {
+        get("/channelInfo/detail", {
+          id: e.id,
+        }).then((res1) => {
+          id;
+          let channel = res1.data;
+          get("/channelInfo/checkpushdata", {
+            fullCode: channel.fullCode,
+          }).then((res) => {
+            let data = JSON.parse(res.data)[0];
+            if (data.resdesc == "ok" && data.subchannelkey !== "null") {
               this.$message({
-                message: channel.channelName + "同步成功",
+                message: data.subchannelname + "已同步",
                 type: "success",
               });
-              // console.log("success");
-            });
-          }
+            } else {
+              let bigentime = channel.createTime;
+              let endtime = this.dateNew(new Date(bigentime).getTime() + 3600000);
+              this.pushdataDate = [bigentime, endtime];
+              post(
+                "/channelInfo/pushdata?beginTime=" +
+                this.pushdataDate[0] +
+                "&endTime=" +
+                this.pushdataDate[1], {}
+              ).then((res) => {
+                // console.log(res);
+                this.$message({
+                  message: channel.channelName + "同步成功",
+                  type: "success",
+                });
+                // console.log("success");
+              });
+            }
+          });
         });
-      });
-    },
-    // dateNew(timestamp) {
-    //   var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
-    //   var Y = date.getFullYear() + "-";
-    //   var M =
-    //     (date.getMonth() + 1 < 10
-    //       ? "0" + (date.getMonth() + 1)
-    //       : date.getMonth() + 1) + "-";
-    //   // var D = date.getDate() + ' ';
-    //   var D =
-    //     (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
-    //   var h = date.getHours() + ":";
-    //   var m = date.getMinutes() + ":";
-    //   var s = date.getSeconds();
-    //   return Y + M + D + h + m + s;
-    // },
+      },
+      // dateNew(timestamp) {
+      //   var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
+      //   var Y = date.getFullYear() + "-";
+      //   var M =
+      //     (date.getMonth() + 1 < 10
+      //       ? "0" + (date.getMonth() + 1)
+      //       : date.getMonth() + 1) + "-";
+      //   // var D = date.getDate() + ' ';
+      //   var D =
+      //     (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
+      //   var h = date.getHours() + ":";
+      //   var m = date.getMinutes() + ":";
+      //   var s = date.getSeconds();
+      //   return Y + M + D + h + m + s;
+      // },
 
-    // editClosedEvent({ row, column }) {
-    //   const $table = this.$refs.xTable;
-    //   const field = column.property;
-    //   const cellValue = row[field];
-    //   // 判断单元格值是否被修改
-    //   if ($table.isUpdateByRow(row, field)) {
-    //     setTimeout(() => {
-    //       let param = {};
-    //       param[field] = cellValue;
-    //       post("/channelInfo/update/" + row.id, row).then((res) => {
-    //         this.$message({
-    //           message: res.message,
-    //           type: "success",
-    //         });
-    //       });
-    //       // 局部更新单元格为已保存状态
-    //       $table.reloadRow(row, null, field);
-    //     }, 300);
-    //   }
-    // },
+      // editClosedEvent({ row, column }) {
+      //   const $table = this.$refs.xTable;
+      //   const field = column.property;
+      //   const cellValue = row[field];
+      //   // 判断单元格值是否被修改
+      //   if ($table.isUpdateByRow(row, field)) {
+      //     setTimeout(() => {
+      //       let param = {};
+      //       param[field] = cellValue;
+      //       post("/channelInfo/update/" + row.id, row).then((res) => {
+      //         this.$message({
+      //           message: res.message,
+      //           type: "success",
+      //         });
+      //       });
+      //       // 局部更新单元格为已保存状态
+      //       $table.reloadRow(row, null, field);
+      //     }, 300);
+      //   }
+      // },
 
-    add(e, type, channelName) {
-      this.$router.push(
-        "/channel/channelEdit?id=" +
+      add(e, type, channelName) {
+        this.$router.push(
+          "/channel/channelEdit?id=" +
           e.id +
           "&type=" +
           type +
           "&firstChannelName=" +
           channelName
-      );
+        );
+      },
     },
-  },
-};
+  };
+
 </script>
 
 <style scoped></style>

+ 56 - 69
admin/src/views/model/index.vue

@@ -38,16 +38,7 @@
     </el-container>
 
     <!--新增抽屉-->
-    <el-drawer
-      ref="addDrawer"
-      title="新增模板"
-      size="50%"
-      :before-close="addHandleClose"
-      :with-header="false"
-      :visible.sync="addDialog"
-      direction="rtl"
-      custom-class="demo-drawer"
-    >
+    <el-drawer ref="addDrawer" title="新增模板" size="50%" :before-close="addHandleClose" :with-header="false" :visible.sync="addDialog" direction="rtl" custom-class="demo-drawer">
       <div class="demo-drawer__content">
         <span>编辑产品分类</span>
         <el-form :model="addForm">
@@ -57,17 +48,12 @@
           <el-form-item label="模板ID" label-width="80px">
             <el-input v-model="addForm.templateCode" autocomplete="off" />
           </el-form-item>
-          <el-form-item label="模板图示" label-width="80px">
-            <el-upload
-              class="avatar-uploader"
-              :action="imgapi"
-              :show-file-list="false"
-              :on-success="picPreview"
-            >
+          <!-- <el-form-item label="模板图示" label-width="80px">
+            <el-upload class="avatar-uploader" :action="imgapi" :show-file-list="false" :on-success="picPreview">
               <img v-if="picUrl" :src="picUrl" class="avatar">
               <i v-else class="el-icon-plus avatar-uploader-icon" />
             </el-upload>
-          </el-form-item>
+          </el-form-item>-->
         </el-form>
         <div class="demo-drawer__footer">
           <el-button @click="cancelForm">取 消</el-button>
@@ -77,16 +63,7 @@
     </el-drawer>
 
     <!--编辑抽屉-->
-    <el-drawer
-      ref="editDrawer"
-      title="编辑产品分类"
-      size="50%"
-      :before-close="editHandleClose"
-      :with-header="false"
-      :visible.sync="editDialog"
-      direction="rtl"
-      custom-class="demo-drawer"
-    >
+    <el-drawer ref="editDrawer" title="编辑产品分类" size="50%" :before-close="editHandleClose" :with-header="false" :visible.sync="editDialog" direction="rtl" custom-class="demo-drawer">
       <div class="demo-drawer__content">
         <span>编辑产品分类</span>
         <el-form :model="editForm">
@@ -96,17 +73,14 @@
           <el-form-item label="模板ID" label-width="80px">
             <el-input v-model="editForm.templateCode" disabled autocomplete="off" />
           </el-form-item>
-          <el-form-item label="模板图示" label-width="80px">
-            <el-upload
-              class="avatar-uploader"
-              :action="imgapi"
-              :show-file-list="false"
-              :on-success="picPreview"
-            >
+
+          <!--<el-form-item label="模板图示" label-width="80px">
+            <el-upload class="avatar-uploader" :action="imgapi" :show-file-list="false" :on-success="picPreview">
               <img v-if="picUrl" :src="picUrl" class="avatar">
               <i v-else class="el-icon-plus avatar-uploader-icon" />
             </el-upload>
-          </el-form-item>
+          </el-form-item>-->
+
         </el-form>
         <div class="demo-drawer__footer">
           <el-button @click="cancelForm">取 消</el-button>
@@ -119,10 +93,10 @@
 </template>
 
 <script>
-import { post, get } from '@/api/common'
+import { post, get, put, del } from '@/api/common'
 export default {
   name: 'ProduceClass',
-  data() {
+  data () {
     return {
       lin: 'https://img.zcool.cn/community/017a155cf0ed61a801213ec229ad50.jpg@1280w_1l_2o_100sh.jpg',
       picUrl: '',
@@ -132,9 +106,9 @@ export default {
       editDialog: false,
       addDialog: false,
       searchForm: {
-        templateName: '',
-        templateCode: '',
-        pageSize: 200,
+        templateName: null,
+        templateCode: null,
+        pageSize: 100,
         pageNum: 1
       },
       addForm: {
@@ -151,45 +125,51 @@ export default {
       total: 5000
     }
   },
-  created() {
+  created () {
     var that = this
     that.search()
   },
   methods: {
-    async search() { // 同步搜索
-      await get('/templateInfo/page', this.searchForm)
+    async search () { // 同步搜索
+      await get('/template/template-info/page', this.searchForm)
         .then((res) => {
+          console.log(res)
           this.tableData = res.data.list
-          console.log(this.tableData)
+          // console.log(this.tableData)
           this.total = res.data.total
         }).catch((err) => {
           console.log(err)
         })
     },
-    searchBtn() { // 搜索按钮
-      this.search()
+    searchBtn () { // 搜索按钮
+      if (!this.searchForm.templateName || !this.searchForm.templateCode) {
+        this.$message.error("请输入内容")
+      } else {
+        this.search()
+      }
+
     },
-    reset() { // 重置
+    reset () { // 重置
       this.searchForm = {
         cpid: '',
         categoryName: '',
-        pageSize: 200,
+        pageSize: 100,
         pageNum: 1
       }
       this.search()
     },
-    add() { // 新增
+    add () { // 新增
       this.addDialog = true
     },
-    addHandleClose(done) { // 新增数据
+    addHandleClose (done) { // 新增数据
       if (this.loading) return
       this.$confirm('确定要提交吗?')
         .then(_ => {
           done()
           this.addDialog = true
-          post('/templateInfo/create', this.addForm)
+          post('/template/template-info/create', this.addForm)
             .then((res) => {
-              if (res.code === 10000) this.reset()
+              if (res.code === 0) this.reset()
               setTimeout(() => {
                 this.addDialog = false
               }, 400)
@@ -202,19 +182,19 @@ export default {
           this.addDialog = false
         })
     },
-    edit(e) { // 编辑
+    edit (e) { // 编辑
       this.editForm = e
       this.editDialog = true
     },
-    editHandleClose(done) { // 修改数据
+    editHandleClose (done) { // 修改数据
       if (this.loading) return
       this.$confirm('确定要提交吗?')
         .then(_ => {
           done()
           this.editDialog = true
-          post('/templateInfo/update/' + this.editForm.id, this.editForm)
+          put('/template/template-info/update', this.editForm)
             .then((res) => {
-              if (res.code === 10000) this.reset()
+              if (res.code === 0) this.reset()
               setTimeout(() => {
                 this.editDialog = false
               }, 400)
@@ -227,32 +207,32 @@ export default {
           this.editDialog = false
         })
     },
-    dele(e) { // 删除
+    dele (id) { // 删除
       this.$confirm('确定要删除么?')
         .then(_ => {
-          post('/templateInfo/delete', { ids: [e] })
+          del('/template/template-info/delete', { id })
             .then((res) => {
-              if (res.code === 10000) this.reset()
+              if (res.code === 0) this.reset()
             })
         })
     },
-    cancelForm() { // 关闭抽屉
+    cancelForm () { // 关闭抽屉
       console.log(123)
       this.loading = false
       this.editDialog = false
       this.addDialog = false
       clearTimeout(this.timer)
     },
-    picPreview(file) {
+    picPreview (file) {
       this.picUrl = process.env.VUE_APP_BASE_IMG_URL + file.data
       this.editForm.templatePhoto = file.data
       this.addForm.templatePhoto = file.data
     },
-    handleSizeChange(e) { // 单页数量
+    handleSizeChange (e) { // 单页数量
       this.searchForm.pageSize = e
       this.search()
     },
-    handleCurrentChange(e) { // 跳页
+    handleCurrentChange (e) { // 跳页
       this.searchForm.pageNum = e
       this.search()
     }
@@ -270,9 +250,16 @@ export default {
     margin: auto;
   }
 }
-.el-header {padding: 20px}
-.el-form-item {margin-bottom: unset}
-.flex {display: flex;justify-content: flex-end}
+.el-header {
+  padding: 20px;
+}
+.el-form-item {
+  margin-bottom: unset;
+}
+.flex {
+  display: flex;
+  justify-content: flex-end;
+}
 .listBox {
   margin-top: 20px;
   background-color: #fff;
@@ -292,7 +279,7 @@ export default {
       color: #333333;
       line-height: 24px;
       padding: 3px 15px;
-      a{
+      a {
         color: #20a0ff;
         padding: 0 10px;
       }
@@ -336,7 +323,7 @@ export default {
   border-radius: 6px;
 }
 .avatar-uploader-icon:hover {
-  border-color: #409EFF;
+  border-color: #409eff;
 }
 .avatar {
   width: 148px;

+ 44 - 102
admin/src/views/produce/produceClass/index.vue

@@ -6,10 +6,7 @@
       <el-header class="searchBox">
         <el-form :inline="true" :model="searchForm" class="demo-form-inline">
           <el-form-item label="分类名称">
-            <el-input
-              v-model="searchForm.categoryName"
-              placeholder="分类名称"
-            />
+            <el-input v-model="searchForm.categoryName" placeholder="分类名称" />
           </el-form-item>
           <el-form-item label="CPID">
             <el-input v-model="searchForm.cpid" placeholder="CPID" />
@@ -23,13 +20,7 @@
 
       <!--表格-->
       <el-main class="tableBox">
-        <el-button
-          style="float: right"
-          type="warning"
-          icon="el-icon-circle-plus-outline"
-          @click="add"
-          >立即创建</el-button
-        >
+        <el-button style="float: right" type="warning" icon="el-icon-circle-plus-outline" @click="add">立即创建</el-button>
         <el-table :data="tableData" stripe style="width: 100%">
           <el-table-column prop="parentCategory" label="产品大类" />
           <el-table-column prop="categoryName" label="分类名称" />
@@ -38,43 +29,19 @@
           <el-table-column prop="createTime" label="创建时间" />
           <el-table-column fixed="right" label="操作" width="100">
             <template slot-scope="scope">
-              <el-button
-                type="text"
-                size="small"
-                @click="edit(scope.row.id, scope.row)"
-                >编辑</el-button
-              >
-              <el-button type="text" size="small" @click="dele(scope.row.id)"
-                >删除</el-button
-              >
+              <el-button type="text" size="small" @click="edit(scope.row.id, scope.row)">编辑</el-button>
+              <el-button type="text" size="small" @click="dele(scope.row.id)">删除</el-button>
             </template>
           </el-table-column>
         </el-table>
         <div class="block">
-          <el-pagination
-            :current-page.sync="searchForm['pageNum']"
-            :page-sizes="[20, 50, 100, 300]"
-            :page-size="searchForm['pageSize']"
-            layout="total, sizes, pager"
-            :total="total"
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-          />
+          <el-pagination :current-page.sync="searchForm['pageNum']" :page-sizes="[20, 50, 100, 300]" :page-size="searchForm['pageSize']" layout="total, sizes, pager" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
         </div>
       </el-main>
     </el-container>
 
     <!--新增抽屉-->
-    <el-drawer
-      ref="addDrawer"
-      title="编辑产品分类"
-      size="50%"
-      :before-close="addHandleClose"
-      :with-header="false"
-      :visible.sync="addDialog"
-      direction="rtl"
-      custom-class="demo-drawer"
-    >
+    <el-drawer ref="addDrawer" title="编辑产品分类" size="50%" :before-close="addHandleClose" :with-header="false" :visible.sync="addDialog" direction="rtl" custom-class="demo-drawer">
       <div class="demo-drawer__content">
         <span>编辑产品分类</span>
         <el-form :model="addForm">
@@ -88,36 +55,18 @@
             <el-input v-model="addForm.parentCategory" autocomplete="off" />
           </el-form-item>
           <el-form-item label="会员pwd" label-width="80px">
-            <el-input
-              v-model="addForm.pwd"
-              placeholder="科创会员兑换专用pwd,根据映射表填写"
-              autocomplete="off"
-            />
+            <el-input v-model="addForm.pwd" placeholder="科创会员兑换专用pwd,根据映射表填写" autocomplete="off" />
           </el-form-item>
         </el-form>
         <div class="demo-drawer__footer">
           <el-button @click="cancelForm">取 消</el-button>
-          <el-button
-            type="primary"
-            :loading="loading"
-            @click="$refs.addDrawer.closeDrawer()"
-            >{{ loading ? "提交中 ..." : "确 定" }}</el-button
-          >
+          <el-button type="primary" :loading="loading" @click="$refs.addDrawer.closeDrawer()">{{ loading ? "提交中 ..." : "确 定" }}</el-button>
         </div>
       </div>
     </el-drawer>
 
     <!--编辑抽屉-->
-    <el-drawer
-      ref="editDrawer"
-      title="编辑产品分类"
-      size="50%"
-      :before-close="editHandleClose"
-      :with-header="false"
-      :visible.sync="editDialog"
-      direction="rtl"
-      custom-class="demo-drawer"
-    >
+    <el-drawer ref="editDrawer" title="编辑产品分类" size="50%" :before-close="editHandleClose" :with-header="false" :visible.sync="editDialog" direction="rtl" custom-class="demo-drawer">
       <div class="demo-drawer__content">
         <span>编辑产品分类</span>
         <el-form :model="editForm">
@@ -131,21 +80,12 @@
             <el-input v-model="editForm.parentCategory" autocomplete="off" />
           </el-form-item>
           <el-form-item label="会员pwd" label-width="80px">
-            <el-input
-              v-model="editForm.pwd"
-              placeholder="科创会员兑换专用pwd,根据映射表填写"
-              autocomplete="off"
-            />
+            <el-input v-model="editForm.pwd" placeholder="科创会员兑换专用pwd,根据映射表填写" autocomplete="off" />
           </el-form-item>
         </el-form>
         <div class="demo-drawer__footer">
           <el-button @click="cancelForm">取 消</el-button>
-          <el-button
-            type="primary"
-            :loading="loading"
-            @click="$refs.editDrawer.closeDrawer()"
-            >{{ loading ? "提交中 ..." : "确 定" }}</el-button
-          >
+          <el-button type="primary" :loading="loading" @click="$refs.editDrawer.closeDrawer()">{{ loading ? "提交中 ..." : "确 定" }}</el-button>
         </div>
       </div>
     </el-drawer>
@@ -157,14 +97,14 @@ import { post, get, del, put } from "@/api/common";
 import getTime from "@/utils/getTime.js";
 export default {
   name: "ProduceClass",
-  data() {
+  data () {
     return {
       loading: false,
       editDialog: false,
       addDialog: false,
       searchForm: {
-        // cpid: "",
-        // categoryName: "",
+        cpid: null,
+        categoryName: null,
         pageSize: 20,
         pageNum: 1,
       },
@@ -186,12 +126,12 @@ export default {
     };
   },
 
-  created() {
+  created () {
     var that = this;
     that.search();
   },
   methods: {
-    getTimeStr(timeStamp) {
+    getTimeStr (timeStamp) {
       var now = new Date(timeStamp),
         y = now.getFullYear(),
         m = ("0" + (now.getMonth() + 1)).slice(-2),
@@ -199,7 +139,7 @@ export default {
       return y + "-" + m + "-" + d + " " + now.toTimeString().substr(0, 8);
     },
 
-    async search() {
+    async search () {
       // 同步搜索
 
       await get("/product/cpid-info/page", this.searchForm)
@@ -216,27 +156,28 @@ export default {
           console.log(err);
         });
     },
-    searchBtn() {
+    searchBtn () {
       //   // 搜索按钮
-      this.search();
+      if (!this.searchForm.categoryName || !this.searchForm.cpid) {
+        this.$message.error("请输入内容")
+      } else {
+        this.search();
+      }
+
     },
-    reset() {
+    reset () {
       //   // 重置
-      this.searchForm = {
-        cpid: "",
-        categoryName: "",
-        pageSize: 20,
-        pageNum: 1,
-      };
-      this.addForm = {
+      console.log("重置")
+      this.searchForm = {};
+      this.editForm = {
         cpid: "",
         categoryName: "",
-        pageSize: 20,
-        pageNum: 1,
-      };
-      this.search();
+        parentCategory: "",
+        pwd: "",
+        id: "",
+      }
     },
-    add() {
+    add () {
       // 新增
       this.addDialog = true;
       this.bannerList = [];
@@ -246,7 +187,7 @@ export default {
 
       this.search();
     },
-    addHandleClose(done) {
+    addHandleClose (done) {
       // 新增数据
       if (this.loading) return;
       this.$confirm("确定要提交吗?")
@@ -256,7 +197,8 @@ export default {
           post("/product/cpid-info/create", this.addForm)
             .then((res) => {
               if (res.code == 0) {
-                this.reset();
+                this.search();
+                this.reset()
                 console.log(res.code);
               }
               setTimeout(() => {
@@ -271,13 +213,13 @@ export default {
           this.addDialog = false;
         });
     },
-    edit(id, e) {
+    edit (id, e) {
       // 编辑
       this.editForm.id = id;
       this.editForm = e;
       this.editDialog = true;
     },
-    editHandleClose(done) {
+    editHandleClose (done) {
       // 修改数据
       if (this.loading) return;
       this.$confirm("确定要提交吗?")
@@ -287,7 +229,7 @@ export default {
           put("/product/cpid-info/update", this.editForm)
             .then((res) => {
               console.log(res);
-              if (res.code === 0) this.reset();
+              if (res.code === 0) this.search(); this.reset();
               setTimeout(() => {
                 this.editDialog = false;
               }, 400);
@@ -300,15 +242,15 @@ export default {
           this.editDialog = false;
         });
     },
-    dele(id) {
+    dele (id) {
       // 删除
       this.$confirm("确定要删除么?").then((_) => {
         del("/product/cpid-info/delete", { id }).then((res) => {
-          if (res.code === 0) this.reset();
+          if (res.code === 0) this.search(); this.reset();
         });
       });
     },
-    cancelForm() {
+    cancelForm () {
       // 关闭抽屉
       console.log(123);
       this.loading = false;
@@ -316,12 +258,12 @@ export default {
       this.addDialog = false;
       clearTimeout(this.timer);
     },
-    handleSizeChange(e) {
+    handleSizeChange (e) {
       // 单页数量
       this.searchForm.pageSize = e;
       // this.search()
     },
-    handleCurrentChange(e) {
+    handleCurrentChange (e) {
       // 跳页
       this.searchForm.pageNum = e;
       // this.search()

+ 1 - 1
admin/src/views/produce/productV2/addProduct.vue

@@ -523,7 +523,7 @@ export default {
       });
     },
     close() {
-      window.close();
+      this.$router.back()();
     },
     bannerSuccess(file, fileList) {
       this.bannerUrl = process.env.VUE_APP_BASE_IMG_URL + file.data;

+ 1 - 1
admin/src/views/produce/productV2/editProduct.vue

@@ -526,7 +526,7 @@ export default {
         });
     },
     close() {
-      window.close();
+      this.$router.back()();
     },
     bannerSuccess(file) {
       this.bannerUrl = process.env.VUE_APP_BASE_IMG_URL + file.data;

+ 56 - 60
admin/src/views/produce/productV2/productManagement.vue

@@ -3,41 +3,22 @@
     <el-row :gutter="24" class="rowBorder">
       <el-col :span="5">
         <span style="font-size: 14px; color: #606266; font-weight: bold">
-          产品名称:</span
-        >
-        <el-input
-          type="text"
-          v-model="productName"
-          style="width: 70%; margin-left: 15px"
-          placeholder="产品名称"
-        ></el-input>
+          产品名称:</span>
+        <el-input type="text" v-model="productName" style="width: 70%; margin-left: 15px" placeholder="产品名称"></el-input>
       </el-col>
       <el-col :span="5">
-        <span style="font-size: 14px; color: #606266; font-weight: bold"
-          >spid:</span
-        ><el-input
-          style="width: 70%; margin-left: 15px"
-          type="text"
-          v-model="spid"
-          placeholder="科创spid"
-        ></el-input>
+        <span style="font-size: 14px; color: #606266; font-weight: bold">spid:</span>
+        <el-input style="width: 70%; margin-left: 15px" type="text" v-model="spid" placeholder="科创spid"></el-input>
       </el-col>
       <el-col :offset="9" :span="3">
-        <el-button style="margin-left: 10px" type="primary" @click="search"
-          >搜索</el-button
-        >
+        <el-button style="margin-left: 10px" type="primary" @click="search">搜索</el-button>
         <el-button style="margin-left: 10px" @click="reset">重置</el-button>
       </el-col>
     </el-row>
-    <el-form
-      class="formBorder"
-      :model="productFrom"
-      label-width="0px"
-      style="margin-top: 20px"
-    >
+    <el-form class="formBorder" :model="productFrom" label-width="0px" style="margin-top: 20px">
       <el-form-item>
         <el-button style="float: left" @click="addPush"> 新增 </el-button>
-        <el-button style="float: left" @click="search"> 刷新 </el-button>
+        <el-button style="float: left" @click="init"> 刷新 </el-button>
       </el-form-item>
       <el-form-item>
         <vxe-table border :data="productFrom.productData">
@@ -56,16 +37,7 @@
         </vxe-table>
       </el-form-item>
       <el-form-item>
-        <el-pagination
-          style="float: right"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="productFrom.currenttPage"
-          :page-sizes="[10, 20, 30, 40, 50]"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="productFrom.total"
-          :page-size="productFrom.pageSize"
-        >
+        <el-pagination style="float: right" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="productFrom.currenttPage" :page-sizes="[10, 20, 30, 40, 50]" layout="total, sizes, prev, pager, next, jumper" :total="productFrom.total" :page-size="productFrom.pageSize">
         </el-pagination>
       </el-form-item>
     </el-form>
@@ -73,14 +45,21 @@
 </template>
 
 <script>
-import { post, get, del, put } from "@/api/common";
-import { quillEditor } from "vue-quill-editor";
+import {
+  post,
+  get,
+  del,
+  put
+} from "@/api/common";
+import {
+  quillEditor
+} from "vue-quill-editor";
 import getTime from "@/utils/getTime.js";
 export default {
   components: {
     quillEditor,
   },
-  data() {
+  data () {
     return {
       productName: "",
       spid: "",
@@ -92,11 +71,16 @@ export default {
       },
     };
   },
-  created() {
+  created () {
     this.getProductv2List();
   },
   methods: {
-    getTimeStr(timeStamp) {
+    init () {
+      this.getProductv2List()
+    },
+
+
+    getTimeStr (timeStamp) {
       var now = new Date(timeStamp),
         y = now.getFullYear(),
         m = ("0" + (now.getMonth() + 1)).slice(-2),
@@ -104,26 +88,26 @@ export default {
       return y + "-" + m + "-" + d + " " + now.toTimeString().substr(0, 8);
     },
 
-    getProductv2List() {
+    getProductv2List () {
       get("product/info/page").then((res) => {
         this.productFrom.productData = res.data.list;
         this.productFrom.total = res.data.total;
         this.productFrom.pageSize = res.data.pageSize;
         this.productFrom.currenttPage = res.data.pageNum;
 
-          this.productFrom.productData.forEach((item) => {
+        this.productFrom.productData.forEach((item) => {
           item.createTime = getTime(item.createTime);
         });
       });
     },
     // 编辑
-    edit(id) {
+    edit (id) {
       this.$router.push("/produce/productV2/editProduct?ids=" + id);
       // this.$router.push("../../produce/productV2/editProduct.vue");
     },
 
     // 新增/复制
-    addPush(row) {
+    addPush (row) {
       let id = row.id;
       console.log(id);
       if (row.id) {
@@ -134,39 +118,48 @@ export default {
         this.$router.push("/produce/productV2/addProduct");
       }
     },
-    dele(id) {
+    dele (id) {
       // 删除
       this.$confirm("确定要删除么?").then((_) => {
-        del("/product/info/delete", { id: id }).then((res) => {
+        del("/product/info/delete", {
+          id: id
+        }).then((res) => {
           if (res.code === 0) this.$message.success("删除成功");
           this.getProductv2List();
         });
       });
     },
     // 搜索
-    search() {
+    search () {
       let data = {
         pageNo: 1,
         pageSize: 100,
         productName: this.productName,
         spid: this.spid,
       };
-      get("/product/info/page", data).then((res) => {
-        console.log(res, "搜索");
-        // this.productFrom=res.data.list
-        // console.log(this.form,"搜索");
-        this.productFrom.productData = res.data.list;
-        this.productFrom.total = res.data.total;
-        this.productFrom.pageSize = res.data.pageSize;
-        this.productFrom.currenttPage = res.data.pageNum;
-      });
+
+
+      if (!data.productName || !data.spid) {
+       this.$message.error("请输入内容")
+      } else {
+        get("/product/info/page", data).then((res) => {
+          console.log(res, "搜索");
+          // this.productFrom=res.data.list
+          // console.log(this.form,"搜索");
+          this.productFrom.productData = res.data.list;
+          this.productFrom.total = res.data.total;
+          this.productFrom.pageSize = res.data.pageSize;
+          this.productFrom.currenttPage = res.data.pageNum;
+        });
+      }
+
     },
     // 重置
-    reset() {
+    reset () {
       this.productName = "";
       this.spid = "";
     },
-    handleSizeChange(val) {
+    handleSizeChange (val) {
       let data = {
         pageSize: val,
         pageNum: this.productFrom.pageNum,
@@ -179,7 +172,7 @@ export default {
         this.productFrom.currenttPage = res.data.pageNum;
       });
     },
-    handleCurrentChange(val) {
+    handleCurrentChange (val) {
       let data = {
         pageSize: this.productFrom.pageSize,
         pageNum: val,
@@ -194,12 +187,14 @@ export default {
     },
   },
 };
+
 </script>
 
 <style lang="scss" scoped>
 .productManagement {
   width: 100%;
   height: 100%;
+
   ::v-deep .rowBorder {
     background-color: #fff;
     border-radius: 4px;
@@ -207,6 +202,7 @@ export default {
     height: unset !important;
     padding: 10px 10px;
   }
+
   .formBorder {
     padding: 20px 20px;
     margin-top: 20px;

+ 3 - 3
admin/src/views/schemeGlobal/itemEdit.vue

@@ -79,7 +79,7 @@
                                         duration: 3000,
                                         offset: 360
                                     })
-                                    setTimeout(() => {window.close()}, 1200)
+                                    setTimeout(() => {this.$router.back()()}, 1200)
                                 }).catch(error => {
                                     console.log(error)
                                 })
@@ -97,7 +97,7 @@
                                         duration: 3000,
                                         offset: 360
                                     })
-                                    setTimeout(() => {window.close()}, 1200)
+                                    setTimeout(() => {this.$router.back()()}, 1200)
                                 }).catch(error => {
                                     console.log(error)
                                 })
@@ -123,7 +123,7 @@
                     type: 'warning'
                 }).then(() => {
                     window.location.href = 'about:blank'
-                    window.close()
+                    this.$router.back()()
                 }).catch(() => {
                     this.$message({
                         type: 'info',

+ 3 - 3
admin/src/views/schemeProinfo/ProinfoEdit.vue

@@ -548,7 +548,7 @@ export default {
                     offset: 360,
                   });
                   setTimeout(() => {
-                      window.close()
+                      this.$router.back()()
                   }, 1200)
                 });
               } else {
@@ -560,7 +560,7 @@ export default {
                     offset: 360,
                   });
                   setTimeout(() => {
-                      window.close()
+                      this.$router.back()()
                   }, 1200)
                 });
               }
@@ -643,7 +643,7 @@ export default {
       })
         .then(() => {
           window.location.href = "about:blank";
-          window.close();
+          this.$router.back()();
         })
         .catch(() => {
           this.$message({

Plik diff jest za duży
+ 198 - 474
admin/src/views/schemeV2/schemeAdd.vue


Plik diff jest za duży
+ 9671 - 9265
admin/yarn.lock