xgb 3 недель назад
Родитель
Сommit
a0f898a2f1

+ 53 - 0
src/api/qw/feishuAccount.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询账号列表
+export function listFeishuAccount(query) {
+  return request({
+    url: '/qw/feishuAccount/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询账号详情
+export function getFeishuAccount(id) {
+  return request({
+    url: '/qw/feishuAccount/' + id,
+    method: 'get'
+  })
+}
+
+// 新增账号
+export function addFeishuAccount(data) {
+  return request({
+    url: '/qw/feishuAccount',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改账号
+export function updateFeishuAccount(data) {
+  return request({
+    url: '/qw/feishuAccount',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除账号
+export function delFeishuAccount(id) {
+  return request({
+    url: '/qw/feishuAccount/' + id,
+    method: 'delete'
+  })
+}
+
+// 修改状态
+export function changeFeishuAccountStatus(data) {
+  return request({
+    url: '/qw/feishuAccount/changeStatus',
+    method: 'put',
+    data: data
+  })
+}

+ 377 - 0
src/views/qw/feishuAccount/index.vue

@@ -0,0 +1,377 @@
+<template>
+  <div class="app-container">
+    <!-- 搜索表单 -->
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="AppId" prop="appId">
+        <el-input
+          v-model="queryParams.appId"
+          placeholder="请输入AppId"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="账号" prop="phone">
+        <el-input
+          v-model="queryParams.phone"
+          placeholder="请输入归属账号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option label="启用" :value="1" />
+          <el-option label="禁用" :value="0" />
+        </el-select>
+      </el-form-item>
+      <!-- 销售名称(nickName) -->
+      <el-form-item label="销售名称" prop="nickName">
+        <el-input
+          v-model="queryParams.nickName"
+          placeholder="请输入销售名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!-- 归属组别(deptId) -->
+      <el-form-item label="归属组别" prop="deptId">
+        <el-cascader
+          v-model="queryParams.deptId"
+          :options="deptOptions"
+          :props="cascaderProps"
+          placeholder="请选择组别"
+          clearable
+          size="small"
+          style="width: 200px"
+          @change="handleDeptChange"
+        />
+      </el-form-item>
+      <!-- 我的飞书应用勾选框 -->
+      <el-form-item label="我的应用" prop="myAccount">
+        <el-checkbox v-model="queryParams.myAccount"></el-checkbox>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" 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"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+        >删除</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <!-- 表格 -->
+    <el-table v-loading="loading" :data="accountList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="AppId" align="center" prop="appId" min-width="180" />
+      <el-table-column label="AppSecret" align="center" prop="appSecret" min-width="200" show-overflow-tooltip />
+      <el-table-column label="状态" align="center" prop="status" width="80">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.status"
+            :active-value="1"
+            :inactive-value="0"
+            :disabled="!scope.row.isMyAccount"
+            @change="handleStatusChange(scope.row)"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column label="错误信息" align="center" prop="errorMsg" min-width="150" show-overflow-tooltip />
+      <el-table-column label="归属账号" align="center" prop="phone" width="120" />
+      <el-table-column label="所属分组" align="center" prop="deptName" width="120" />
+      <el-table-column label="所属员工" align="center" prop="nickName" width="120" />
+<!--      <el-table-column label="已使用次数" align="center" prop="numberUse" width="100" />-->
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <!-- 仅当 isMyAccount 为 true 时显示修改和删除按钮 -->
+          <el-button
+            v-if="scope.row.isMyAccount"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            v-if="scope.row.isMyAccount"
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除</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"
+    />
+
+    <!-- 新增/修改对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-form-item label="AppId" prop="appId">
+          <el-input v-model="form.appId" placeholder="请输入飞书AppId" />
+        </el-form-item>
+        <el-form-item label="AppSecret" prop="appSecret">
+          <el-input v-model="form.appSecret" placeholder="请输入飞书AppSecret" show-password />
+        </el-form-item>
+        <el-form-item label="归属手机号" prop="phone">
+          <el-input v-model="form.phone" placeholder="请输入归属手机号" />
+        </el-form-item>
+        <el-form-item label="已使用次数" prop="numberUse">
+          <el-input-number v-model="form.numberUse" :min="0" />
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-radio-group v-model="form.status">
+            <el-radio :label="1">启用</el-radio>
+            <el-radio :label="0">禁用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listFeishuAccount,
+  getFeishuAccount,
+  delFeishuAccount,
+  addFeishuAccount,
+  updateFeishuAccount,
+  changeFeishuAccountStatus
+} from "@/api/qw/feishuAccount";
+// 导入部门树接口(根据实际路径调整)
+import { treeselect } from "@/api/company/companyDept";
+import {parseTime} from "../../../utils/common";
+
+export default {
+  name: "FeishuAccount",
+  data() {
+    return {
+      loading: true,
+      ids: [],
+      single: true,
+      multiple: true,
+      showSearch: true,
+      total: 0,
+      accountList: [],
+      title: '',
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        appId: null,
+        phone: null,
+        status: null,
+        nickName: null,    // 销售名称
+        deptId: null,      // 归属组别ID
+        myAccount: true    // 默认勾选“我的飞书应用”
+      },
+      form: {
+        id: null,
+        appId: null,
+        appSecret: null,
+        status: 1,
+        errorMsg: null,
+        phone: null,
+        numberUse: null
+      },
+      rules: {
+        appId: [{ required: true, message: 'AppId不能为空', trigger: 'blur' }],
+        appSecret: [{ required: true, message: 'AppSecret不能为空', trigger: 'blur' }]
+      },
+      // 部门树数据(用于归属组别下拉)
+      deptOptions: [],
+      // 级联选择器配置
+      cascaderProps: {
+        value: 'id',
+        label: 'label',
+        children: 'children',
+        checkStrictly: true,   // 允许选择任意层级
+        emitPath: false        // 只返回选中节点的 value(即 id)
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDeptTree(); // 加载部门树
+  },
+  methods: {
+    parseTime,
+    /** 查询账号列表 */
+    getList() {
+      this.loading = true;
+      listFeishuAccount(this.queryParams).then(response => {
+        this.accountList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 加载部门树 */
+    getDeptTree() {
+      treeselect()
+        .then(response => {
+          this.deptOptions = response.data || [];
+        })
+        .catch(() => {
+          this.deptOptions = [];
+        });
+    },
+    /** 搜索按钮 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置搜索 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      // 清空查询字段,并重置 myAccount 为 true
+      this.queryParams.nickName = null;
+      this.queryParams.deptId = null;
+      this.queryParams.myAccount = true;
+      this.handleQuery();
+    },
+    /** 归属组别变化时自动触发搜索 */
+    handleDeptChange(value) {
+      this.handleQuery();
+    },
+    /** 多选变化 */
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 重置表单 */
+    reset() {
+      this.form = {
+        id: null,
+        appId: null,
+        appSecret: null,
+        status: 1,
+        errorMsg: null,
+        phone: null,
+        numberUse: null,
+      };
+      this.resetForm("form");
+    },
+    /** 取消按钮 */
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    /** 新增按钮 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "新增飞书应用账号";
+    },
+    /** 修改按钮 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids[0];
+      getFeishuAccount(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改飞书应用账号";
+      });
+    },
+    /** 提交表单 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateFeishuAccount(this.form).then(() => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFeishuAccount(this.form).then(() => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除编号为"' + ids + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        return delFeishuAccount(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      });
+    },
+    /** 状态切换 */
+    handleStatusChange(row) {
+      const newStatus = row.status;
+      const oldStatus = newStatus === 1 ? 0 : 1; // 用于回滚
+      const text = newStatus === 1 ? '启用' : '禁用';
+      this.$confirm('确认要' + text + '该账号吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        changeFeishuAccountStatus({
+          id: row.id,
+          status: newStatus,
+          errorMsg: newStatus === 1 ? '' : row.errorMsg
+        }).then(() => {
+          this.msgSuccess('状态修改成功');
+          this.getList();
+        }).catch(() => {
+          // 恢复状态
+          row.status = oldStatus;
+        });
+      }).catch(() => {
+        // 恢复状态
+        row.status = oldStatus;
+      });
+    }
+  }
+};
+</script>

+ 3 - 3
src/views/qw/sopLogs/sopLogsList.vue

@@ -188,10 +188,10 @@
                 <span v-if="item.contentType == 16">APP语音</span>
                 <span v-if="item.contentType == 11">群公告</span>
                 <span v-if="item.contentType == 16">H5看课卡片</span>
-                <span v-if="item.contentType == 18">直播卡片</span>
+                <span v-if="item.contentType == 18">飞书看课</span>
                 <span v-if="item.contentType == 19">直播短链</span>
                 <span v-if="item.contentType == 4 || item.contentType == 17"><el-button size="mini" type="primary" @click="generateShortLink(item)" style="margin-left: 330px;">生成短链</el-button></span>
-                <span v-if="item.contentType == 18 || item.contentType == 19"><el-button size="mini" type="primary" @click="generateLiveShortLink(item)" style="margin-left: 330px;">复制短链</el-button></span>
+                <span v-if="item.contentType == 19"><el-button size="mini" type="primary" @click="generateLiveShortLink(item)" style="margin-left: 330px;">复制短链</el-button></span>
                 <span v-if="item.contentType == 21">发看课短信</span>
                 <span v-if="item.contentType == 23">APP看课跳转短链</span>
                 <span v-if="item.contentType == 24">APP直播跳转短链</span>
@@ -211,7 +211,7 @@
                 fit="contain"
                 @click.prevent="openImageViewer(item.imgUrl)" />
             </div>
-            <div v-if="item.contentType == 3 || item.contentType == 9" class="message-style">
+            <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18" class="message-style">
               <div
                 style="background-color: white; padding: 10px; width: 100%"
                 @click="openLink(item.linkUrl)">

+ 11 - 11
src/views/qw/sopTemp/updateSopTemp.vue

@@ -387,7 +387,7 @@
                                               <el-radio
                                                 :key="item.dictValue"
                                                 :label="item.dictValue"
-                                                :disabled="(content.type!=2 && item.dictValue === '9') || (content.isOfficial==1 && ['5','6','7','8','9'].includes(item.dictValue))"
+                                                :disabled="(content.type!=2 && (item.dictValue === '9' || item.dictValue == 18)) || (content.isOfficial==1 && ['5','6','7','8','9'].includes(item.dictValue))"
                                                 v-for="item in sysQwSopAiContentType"
                                                 v-if="courseTypeList.includes(item.dictValue)">{{ item.dictLabel }}
                                               </el-radio>
@@ -437,7 +437,7 @@
                                           </div>
 
                                           <div
-                                            v-if="(setList.contentType == 3 || item.contentType ==9) || (setList.contentType == 9 && content.type==2 )">
+                                            v-if="(setList.contentType == 3 || setList.contentType == 18 || item.contentType ==9) || (setList.contentType == 9 && content.type==2 )">
                                             <el-card class="box-card link-card">
                                               <div slot="header" class="card-header-mini">
                                                 <i class="el-icon-link"></i>
@@ -514,7 +514,7 @@
                                               </el-form-item>
                                             </el-card>
                                           </div>
-                                          <div v-if="setList.contentType == 12 || setList.contentType == 18 || setList.contentType == 19 || setList.contentType == 24">
+                                          <div v-if="setList.contentType == 12  || setList.contentType == 19 || setList.contentType == 24">
                                             <el-card class="box-card miniprogram-card">
                                               <div slot="header" class="card-header-mini">
                                                 <i class="el-icon-video-camera"></i>
@@ -1840,7 +1840,7 @@ export default {
       ruleList: [],
       ids: [],
       // startTimeRange: [],
-      courseTypeList: ['1','2', '4','5','6', '7','8','9','10','14','15','16','11'],
+      courseTypeList: ['1','2', '4','5','6', '7','8','9','10','14','15','16','11','18'],
       sysFsSopWatchStatus: [],
       //消息内容类型 企微版
       sysQwSopContentType: [],
@@ -2449,19 +2449,19 @@ export default {
                 this.$message.error("图片不能为空")
                 return false;
               }
-              if ((data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10 || data.content[j].setting[k].contentType == 17|| data.content[j].setting[k].contentType == 23) && (data.content[j].setting[k].linkTitle == null || data.content[j].setting[k].linkTitle == "")) {
+              if ((data.content[j].setting[k].contentType == 18 || data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10 || data.content[j].setting[k].contentType == 17|| data.content[j].setting[k].contentType == 23) && (data.content[j].setting[k].linkTitle == null || data.content[j].setting[k].linkTitle == "")) {
                 this.$message.error("链接标题不能为空")
                 return false;
               }
-              if ((data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10|| data.content[j].setting[k].contentType == 17|| data.content[j].setting[k].contentType == 23) && (data.content[j].setting[k].linkDescribe == null || data.content[j].setting[k].linkDescribe == "")) {
+              if ((data.content[j].setting[k].contentType == 18 || data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10|| data.content[j].setting[k].contentType == 17|| data.content[j].setting[k].contentType == 23) && (data.content[j].setting[k].linkDescribe == null || data.content[j].setting[k].linkDescribe == "")) {
                 this.$message.error("链接描述不能为空")
                 return false;
               }
-              if ((data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10|| data.content[j].setting[k].contentType == 17|| data.content[j].setting[k].contentType == 23) && (data.content[j].setting[k].linkImageUrl == null || data.content[j].setting[k].linkImageUrl == "")) {
+              if ((data.content[j].setting[k].contentType == 18 || data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10|| data.content[j].setting[k].contentType == 17|| data.content[j].setting[k].contentType == 23) && (data.content[j].setting[k].linkImageUrl == null || data.content[j].setting[k].linkImageUrl == "")) {
                 this.$message.error("链接图片不能为空")
                 return false;
               }
-              if (data.content[j].setting[k].contentType == 3 && data.content[j].setting[k].type == 1 && (data.content[j].setting[k].linkUrl == null || data.content[j].setting[k].linkUrl == "")) {
+              if (data.content[j].setting[k].contentType == 18 || data.content[j].setting[k].contentType == 3 && data.content[j].setting[k].type == 1 && (data.content[j].setting[k].linkUrl == null || data.content[j].setting[k].linkUrl == "")) {
                 this.$message.error("链接地址不能为空")
                 return false;
               }
@@ -2765,7 +2765,7 @@ export default {
         if (selectedCourse && content.type == 2 && content.courseId != null) {
           //响应式直接给链接的标题/封面上值
 
-          if (content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
+          if (content.setting[i].contentType == 18 || content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
             this.$set(content.setting[i], 'linkTitle', selectedCourse.dictLabel);
             this.$set(content.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
           }
@@ -2928,7 +2928,7 @@ export default {
         for (let i = 0; i < content.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && content.type == 2 && content.courseId != null) {
-            if (content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
+            if (content.setting[i].contentType == 18 || content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
               this.$set(content.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(content.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -2949,7 +2949,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo && content.type == 2 && content.videoId != null) {
 
-            if (content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
+            if (content.setting[i].contentType == 18 || content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
               this.$set(content.setting[i], 'linkDescribe', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {

+ 12 - 12
src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

@@ -101,7 +101,7 @@
                     </el-card>
                   </div> -->
                   <el-form-item label="内容" style="margin-bottom: 2%" >
-                    <div v-if="item.contentType == 12 || item.contentType == 18 || item.contentType == 19 || item.contentType == 24">
+                    <div v-if="item.contentType == 12 || item.contentType == 19 || item.contentType == 24">
                       <el-card class="box-card">
                         <el-form-item label="直播间" >
                           <el-select  v-model="item.liveId"
@@ -163,7 +163,7 @@
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1"  :width="150" :height="150" />
 
-                    <div v-if="item.contentType == 3 || item.contentType ==9 ">
+                    <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:"  label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -614,7 +614,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
-            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18) {
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -641,7 +641,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18) {
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
@@ -872,11 +872,11 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse  && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18) {
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17 
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17
               || this.setting[i].contentType == 23){//新增APP 看课 跳转短链回填封面
               this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
             }
@@ -891,14 +891,14 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo  && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18) {
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
                 this.$set(this.setting[i], 'linkImageUrl', selectedVideo.dictImgUrl);
               }
             }
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17 
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17
               || this.setting[i].contentType == 23){//新增APP 看课 跳转短链回填标题
               this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
 
@@ -1030,16 +1030,16 @@ export default {
               if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
                 return this.$message.error("图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
                 return this.$message.error("链接标题不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
                 return this.$message.error("链接描述不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
                 return this.$message.error("链接图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
                 return this.$message.error("链接地址不能为空")
               }
 

+ 45 - 45
src/views/qw/sopUserLogsInfo/sendMsgSopOpenTool.vue

@@ -88,39 +88,39 @@
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1"  :width="150" :height="150" />
 
-                    <div v-if="item.contentType == 3 || item.contentType ==9 ">
-                      <el-card class="box-card">
-                        <el-form-item label="链接标题:"  label-width="100px">
-                          <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
-                        </el-form-item>
-                        <el-form-item label="链接描述:"   label-width="100px" >
-                          <el-input type="textarea" :rows="3" v-model="item.linkDescribe" placeholder="请输入链接描述" style="width: 90%;margin-top: 1%;"/>
-                        </el-form-item>
-                        <el-form-item label="链接封面:"   label-width="100px">
-                          <ImageUpload v-model="item.linkImageUrl" type="image" :num="1" :file-size="2" :width="150" :height="150" style="margin-top: 1%;" />
-                        </el-form-item>
-                        <el-form-item label="链接地址:"  label-width="100px" >
-                          <el-tag type="warning" v-model="item.isBindUrl=1">选择的课程小节 即为卡片链接地址</el-tag>
-                        </el-form-item>
-                      </el-card>
-                    </div>
+                      <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18">
+                        <el-card class="box-card">
+                          <el-form-item label="链接标题:"  label-width="100px">
+                            <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
+                          </el-form-item>
+                          <el-form-item label="链接描述:"   label-width="100px" >
+                            <el-input type="textarea" :rows="3" v-model="item.linkDescribe" placeholder="请输入链接描述" style="width: 90%;margin-top: 1%;"/>
+                          </el-form-item>
+                          <el-form-item label="链接封面:"   label-width="100px">
+                            <ImageUpload v-model="item.linkImageUrl" type="image" :num="1" :file-size="2" :width="150" :height="150" style="margin-top: 1%;" />
+                          </el-form-item>
+                          <el-form-item label="链接地址:"  label-width="100px" >
+                            <el-tag type="warning" v-model="item.isBindUrl=1">选择的课程小节 即为卡片链接地址</el-tag>
+                          </el-form-item>
+                        </el-card>
+                      </div>
                     <div v-if="item.contentType == 4 || item.contentType == 10 || item.contentType == 17 || item.contentType == 23">
-                      <el-card class="box-card">
-                        <el-form-item label="标题" prop="miniprogramTitle">
-                          <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字"  />
-                        </el-form-item>
-                        <el-form-item label="封面" prop="miniprogramPicUrl">
-                          <ImageUpload v-model="item.miniprogramPicUrl"  type="image" :num="10" :width="150" :height="150" />
-                        </el-form-item>
-                        <el-form-item label="appid" prop="miniprogramAppid" v-show="false" >
-                          <el-input v-model="item.miniprogramAppid='wx73f85f8d62769119' " disabled />
-                        </el-form-item>
-                        <el-form-item label="page路径" prop="miniprogramPage" v-show="item.contentType == 10" label-width="100px" style="margin-left: -30px" >
-                          <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" type="textarea" :rows="3" />
-                        </el-form-item>
-                      </el-card>
-                    </div>
-                    <div v-if="item.contentType == 5 ">
+                        <el-card class="box-card">
+                          <el-form-item label="标题" prop="miniprogramTitle">
+                            <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字"  />
+                          </el-form-item>
+                          <el-form-item label="封面" prop="miniprogramPicUrl">
+                            <ImageUpload v-model="item.miniprogramPicUrl"  type="image" :num="10" :width="150" :height="150" />
+                          </el-form-item>
+                          <el-form-item label="appid" prop="miniprogramAppid" v-show="false" >
+                            <el-input v-model="item.miniprogramAppid='wx73f85f8d62769119' " disabled />
+                          </el-form-item>
+                          <el-form-item label="page路径" prop="miniprogramPage" v-show="item.contentType == 10" label-width="100px" style="margin-left: -30px" >
+                            <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" type="textarea" :rows="3" />
+                          </el-form-item>
+                        </el-card>
+                      </div>
+                      <div v-if="item.contentType == 5 ">
 
                       <el-form-item label="上传文件:" prop="fileUrl" label-width="100px">
                         <el-upload
@@ -204,7 +204,7 @@
                       </el-card>
                     </div>
 
-                    <div v-if="item.contentType == 12 || item.contentType == 18 || item.contentType == 19 || item.contentType == 24">
+                    <div v-if="item.contentType == 12 || item.contentType == 19 || item.contentType == 24">
                       <el-card class="box-card">
                         <el-form-item label="直播间" >
                           <el-select  v-model="item.liveId"
@@ -516,12 +516,12 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
-            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
+            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
 
-            if ( this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17 
+            if ( this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17
               || this.setting[i].contentType == 23){//新增APP 看课 跳转短链回填封面
               this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
             }
@@ -544,7 +544,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
@@ -552,7 +552,7 @@ export default {
               }
             }
 
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17 
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17
               || this.setting[i].contentType == 23){//新增APP 看课 跳转短链回填标题
               this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
 
@@ -776,12 +776,12 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse  && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
 
             }
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17 
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17
               || this.setting[i].contentType == 23){
               this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
 
@@ -801,7 +801,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo  && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
@@ -809,7 +809,7 @@ export default {
               }
 
             }
-            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17 
+            if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 || this.setting[i].contentType == 17
               || this.setting[i].contentType == 23){
               this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
 
@@ -894,16 +894,16 @@ export default {
               if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
                 return this.$message.error("图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
                 return this.$message.error("链接标题不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
                 return this.$message.error("链接描述不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
                 return this.$message.error("链接图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
                 return this.$message.error("链接地址不能为空")
               }
 

+ 9 - 9
src/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue

@@ -332,7 +332,7 @@
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1"  :width="150" :height="150" />
 
-                    <div v-if="item.contentType == 3 || item.contentType ==9 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9 || item.contentType ==18">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:"  label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -1007,7 +1007,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
-            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
+            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 ){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -1034,7 +1034,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType ==18 ){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
 
               if (this.projectFrom == 'sxjz' && selectedVideo.dictImgUrl) {
@@ -1258,7 +1258,7 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse  && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -1279,7 +1279,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo  && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
 
               if (this.msgForm.videoId != null) {
@@ -1512,16 +1512,16 @@ export default {
             if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
               return this.$message.error("图片不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
               return this.$message.error("链接标题不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
               return this.$message.error("链接描述不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
               return this.$message.error("链接图片不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
               return this.$message.error("链接地址不能为空")
             }