云联一号 há 2 semanas atrás
pai
commit
91e77ec139

+ 53 - 0
src/api/crm/customerAiChat.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询ai话术润色列表
+export function listCrmCustomeraichat(query) {
+  return request({
+    url: '/crm/customer_ai_chat/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询ai话术润色详细
+export function getCrmCustomeraichat(id) {
+  return request({
+    url: '/crm/customer_ai_chat/' + id,
+    method: 'get'
+  })
+}
+
+// 新增ai话术润色
+export function addCrmCustomeraichat(data) {
+  return request({
+    url: '/crm/customer_ai_chat',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改ai话术润色
+export function updateCrmCustomeraichat(data) {
+  return request({
+    url: '/crm/customer_ai_chat',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除ai话术润色
+export function delCrmCustomeraichat(id) {
+  return request({
+    url: '/crm/customer_ai_chat/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出ai话术润色
+export function exportCrmCustomeraichat(query) {
+  return request({
+    url: '/crm/customer_ai_chat/export',
+    method: 'post',
+    params: query
+  })
+}

+ 53 - 0
src/api/crm/customerBusiness.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询商机列表
+export function listCrmCustomerbusiness(query) {
+  return request({
+    url: '/crm/customer_business/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询商机详细
+export function getCrmCustomerbusiness(id) {
+  return request({
+    url: '/crm/customer_business/' + id,
+    method: 'get'
+  })
+}
+
+// 新增商机
+export function addCrmCustomerbusiness(data) {
+  return request({
+    url: '/crm/customer_business',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改商机
+export function updateCrmCustomerbusiness(data) {
+  return request({
+    url: '/crm/customer_business',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除商机
+export function delCrmCustomerbusiness(id) {
+  return request({
+    url: '/crm/customer_business/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出商机
+export function exportCrmCustomerbusiness(query) {
+  return request({
+    url: '/crm/customer_business/export',
+    method: 'post',
+    params: query
+  })
+}

+ 103 - 3
src/views/crm/customerAiChat/index.vue

@@ -1,10 +1,110 @@
 <template>
   <div class="app-container">
-    <el-empty description="AI话术润色功能开发中"></el-empty>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="关键词" prop="keyword">
+        <el-input v-model="queryParams.keyword" placeholder="请输入关键词" clearable size="small"
+          @keyup.enter.native="handleQuery" />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
+          v-hasPermi="['crm:customerAiChat:add']">新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple"
+          @click="handleDelete" v-hasPermi="['crm:customerAiChat:remove']">删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
+          v-hasPermi="['crm:customerAiChat:export']">导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="50" align="center" />
+      <el-table-column label="ID" align="center" prop="id" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+            v-hasPermi="['crm:customerAiChat:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+            v-hasPermi="['crm:customerAiChat:remove']">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
+
 <script>
+import { listCrmCustomeraichat, getCrmCustomeraichat, delCrmCustomeraichat, addCrmCustomeraichat, updateCrmCustomeraichat, exportCrmCustomeraichat } from "@/api/crm/customerAiChat";
+
 export default {
-  name: 'CustomerAiChat'
-}
+  name: "CrmCustomeraichat",
+  data() {
+    return {
+      loading: true,
+      ids: [],
+      single: true,
+      multiple: true,
+      showSearch: true,
+      total: 0,
+      list: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: null
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      listCrmCustomeraichat(this.queryParams).then(response => {
+        this.list = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    handleAdd() {
+      this.$message.info("新增功能开发中");
+    },
+    handleUpdate(row) {
+      this.$message.info("修改功能开发中");
+    },
+    handleDelete(row) {
+      this.$modal.confirm("是否确认删除?").then(() => {
+        return delCrmCustomeraichat(row.id || this.ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    handleExport() {
+      this.download("crm/customer_ai_chat/export", { ...this.queryParams }, `ai话术润色.xlsx`);
+    }
+  }
+};
 </script>

+ 103 - 3
src/views/crm/customerBusiness/index.vue

@@ -1,10 +1,110 @@
 <template>
   <div class="app-container">
-    <el-empty description="商机管理功能开发中"></el-empty>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="关键词" prop="keyword">
+        <el-input v-model="queryParams.keyword" placeholder="请输入关键词" clearable size="small"
+          @keyup.enter.native="handleQuery" />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
+          v-hasPermi="['crm:business:add']">新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple"
+          @click="handleDelete" v-hasPermi="['crm:business:remove']">删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
+          v-hasPermi="['crm:business:export']">导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="50" align="center" />
+      <el-table-column label="ID" align="center" prop="id" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+            v-hasPermi="['crm:business:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+            v-hasPermi="['crm:business:remove']">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
+
 <script>
+import { listCrmCustomerbusiness, getCrmCustomerbusiness, delCrmCustomerbusiness, addCrmCustomerbusiness, updateCrmCustomerbusiness, exportCrmCustomerbusiness } from "@/api/crm/customerBusiness";
+
 export default {
-  name: 'CustomerBusiness'
-}
+  name: "CrmCustomerbusiness",
+  data() {
+    return {
+      loading: true,
+      ids: [],
+      single: true,
+      multiple: true,
+      showSearch: true,
+      total: 0,
+      list: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: null
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      listCrmCustomerbusiness(this.queryParams).then(response => {
+        this.list = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    handleAdd() {
+      this.$message.info("新增功能开发中");
+    },
+    handleUpdate(row) {
+      this.$message.info("修改功能开发中");
+    },
+    handleDelete(row) {
+      this.$modal.confirm("是否确认删除?").then(() => {
+        return delCrmCustomerbusiness(row.id || this.ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    handleExport() {
+      this.download("crm/customer_business/export", { ...this.queryParams }, `商机.xlsx`);
+    }
+  }
+};
 </script>

+ 180 - 3
vue.config.js

@@ -56,11 +56,19 @@ module.exports = {
       // 9. /sop/companySopRole → 后端是 /companySopRole
       //
 
-      // === 批量路径重写:/store/store/* → /store/* ===
-      [process.env.VUE_APP_BASE_API + '/store/store']: {
+      // === 批量路径重写:/store/store/ → /store/ (仅匹配 hisStore 二级目录下的 store 前缀) ===
+      // 注意:此规则仅匹配前端 api/hisStore/store*.js 中 url 以 /store/store/ 开头的请求
+      // 不匹配 /store/storeProduct 等路径
+      [process.env.VUE_APP_BASE_API + '/store/store/']: {
         target: 'http://localhost:8006',
         changeOrigin: true,
-        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/store/store']: '/store' }
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/store/store/']: '/store/' }
+      },
+      // === /store/store/storeOrder → /hisStore/fsStoreOrderScrm (hisStore订单API在fs-admin-saas) ===
+      [process.env.VUE_APP_BASE_API + '/store/store/storeOrder']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/store/store/storeOrder']: '/hisStore/fsStoreOrderScrm' }
       },
       // === 批量路径重写:/store/his/* → /his/* ===
       [process.env.VUE_APP_BASE_API + '/store/his']: {
@@ -517,6 +525,175 @@ module.exports = {
       // === /his/integralOrder → /his/integralOrder (直接透传) ===
       // === /his/redPacket → /his/redPacket (直接透传) ===
 
+      // === /company/wxAccount → /company/wxUser (微信账号) ===
+      [process.env.VUE_APP_BASE_API + '/company/wxAccount']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/company/wxAccount']: '/company/wxUser' }
+      },
+      // === /user/darkRoom → /store/user/darkRoomList (小黑屋) ===
+      [process.env.VUE_APP_BASE_API + '/user/darkRoom']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/user/darkRoom']: '/store/user/darkRoomList' }
+      },
+      // === /user/transfer → /system/approval (转接管理) ===
+      [process.env.VUE_APP_BASE_API + '/user/transfer']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/user/transfer']: '/system/approval' }
+      },
+      // === /lobster/billing → /workflow/lobster/billing (龙虾计费) ===
+      [process.env.VUE_APP_BASE_API + '/lobster/billing']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/lobster/billing']: '/workflow/lobster/billing' }
+      },
+      // === /lobster/prompt → /workflow/lobster/prompt (提示词) ===
+      [process.env.VUE_APP_BASE_API + '/lobster/prompt']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/lobster/prompt']: '/workflow/lobster/prompt' }
+      },
+      // === /lobster/api-registry → /workflow/lobster/api-registry (接口注册中心) ===
+      [process.env.VUE_APP_BASE_API + '/lobster/api-registry']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/lobster/api-registry']: '/workflow/lobster/api-registry' }
+      },
+      // === /lobster/dead-letter → /workflow/lobster/dead-letter (死信队列) ===
+      [process.env.VUE_APP_BASE_API + '/lobster/dead-letter']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/lobster/dead-letter']: '/workflow/lobster/dead-letter' }
+      },
+      // === /lobster/event-audit → /workflow/lobster/event-audit (节点审核) ===
+      [process.env.VUE_APP_BASE_API + '/lobster/event-audit']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/lobster/event-audit']: '/workflow/lobster/event-audit' }
+      },
+      // === /lobster/optimization → /workflow/lobster/optimization (AI优化建议) ===
+      [process.env.VUE_APP_BASE_API + '/lobster/optimization']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/lobster/optimization']: '/workflow/lobster/optimization' }
+      },
+      // === /lobster/sales-corpus → /workflow/lobster/sales-corpus (销冠语料) ===
+      [process.env.VUE_APP_BASE_API + '/lobster/sales-corpus']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/lobster/sales-corpus']: '/workflow/lobster/sales-corpus' }
+      },
+      // === /lobster/model-config → /company/aiProvider (模型配置→AI供应商) ===
+      [process.env.VUE_APP_BASE_API + '/lobster/model-config']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/lobster/model-config']: '/company/aiProvider' }
+      },
+      // === /hisStore/storeOrder → /store/storeOrder (商城订单) ===
+      [process.env.VUE_APP_BASE_API + '/hisStore/storeOrder']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/hisStore/storeOrder']: '/store/storeOrder' }
+      },
+      // === /hisStore/storeProduct → /store/storeProduct (商城商品) ===
+      [process.env.VUE_APP_BASE_API + '/hisStore/storeProduct']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/hisStore/storeProduct']: '/store/storeProduct' }
+      },
+      // === /hisStore/storeProductPackage → /store/storeProductPackage (商品套餐) ===
+      [process.env.VUE_APP_BASE_API + '/hisStore/storeProductPackage']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/hisStore/storeProductPackage']: '/store/storeProductPackage' }
+      },
+      // === /hisStore/storePayment → /store/storePayment (门店支付) ===
+      [process.env.VUE_APP_BASE_API + '/hisStore/storePayment']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/hisStore/storePayment']: '/store/storePayment' }
+      },
+      // === /hisStore/userOnlineState → /store/userOnlineState (用户在线状态) ===
+      [process.env.VUE_APP_BASE_API + '/hisStore/userOnlineState']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/hisStore/userOnlineState']: '/store/userOnlineState' }
+      },
+      // === /hisStore/storeProductCategory → /store/storeProductCategory (商品分类) ===
+      [process.env.VUE_APP_BASE_API + '/hisStore/storeProductCategory']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/hisStore/storeProductCategory']: '/store/storeProductCategory' }
+      },
+      // === /live/liveData → /liveData/liveData (直播数据) ===
+      [process.env.VUE_APP_BASE_API + '/live/liveData']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/live/liveData']: '/liveData/liveData' }
+      },
+      // === /live/liveConfig → /live/config (直播配置) ===
+      [process.env.VUE_APP_BASE_API + '/live/liveConfig']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/live/liveConfig']: '/live/config' }
+      },
+      // === /live/liveConsole → /live/liveVideo (直播控制台→直播视频) ===
+      [process.env.VUE_APP_BASE_API + '/live/liveConsole']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/live/liveConsole']: '/live/liveVideo' }
+      },
+      // === /course/courseAnswerlogs → /course/courseAnswerLog (答题记录) ===
+      [process.env.VUE_APP_BASE_API + '/course/courseAnswerlogs']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/course/courseAnswerlogs']: '/course/courseAnswerLog' }
+      },
+      // === /course/coursePlaySourceConfig → /course/playSourceConfig (播放源配置) ===
+      [process.env.VUE_APP_BASE_API + '/course/coursePlaySourceConfig']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/course/coursePlaySourceConfig']: '/course/playSourceConfig' }
+      },
+      // === /course/courseUserStatistics → /course/userWatchStatistics (用户统计) ===
+      [process.env.VUE_APP_BASE_API + '/course/courseUserStatistics']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/course/courseUserStatistics']: '/course/userWatchStatistics' }
+      },
+      // === /course/category → /course/userCourseCategory (课程分类) ===
+      [process.env.VUE_APP_BASE_API + '/course/category']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/course/category']: '/course/userCourseCategory' }
+      },
+      // === /hisStore/storeOrderAudit → /store/storeOrderAudit (订单审核) ===
+      [process.env.VUE_APP_BASE_API + '/hisStore/storeOrderAudit']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/hisStore/storeOrderAudit']: '/hisStore/fsStoreOrderAuditScrm' }
+      },
+      // === /hisStore/storeOrderOffline → /hisStore/fsStoreOrderOfflineScrm (线下订单) ===
+      [process.env.VUE_APP_BASE_API + '/hisStore/storeOrderOffline']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/hisStore/storeOrderOffline']: '/hisStore/fsStoreOrderOfflineScrm' }
+      },
+      // === /qw/QwWorkTask/qw/list → /qw/workTask/list (企微任务) ===
+      [process.env.VUE_APP_BASE_API + '/qw/QwWorkTask/qw']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/qw/QwWorkTask/qw']: '/qw/workTask' }
+      },
+      // === /crm/customer/list → /crm/customer/getCustomerList (客户管理) ===
+      [process.env.VUE_APP_BASE_API + '/crm/customer/list']: {
+        target: 'http://localhost:8006',
+        changeOrigin: true,
+        pathRewrite: { ['^' + process.env.VUE_APP_BASE_API + '/crm/customer/list']: '/crm/customer/getCustomerList' }
+      },
+
       // watch-api → fs-watch 微服务(需要单独启动 fs-watch)
       [process.env.VUE_APP_BASE_API + '/watch-api']: {
         target: 'http://localhost:8010',