Browse Source

cid绑定代码迁移、并发数量回显前端优化

yjwang 1 ngày trước cách đây
mục cha
commit
e085fb04e0

+ 70 - 0
src/api/company/companyAiWorkflowServer.js

@@ -0,0 +1,70 @@
+import request from '@/utils/request'
+
+// 查询cid服务列表
+export function listServer(query) {
+  return request({
+    url: '/company/cid/server/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询cid服务详细
+export function getServer(id) {
+  return request({
+    url: '/company/cid/server/' + id,
+    method: 'get'
+  })
+}
+
+// 新增cid服务
+export function addServer(data) {
+  return request({
+    url: '/company/cid/server',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改cid服务
+export function updateServer(data) {
+  return request({
+    url: '/company/cid/server',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除cid服务
+export function delServer(id) {
+  return request({
+    url: '/company/cid/server/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出cid服务
+export function exportServer(query) {
+  return request({
+    url: '/company/cid/server/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 绑定cid服务
+export function bindCidServer(data) {
+  return request({
+    url: '/company/cid/server/bindCidServer',
+    method: 'post',
+    data: data
+  })
+}
+
+export function unbindCidServer(data) {
+  return request({
+    url: '/company/cid/server/unbindCidServer',
+    method: 'post',
+    data: data
+  })
+}

+ 1 - 1
src/views/company/aiModel/account/info.vue

@@ -344,7 +344,7 @@ export default {
             this.form.id = data.id
             this.form.id = data.id
             this.form.name = data.name || ''
             this.form.name = data.name || ''
             this.form.providerClassName = data.providerClassName || ''
             this.form.providerClassName = data.providerClassName || ''
-            this.form.concurrentNum = data.concurrentNum || ''
+            this.form.concurrentNum = (data.concurrentNum === null || data.concurrentNum === undefined || data.concurrentNum === '') ? '0' : String(data.concurrentNum)
             this.form.interruptFlag = data.interruptFlag || 0
             this.form.interruptFlag = data.interruptFlag || 0
             this.form.interruptKeywords = data.interruptKeywords || ''
             this.form.interruptKeywords = data.interruptKeywords || ''
             this.form.interruptIgnoreKeywords = data.interruptIgnoreKeywords || ''
             this.form.interruptIgnoreKeywords = data.interruptIgnoreKeywords || ''

+ 5 - 0
src/views/company/aiModel/index.vue

@@ -78,6 +78,11 @@
             <el-table-column type="selection" width="55" align="center" />
             <el-table-column type="selection" width="55" align="center" />
             <el-table-column align="center" label="模型名称" prop="name"  />
             <el-table-column align="center" label="模型名称" prop="name"  />
             <el-table-column align="center" label="实现类" prop="providerClassName" />
             <el-table-column align="center" label="实现类" prop="providerClassName" />
+            <el-table-column align="center" label="模型并发数量" prop="concurrentNum">
+                <template slot-scope="scope">
+                    {{ (scope.row.concurrentNum === null || scope.row.concurrentNum === undefined || scope.row.concurrentNum === '') ? 0 : scope.row.concurrentNum }}
+                </template>
+            </el-table-column>
             <el-table-column
             <el-table-column
                 align="center"
                 align="center"
                 class-name="small-padding fixed-width"
                 class-name="small-padding fixed-width"

+ 19 - 1
src/views/company/companyUser/index.vue

@@ -892,6 +892,8 @@ import axios from "axios";
 import {addCodeUrl} from "../../../api/company/companyUser";
 import {addCodeUrl} from "../../../api/company/companyUser";
 import selectDoctor from "@/views/qw/user/selectDoctor.vue";
 import selectDoctor from "@/views/qw/user/selectDoctor.vue";
 import AiSipCallUser from "../../aiSipCall/aiSipCallUser.vue";
 import AiSipCallUser from "../../aiSipCall/aiSipCallUser.vue";
+import {bindCidServer,unbindCidServer} from "@/api/company/companyAiWorkflowServer";
+
 export default {
 export default {
   name: "User",
   name: "User",
   components: {selectDoctor, Treeselect ,selectUser,AiSipCallUser},
   components: {selectDoctor, Treeselect ,selectUser,AiSipCallUser},
@@ -2147,7 +2149,23 @@ export default {
       // 将分号分隔的内容转换为换行显示
       // 将分号分隔的内容转换为换行显示
       return dataInfo.split(/;\s*/).map(item => item.trim()).filter(item => item).join('\n');
       return dataInfo.split(/;\s*/).map(item => item.trim()).filter(item => item).join('\n');
     },
     },
-
+    //用户绑定cidserver服务器
+    handleBindCidServer(row){
+      let param = {
+        userId : row.userId,
+        companyId :  row.companyId
+      }
+      this.bindCidServerLoading = true;
+      bindCidServer(param).then(res=>{
+        console.log(res);
+        this.bindCidServerLoading = false;
+        this.$message.success('绑定成功');
+        this.getList();
+      }).catch(res=>{
+        this.bindCidServerLoading = false;
+        console.log(res)
+      })
+    },
   },
   },
 }
 }
 </script>
 </script>