lex-xin 3 年之前
父節點
當前提交
7561975d78

+ 3 - 1
src/router/index.js

@@ -470,7 +470,9 @@ export const asyncRoutes = {
   // 产品管理
   productManager: () => import('@/views/platformManager/productManger'),
   // 服务管理
-  serviceManager: () => import('@/views/platformManager/serviceManager/index'),
+  // 基本信息配置
+  serviceManager: () => import('@/views/courseListManager'),
+  serviceList: () => import('@/views/platformManager/serviceManager/index'),
   serviceOperation: () => import('@/views/platformManager/serviceManager/form'),
 }
 

+ 177 - 0
src/views/platformManager/cloudTrafficPackage/index.vue

@@ -0,0 +1,177 @@
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      云教练流量包
+    </h2>
+    <save-form
+      :inline="true"
+      class="searchForm"
+      ref="searchForm"
+      @submit="search"
+      @reset="reset"
+      size="small"
+      :saveKey="'platformProductManager'"
+      :model.sync="searchForm"
+    >
+      <el-form-item :rules="[]">
+        <el-input v-model="searchForm.search" placeholder="服务名称"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
+      </el-form-item>
+    </save-form>
+    <el-button size="small" style="margin-bottom: 20px;" type="primary" v-permission="'organizationCourseDurationSettings/insert'" @click="openService('create')" icon="el-icon-plus">新增服务</el-button>
+    <!-- 列表 -->
+    <div class="tableWrap">
+      <el-table
+        :data="tableList"
+        size="small"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column align="center" prop="organ.name" label="编号">
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="classGroupTypeName"
+          label="服务编号"
+        >
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.courseType }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="服务名称" prop="duration">
+        </el-table-column>
+        <el-table-column align="center" label="产品服务" prop="duration">
+        </el-table-column>
+        <el-table-column align="center" label="操作">
+          <template slot-scope="scope">
+            <el-button
+              @click="resetCourseTime(scope.row)"
+              v-permission="'organizationCourseDurationSettings/update'"
+              type="text"
+              size="small"
+              >修改</el-button
+            >
+            <el-button
+              @click="resetCourseTime(scope.row)"
+              v-permission="'organizationCourseDurationSettings/update'"
+              type="text"
+              size="small"
+              >删除</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+       :saveKey="'platformProductManager'"
+        sync
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { getOrganizationCourseDurationSettings,delOrganizationCourseDurationSettings } from "@/api/specialSetting";
+const initSearch = {
+  search: null
+};
+export default {
+  components: { pagination },
+  data() {
+    return {
+      tableList: [],
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      searchForm: { ...initSearch },
+      isAdd: true,
+      courseVisible: false,
+      activeRow: null,
+    };
+  },
+  mounted() {
+    this.$store.dispatch("setBranchs");
+    this.getList();
+  },
+  methods: {
+    async getList() {
+      try {
+        const res = await getOrganizationCourseDurationSettings({
+          ...this.searchForm,
+          page: this.pageInfo.page,
+          rows: this.pageInfo.limit,
+        });
+        this.pageInfo.total = res.data.total;
+        //  res.data.rows
+        this.tableList = [];
+      } catch (e) {}
+    },
+    search() {
+      this.pageInfo.page = 1;
+      this.$refs.searchForm.save(this.searchForm);
+      this.$refs.searchForm.save(this.pageInfo, "page");
+      this.getList();
+    },
+    reset() {
+      this.searchForm = { ...initSearch };
+      this.search();
+    },
+    resetCourseTime(row) {
+      this.isAdd = false;
+      this.activeRow = row;
+      this.courseVisible = true;
+    },
+    submitInfo() {
+      const str = this.isAdd ? "create" : "update";
+      this.$refs.operationModel.submitInfo(str);
+    },
+    close() {
+      this.courseVisible = false;
+      this.getList();
+    },
+    openService(type, row) {
+      const tagTitle = type == 'update' ? '修改' : '创建'
+      this.$router.push({
+        path: '/serviceOperation',
+        query: {
+          type: type,
+          row: JSON.stringify(row)
+        }
+      }, (route) => {
+        route.meta.title = tagTitle + '服务'
+      })
+    },
+    async delCourseTime(row) {
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then( async() => {
+        try{
+         const res =   await delOrganizationCourseDurationSettings({ id:row.id})
+         this.$message.success('删除成功')
+         this.getList()
+        }catch{}
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.courseMask .el-dialog__body {
+  padding-bottom: 0;
+}
+</style>

+ 1 - 1
src/views/platformManager/productManger/api.js

@@ -22,5 +22,5 @@ export const platformProductDelete = data => request2({
 export const platformProductQueryPage = data => request2({
   url: '/api-web/platformProduct/queryPage',
   method: 'get',
-  data,
+  params: data,
 })

+ 6 - 6
src/views/platformManager/productManger/operationModel.vue

@@ -1,6 +1,12 @@
 <template>
   <div>
     <el-form :model="productForm" ref="productForm" size="small">
+      <el-alert
+          title="产品信息"
+          type="info"
+          :closable="false"
+          style="margin-bottom: 20px"
+        ></el-alert>
       <el-form-item
         label="分部"
         prop="name"
@@ -108,7 +114,6 @@ export default {
       let halfIds = this.$refs.tree.getHalfCheckedKeys()
       let allIds = [...tempIds, ...halfIds]
       this.$refs.productForm.validate(async (_) => {
-        console.log(_, str)
         if (_) {
           if (str == "update") {
             try {
@@ -143,20 +148,16 @@ export default {
         this.silderList = silderList.data
         tempData = this.setTableData(silderList.data)
         this.data = tempData
-        // console.log(this.data)
       }
-      // console.log(this.pageType)
       if (this.pageType == 'update') {
         let roleData = {}
         // 是否是全部选中
         this.checkAll = this.menuId.length >= this.slideCount
         // 是否是半选
-        console.log(this.menuId)
         this.isIndeterminate = this.menuId.length > 0 && this.menuId.length < this.slideCount
         let tSplice = this.getParent(this.menuId, tempData)
         roleData.menuIds = tSplice
         this.result = roleData
-        console.log(this.result)
       } else {
         this.onReSet()
       }
@@ -244,7 +245,6 @@ export default {
        this.$refs.tree.filter(this.seachRoleValue);
     },
     filterNode(value, data) {
-      console.log(data)
         if (!value) return true;
         return data.label.indexOf(value) !== -1;
       },

+ 35 - 0
src/views/platformManager/serviceManager/api.js

@@ -0,0 +1,35 @@
+
+import request2 from '@/utils/request2'
+
+export const platformServeQueryPage = data => request2({
+  url: '/api-web/platformServe/queryPage',
+  method: 'get',
+  params: data,
+})
+
+export const platformServeAdd = data => request2({
+  url: '/api-web/platformServe/add',
+  method: 'post',
+  data,
+})
+
+export const platformServeUpdate = data => request2({
+  url: '/api-web/platformServe/update',
+  method: 'post',
+  data,
+})
+
+export const platformServeDelete = data => request2({
+  url: '/api-web/platformServe/delete/' + data.id,
+  method: 'get'
+})
+
+export const platformServeQueryInfo = data => request2({
+  url: '/api-web/platformServe/queryInfo/' + data.id,
+  method: 'get'
+})
+
+export const platformServeQueryModeDetail = data => request2({
+  url: '/api-web/platformServe/queryModeDetail/' + data.id,
+  method: 'get'
+})

+ 7 - 7
src/views/platformManager/serviceManager/index.vue

@@ -11,7 +11,7 @@
       @submit="search"
       @reset="reset"
       size="small"
-      :saveKey="'platformProductManager'"
+      :saveKey="'platformServiceManager'"
       :model.sync="searchForm"
     >
       <el-form-item :rules="[]">
@@ -57,7 +57,7 @@
               >修改</el-button
             >
             <el-button
-              @click="resetCourseTime(scope.row)"
+              @click="delService(scope.row)"
               v-permission="'organizationCourseDurationSettings/update'"
               type="text"
               size="small"
@@ -67,7 +67,7 @@
         </el-table-column>
       </el-table>
       <pagination
-       :saveKey="'platformProductManager'"
+       :saveKey="'platformServiceManager'"
         sync
         :total.sync="pageInfo.total"
         :page.sync="pageInfo.page"
@@ -80,7 +80,7 @@
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
-import { getOrganizationCourseDurationSettings,delOrganizationCourseDurationSettings } from "@/api/specialSetting";
+import { platformServeQueryPage,platformServeDelete } from "@/api/specialSetting";
 const initSearch = {
   search: null
 };
@@ -109,7 +109,7 @@ export default {
   methods: {
     async getList() {
       try {
-        const res = await getOrganizationCourseDurationSettings({
+        const res = await platformServeQueryPage({
           ...this.searchForm,
           page: this.pageInfo.page,
           rows: this.pageInfo.limit,
@@ -154,14 +154,14 @@ export default {
         route.meta.title = tagTitle + '服务'
       })
     },
-    async delCourseTime(row) {
+    async delService(row) {
       this.$confirm("是否删除?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
       }).then( async() => {
         try{
-         const res =   await delOrganizationCourseDurationSettings({ id:row.id})
+         await platformServeDelete({ id:row.id})
          this.$message.success('删除成功')
          this.getList()
         }catch{}