watchLog.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
  4. <el-form-item label="看课方式" prop="sendType">
  5. <el-select v-model="queryParams.sendType" placeholder="选择看课方式" clearable size="small" @change="handleSendTypeChange">
  6. <el-option
  7. v-for="dict in sendTypeOptions"
  8. :key="dict.dictValue"
  9. :label="dict.dictLabel"
  10. :value="dict.dictValue"
  11. />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="项目" prop="project">
  15. <el-select v-model="queryParams.project" placeholder="请选择项目" clearable size="small" >
  16. <el-option
  17. v-for="item in projectOptions"
  18. :key="item.dictValue"
  19. :label="item.dictLabel"
  20. :value="item.dictValue"
  21. />
  22. </el-select>
  23. </el-form-item>
  24. <el-form-item label="企微账号" prop="qwUserId" v-if="queryParams.sendType == 2">
  25. <el-select v-model="queryParams.qwUserId" placeholder="企微账号" clearable size="small"
  26. @change="updateQwuser()">
  27. <el-option
  28. v-for="dict in myQwUserList"
  29. :key="dict.dictValue"
  30. :label="dict.dictLabel + '('+dict.corpName+')'"
  31. :value="dict.dictValue"
  32. />
  33. </el-select>
  34. </el-form-item>
  35. <el-form-item label="客户ID" prop="qwExternalContactId" v-if="queryParams.sendType == 2">
  36. <el-input
  37. v-model="queryParams.qwExternalContactId"
  38. placeholder="请输入客户ID"
  39. clearable
  40. size="small"
  41. @keyup.enter.native="handleQuery"
  42. />
  43. </el-form-item>
  44. <el-form-item label="会员ID" prop="userId" v-if="queryParams.sendType == 1">
  45. <el-input
  46. v-model="queryParams.userId"
  47. placeholder="请输入会员ID"
  48. clearable
  49. size="small"
  50. @keyup.enter.native="handleQuery"
  51. />
  52. </el-form-item>
  53. <el-form-item label="会员昵称" prop="nickName" v-if="queryParams.sendType == 1">
  54. <el-input
  55. v-model="queryParams.nickName"
  56. placeholder="请输入会员昵称"
  57. clearable
  58. size="small"
  59. @keyup.enter.native="handleQuery"
  60. />
  61. </el-form-item>
  62. <el-form-item label="企微客户昵称" prop="nickName" v-if="queryParams.sendType == 2">
  63. <el-input
  64. v-model="queryParams.externalUserName"
  65. placeholder="请输入企微客户昵称"
  66. clearable
  67. size="small"
  68. @keyup.enter.native="handleQuery"
  69. />
  70. </el-form-item>
  71. <el-form-item label="课程" prop="courseId">
  72. <el-select filterable v-model="queryParams.courseId" placeholder="请选择课程" clearable size="small"
  73. @change="courseChange(queryParams.courseId)">
  74. <el-option
  75. v-for="dict in courseLists"
  76. :key="dict.dictValue"
  77. :label="dict.dictLabel"
  78. :value="dict.dictValue"
  79. />
  80. </el-select>
  81. </el-form-item>
  82. <el-form-item label="小节" prop="videoId">
  83. <el-select filterable v-model="queryParams.videoId" placeholder="请选择小节" clearable size="small">
  84. <el-option
  85. v-for="dict in videoList"
  86. :key="dict.dictValue"
  87. :label="dict.dictLabel"
  88. :value="dict.dictValue"
  89. />
  90. </el-select>
  91. </el-form-item>
  92. <!-- sop名称 -->
  93. <el-form-item label="SOP名称" prop="sopId" v-if="queryParams.sendType == 2">
  94. <el-autocomplete
  95. v-model="sopSearchText"
  96. :fetch-suggestions="querySopAsync"
  97. placeholder="请输入SOP名称"
  98. clearable
  99. size="small"
  100. style="width: 200px"
  101. @select="handleSopSelect"
  102. @clear="handleSopClear"
  103. :trigger-on-focus="false"
  104. >
  105. <template slot-scope="{ item }">
  106. <div class="sop-item">
  107. <span class="sop-name">{{ item.name }}</span>
  108. </div>
  109. </template>
  110. </el-autocomplete>
  111. </el-form-item>
  112. <!-- 营期时间 -->
  113. <el-form-item label="营期时间" prop="scheduleTime">
  114. <el-input
  115. v-model="scheduleTimeText"
  116. placeholder="请选择营期时间"
  117. readonly
  118. @click.native="showScheduleCalendar = true"
  119. />
  120. <calendar
  121. v-model="scheduleTime"
  122. mode="during"
  123. :show.sync="showScheduleCalendar"
  124. @change="handleScheduleTimeChange"
  125. :key="scheduleCalendarKey"
  126. />
  127. </el-form-item>
  128. <!-- 创建时间 -->
  129. <el-form-item label="创建时间" prop="createTime">
  130. <el-input
  131. v-model="createTimeText"
  132. placeholder="请选择创建时间"
  133. readonly
  134. @click.native="showCreateCalendar = true"
  135. />
  136. <calendar
  137. v-model="createTime"
  138. mode="during"
  139. :show.sync="showCreateCalendar"
  140. @change="createChange"
  141. :key="createCalendarKey"
  142. />
  143. </el-form-item>
  144. <!-- 最新更新时间 -->
  145. <el-form-item label="最新更新时间" prop="updateTime">
  146. <el-input
  147. v-model="updateTimeText"
  148. placeholder="请选择更新时间"
  149. readonly
  150. @click.native="showUpdateCalendar = true"
  151. />
  152. <calendar
  153. v-model="updateTime"
  154. mode="during"
  155. :show.sync="showUpdateCalendar"
  156. @change="updateChange"
  157. :key="updateCalendarKey"
  158. />
  159. </el-form-item>
  160. <!-- 进线时间 -->
  161. <el-form-item label="进线时间" prop="qecCreateTime">
  162. <el-input
  163. v-model="qecCreateTimeText"
  164. placeholder="请选择进线时间"
  165. readonly
  166. @click.native="showQecCalendar = true"
  167. />
  168. <calendar
  169. v-model="qecCreateTime"
  170. mode="during"
  171. :show.sync="showQecCalendar"
  172. @change="qecCreateTimeChange"
  173. :key="qecCalendarKey"
  174. />
  175. </el-form-item>
  176. <el-form-item label="是否为会员" prop="isVip">
  177. <el-select
  178. filterable
  179. v-model="queryParams.isVip"
  180. placeholder="请选择是否为会员"
  181. clearable size="small">
  182. <el-option
  183. v-for="dict in isVipList"
  184. :key="dict.dictValue"
  185. :label="dict.dictLabel"
  186. :value="dict.dictValue"
  187. />
  188. </el-select>
  189. </el-form-item>
  190. <el-form-item>
  191. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  192. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  193. </el-form-item>
  194. </el-form>
  195. <el-row :gutter="10" class="mb8">
  196. <el-col :span="1.5">
  197. <el-button
  198. type="warning"
  199. plain
  200. icon="el-icon-download"
  201. size="mini"
  202. :loading="exportLoading"
  203. @click="handleExport"
  204. v-hasPermi="['course:courseWatchLog:myExport']"
  205. >导出
  206. </el-button>
  207. <el-col :span="1.5">
  208. <el-button
  209. type="primary"
  210. plain
  211. size="mini"
  212. @click="addUserTag"
  213. v-hasPermi="['qw:externalContact:addTag']"
  214. >批量添加标签</el-button>
  215. </el-col>
  216. <el-col :span="1.5">
  217. <el-button
  218. type="primary"
  219. plain
  220. size="mini"
  221. @click="delUserTag"
  222. v-hasPermi="['qw:externalContact:delTag']"
  223. >批量移除标签</el-button>
  224. </el-col>
  225. </el-col>
  226. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  227. </el-row>
  228. <el-tabs type="card" v-model="activeName" @tab-click="handleClickX">
  229. <el-tab-pane label="全部" name="00"></el-tab-pane>
  230. <el-tab-pane v-for="(item,index) in logTypeOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
  231. </el-tabs>
  232. <el-table border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange">
  233. <el-table-column type="selection" width="55" align="center"/>
  234. <el-table-column label="记录编号" align="center" prop="logId"/>
  235. <el-table-column label="客户昵称" align="center" prop="externalUserName" v-if="queryParams.sendType == 2"/>
  236. &lt;!&ndash;
  237. <el-table-column label="会员ID" align="center" prop="userId" v-if="queryParams.sendType == 1"/>
  238. &ndash;&gt;
  239. <el-table-column label="客户头像" align="center" prop="externalUserAvatar" v-if="queryParams.sendType == 2">
  240. <template slot-scope="scope">
  241. <el-popover
  242. placement="right"
  243. title=""
  244. trigger="hover">
  245. <img slot="reference" :src="scope.row.externalUserAvatar" style="width: 50px;height: 50px">
  246. <img :src="scope.row.externalUserAvatar" style="max-width: 200px;max-height: 200px">
  247. </el-popover>
  248. </template>
  249. </el-table-column>
  250. <el-table-column label="用户昵称" align="center" v-if="queryParams.sendType == 1">
  251. <template slot-scope="scope">
  252. {{ queryParams.sendType=='1' ? scope.row.fsNickName : scope.row.externalUserName }}
  253. </template>
  254. </el-table-column>
  255. <el-table-column label="头像" align="center" v-if="queryParams.sendType == 1">
  256. <template slot-scope="scope">
  257. <img v-if="queryParams.sendType=='1'" :src="scope.row.fsAvatar" style="width:50px;height:50px" />
  258. <img v-else :src="scope.row.externalUserAvatar" style="width:50px;height:50px" />
  259. </template>
  260. </el-table-column>
  261. <el-table-column label="课程名称" align="center" prop="courseName"/>
  262. <el-table-column label="小节名称" align="center" prop="videoName"/>
  263. <el-table-column label="记录类型" align="center" prop="logType">
  264. <template slot-scope="scope">
  265. <dict-tag :options="logTypeOptions" :value="scope.row.logType"/>
  266. </template>
  267. </el-table-column>
  268. <el-table-column label="播放时长" align="center" prop="duration"/>
  269. <!-- <el-table-column label="所属销售" align="center" prop="companyUserName"/>-->
  270. <!-- <el-table-column label="所属公司" align="center" prop="companyName"/>-->
  271. <!-- <el-table-column label="企微员工名称" align="center" prop="qwUserName"/>-->
  272. <el-table-column label="所属企微" align="center" prop="qwUserName" v-if="queryParams.sendType==2" />
  273. <!-- <el-table-column label="所属发送方式" align="center" prop="sendType"/>-->
  274. <el-table-column label="创建时间" align="center" prop="createTime" width="100px"/>
  275. <el-table-column label="更新时间" align="center" prop="updateTime" width="100px" />
  276. <el-table-column label="完课时间" align="center" prop="finishTime" width="100px" />
  277. <el-table-column label="营期时间" align="center" prop="campPeriodTime" />
  278. <el-table-column
  279. fixed="right"
  280. label="操作"
  281. width="100">
  282. <template slot-scope="scope">
  283. <el-button @click="openAnswerLogFun(scope.row)" type="text" size="small">答题记录</el-button>
  284. <el-button @click="openRedLogFun(scope.row)" type="text" size="small">红包记录</el-button>
  285. </template>
  286. </el-table-column>
  287. </el-table>
  288. <pagination
  289. v-show="total>0"
  290. :total="total"
  291. :page.sync="queryParams.pageNum"
  292. :limit.sync="queryParams.pageSize"
  293. @pagination="getList"
  294. />
  295. <el-drawer title="答题记录" :visible.sync="openAnswerLog" size="70%" append-to-body>
  296. <el-table border v-loading="" :data="answerLogsList">
  297. <el-table-column label="会员用户" align="center" prop="userName">
  298. <template slot-scope="scope">
  299. <div style="display: flex;white-space: nowrap">
  300. <div style="margin: auto">
  301. {{ scope.row.userName }}
  302. </div>
  303. <el-popover
  304. placement="right"
  305. title=""
  306. trigger="hover">
  307. <img slot="reference" :src="scope.row.fsAvatar" style="width: 30px;height: 30px">
  308. <img :src="scope.row.fsAvatar" style="max-width: 200px;max-height: 200px">
  309. </el-popover>
  310. </div>
  311. </template>
  312. </el-table-column>
  313. <el-table-column label="课程名称" align="center" prop="courseName"/>
  314. <el-table-column label="小节名称" align="center" prop="videoName"/>
  315. <el-table-column label="是否全部正确" align="center" prop="isRight">
  316. <template slot-scope="scope">
  317. <dict-tag :options="sysCompanyOr" :value="scope.row.isRight"></dict-tag>
  318. </template>
  319. </el-table-column>
  320. <el-table-column label="销售名称" align="center" prop="companyUserName"/>
  321. <el-table-column label="企微员工名称" align="center" prop="qwUserName"/>
  322. <el-table-column label="公司名称" align="center" prop="companyName"/>
  323. <el-table-column label="创建时间" align="center" prop="createTime"/>
  324. </el-table>
  325. <pagination
  326. v-show="answerLogTotal>0"
  327. :total="answerLogTotal"
  328. :page.sync="answerLogQueryParams.pageNum"
  329. :limit.sync="answerLogQueryParams.pageSize"
  330. @pagination="answerLogList"
  331. />
  332. </el-drawer>
  333. <el-drawer title="红包记录" :visible.sync="openRedLog" size="70%" append-to-body>
  334. <el-table border v-loading="" :data="redLogsList">
  335. <el-table-column type="selection" width="55" align="center" />
  336. <el-table-column label="记录编号" align="center" prop="logId" />
  337. <el-table-column label="批次单号" align="center" prop="outBatchNo" />
  338. <el-table-column label="课程名称" align="center" prop="courseId" >
  339. <template slot-scope="scope">
  340. <span prop="status" v-for="(item, index) in courseLists" v-if="scope.row.courseId==item.dictValue">{{item.dictLabel}}</span>
  341. </template>
  342. </el-table-column>
  343. <el-table-column label="小节名称" align="center" prop="title" />
  344. <!-- <el-table-column label="会员id" align="center" prop="userId" />-->
  345. <el-table-column label="会员用户" align="center" prop="fsNickName">
  346. <template slot-scope="scope">
  347. <div style="display: flex;white-space: nowrap">
  348. <div style="margin: auto">
  349. {{scope.row.fsNickName}}
  350. </div>
  351. <el-popover
  352. placement="right"
  353. title=""
  354. trigger="hover">
  355. <img slot="reference" :src="scope.row.fsAvatar" style="width: 30px;height: 30px">
  356. <img :src="scope.row.fsAvatar" style="max-width: 200px;max-height: 200px">
  357. </el-popover>
  358. </div>
  359. </template>
  360. </el-table-column>
  361. <!-- <el-table-column label="会员电话" align="center" prop="phone" />-->
  362. <!-- <el-table-column label="所属销售" align="center" prop="companyUserName" />-->
  363. <!-- <el-table-column label="所属公司" align="center" prop="companyName" />-->
  364. <el-table-column label="转帐金额" align="center" prop="amount" />
  365. <el-table-column label="状态" align="center" prop="status" >
  366. <template slot-scope="scope">
  367. <el-tag>
  368. {{
  369. scope.row.status === 0 ? "发送中" :
  370. scope.row.status === 2 ? "待补发" :
  371. "已完成"
  372. }}
  373. </el-tag>
  374. </template>
  375. </el-table-column>
  376. <el-table-column label="所属企微" align="center" prop="qwUserName" />
  377. <el-table-column label="创建时间" align="center" prop="createTime" />
  378. </el-table>
  379. <pagination
  380. v-show="redLogTotal>0"
  381. :total="redLogTotal"
  382. :page.sync="redLogQueryParams.pageNum"
  383. :limit.sync="redLogQueryParams.pageSize"
  384. @pagination="redLogList"
  385. />
  386. </el-drawer>
  387. <el-dialog title="批量添加标签" :visible.sync="tagOpen" width="800px" append-to-body>
  388. <div>搜索标签:
  389. <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  390. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
  391. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  392. </div>
  393. <el-form ref="form" :model="addTagFormByWatch" label-width="80px">
  394. <div v-for="item in tagGroupList" :key="item.id" >
  395. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  396. <span class="name-background">{{ item.name }}</span>
  397. </div>
  398. <!-- 添加外层滚动容器 -->
  399. <div class="scroll-wrapper">
  400. <div class="tag-container">
  401. <a
  402. v-for="tagItem in item.tag"
  403. class="tag-box"
  404. @click="tagSelection(tagItem)"
  405. :class="{ 'tag-selected': tagItem.isSelected }"
  406. >
  407. {{ tagItem.name }}
  408. </a>
  409. </div>
  410. </div>
  411. </div>
  412. </el-form>
  413. <pagination
  414. v-show="tagTotal>0"
  415. :total="tagTotal"
  416. :page.sync="queryTagParams.pageNum"
  417. :limit.sync="queryTagParams.pageSize"
  418. @pagination="getPageListTagGroup"
  419. />
  420. <div slot="footer" class="dialog-footer">
  421. <el-button type="primary" @click="addTagSubmitForm()">确 定</el-button>
  422. <el-button @click="addTagCancel">取 消</el-button>
  423. </div>
  424. </el-dialog>
  425. <el-dialog title="批量移除标签" :visible.sync="tagDelOpen" width="800px" append-to-body>
  426. <div>搜索标签:
  427. <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  428. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
  429. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  430. </div>
  431. <el-form ref="form" :model="addTagFormByWatch" label-width="80px">
  432. <div v-for="item in tagGroupList" :key="item.id" >
  433. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  434. <span class="name-background">{{ item.name }}</span>
  435. </div>
  436. <!-- 添加外层滚动容器 -->
  437. <div class="scroll-wrapper">
  438. <div class="tag-container">
  439. <a
  440. v-for="tagItem in item.tag"
  441. class="tag-box"
  442. @click="tagSelection(tagItem)"
  443. :class="{ 'tag-selected': tagItem.isSelected }"
  444. >
  445. {{ tagItem.name }}
  446. </a>
  447. </div>
  448. </div>
  449. </div>
  450. </el-form>
  451. <pagination
  452. v-show="tagTotal>0"
  453. :total="tagTotal"
  454. :page.sync="queryTagParams.pageNum"
  455. :limit.sync="queryTagParams.pageSize"
  456. @pagination="getPageListTagGroup"
  457. />
  458. <div slot="footer" class="dialog-footer">
  459. <el-button type="primary" @click="tagDelSubmitForm()">确 定</el-button>
  460. <el-button @click="DelTagCancel">取 消</el-button>
  461. </div>
  462. </el-dialog>
  463. <el-dialog
  464. :title="resultTitle"
  465. :visible.sync="resultDialogVisible"
  466. width="50%"
  467. custom-class="feedback-dialog"
  468. >
  469. <pre style="white-space: pre-wrap; font-family: inherit;">{{ resultMessage }}</pre>
  470. <span slot="footer" class="dialog-footer">
  471. <el-button @click="resultDialogVisible = false">关闭</el-button>
  472. </span>
  473. </el-dialog>
  474. </div>
  475. </template>
  476. <script>
  477. import {
  478. addCourseWatchLog,
  479. delCourseWatchLog,
  480. exportCourseWatchLog,
  481. getCourseWatchLog, myExportCourseWatchLog,
  482. myListCourseWatchLog,
  483. updateCourseWatchLog
  484. } from "@/api/course/courseWatchLog";
  485. import {courseList, myListCourseRedPacketLog, videoList} from '@/api/course/courseRedPacketLog'
  486. import {myListLogs} from "@/api/course/courseAnswerlogs";
  487. import {getMyQwUserList} from "@/api/qw/user";
  488. import {searchTags} from "../../../api/qw/tag";
  489. import {addTagByWatch, delTagByWatch} from "../../../api/qw/externalContact";
  490. import {allListTagGroup} from "../../../api/qw/tagGroup";
  491. import Vue from 'vue'
  492. import Calendar from 'vue-mobile-calendar'
  493. import {infoSop} from "@/api/qw/sop";
  494. Vue.use(Calendar)
  495. export default {
  496. name: "CourseWatchLog",
  497. data() {
  498. return {
  499. // 日历 key 控制刷新
  500. scheduleCalendarKey: 0,
  501. createCalendarKey: 0,
  502. updateCalendarKey: 0,
  503. qecCalendarKey: 0,
  504. createTimeText: '',
  505. scheduleTimeText: '', // 新增
  506. updateTimeText: '', // 新增
  507. qecCreateTimeText: '', // 新增
  508. scheduleTime: [], // 改为数组
  509. createTime: [], // 改为数组
  510. updateTime: [], // 改为数组
  511. qecCreateTime: [], // 改为数组
  512. // 控制日历显隐
  513. showScheduleCalendar: false,
  514. showCreateCalendar: false,
  515. showUpdateCalendar: false,
  516. showQecCalendar: false,
  517. resultDialogVisible: false,
  518. resultMessage: '',
  519. resultTitle:'',
  520. activeName:"2",
  521. pickerOptions: {
  522. disabledDate(time) {
  523. // 获取6天前的日期(加上今天就是7天)
  524. const sixDaysAgo = new Date();
  525. sixDaysAgo.setDate(sixDaysAgo.getDate() - 6);
  526. sixDaysAgo.setHours(0, 0, 0, 0);
  527. // 获取明天的日期(不包括今天)
  528. const tomorrow = new Date();
  529. tomorrow.setDate(tomorrow.getDate() + 1);
  530. tomorrow.setHours(0, 0, 0, 0);
  531. return time.getTime() < sixDaysAgo.getTime() || time.getTime() >= tomorrow.getTime();
  532. }
  533. },
  534. courseLists: [],
  535. videoList: [],
  536. myQwUserList: [],
  537. logTypeOptions: [],
  538. // 遮罩层
  539. loading: true,
  540. // 导出遮罩层
  541. exportLoading: false,
  542. // 选中数组
  543. ids: [],
  544. // 非单个禁用
  545. single: true,
  546. // 非多个禁用
  547. multiple: true,
  548. // 显示搜索条件
  549. showSearch: true,
  550. sysCompanyOr: [],
  551. // 总条数
  552. total: 0,
  553. // 短链课程看课记录表格数据
  554. courseWatchLogList: [],
  555. openAnswerLog: false,
  556. loadingAnswerLog: true,
  557. answerLogsList: [],
  558. answerLogTotal: 0,
  559. answerLogQueryParams: {
  560. pageNum: 1,
  561. pageSize: 10,
  562. },
  563. projectOptions:[],
  564. sendTypeOptions:[{
  565. dictLabel:"会员",dictValue:'1'
  566. },
  567. {
  568. dictLabel:"企微",dictValue:'2'
  569. }
  570. ],
  571. openRedLog: false,
  572. loadingRedLog: true,
  573. redLogsList: [],
  574. redLogTotal: 0,
  575. redLogQueryParams: {
  576. pageNum: 1,
  577. pageSize: 10,
  578. },
  579. // 弹出层标题
  580. title: "",
  581. // 是否显示弹出层
  582. open: false,
  583. tagOpen:false,
  584. //标签弹窗选择
  585. tagChange:{
  586. open:false,
  587. index:null,
  588. },
  589. addTagFormByWatch:{
  590. logId:[],
  591. tagIds:[]
  592. },
  593. tagGroupList: [],
  594. tagTotal:0,
  595. tagDelOpen:false,
  596. queryTagParams:{
  597. pageNum: 1,
  598. pageSize: 5,
  599. total:0,
  600. name:null,
  601. corpId:null,
  602. },
  603. isVipList: [
  604. { dictLabel: '是', dictValue: 1 },
  605. { dictLabel: '否', dictValue: 0 }
  606. ],
  607. // SOP搜索相关
  608. sopSearchText: '', // SOP搜索框显示的文本
  609. selectedSopId: null, // 选中的SOP ID
  610. // 查询参数
  611. queryParams: {
  612. pageNum: 1,
  613. project: null,
  614. pageSize: 10,
  615. userId: null,
  616. videoId: null,
  617. nickName: null,
  618. logType: 2,
  619. qwExternalContactId: null,
  620. externalUserName:null,
  621. duration: null,
  622. qwUserId: null,
  623. companyUserId: null,
  624. companyId: null,
  625. courseId: null,
  626. sTime: null,
  627. eTime: null,
  628. upSTime:null,
  629. upETime:null,
  630. qecSTime:null,
  631. qecETime:null,
  632. scheduleStartTime: null,
  633. scheduleEndTime: null,
  634. sendType:process.env.VUE_APP_COURSE_DEFAULT,
  635. isVip: null,
  636. sopId: null, // sopId
  637. },
  638. // 表单参数
  639. form: {},
  640. // 表单校验
  641. rules: {}
  642. };
  643. },
  644. created() {
  645. courseList().then(response => {
  646. this.courseLists = response.list;
  647. });
  648. this.getList();
  649. this.getDicts("sys_course_watch_log_type").then(response => {
  650. this.logTypeOptions = response.data;
  651. });
  652. this.getDicts("sys_company_or").then(response => {
  653. this.sysCompanyOr = response.data;
  654. });
  655. getMyQwUserList().then(response => {
  656. this.myQwUserList = response.data;
  657. });
  658. this.getDicts("sys_course_project").then(response => {
  659. this.projectOptions = response.data;
  660. });
  661. },
  662. methods: {
  663. handleSendTypeChange() {
  664. this.handleQuery(); // 重新查询列表
  665. },
  666. // 重置日历组件
  667. resetCalendars() {
  668. this.scheduleTime = [];
  669. this.createTime = [];
  670. this.updateTime = [];
  671. this.qecCreateTime = [];
  672. this.scheduleTimeText = '';
  673. this.createTimeText = '';
  674. this.updateTimeText = '';
  675. this.qecCreateTimeText = '';
  676. // 强制刷新日历组件
  677. this.scheduleCalendarKey++;
  678. this.createCalendarKey++;
  679. this.updateCalendarKey++;
  680. this.qecCalendarKey++;
  681. },
  682. formatDateRange(dates) {
  683. if (!dates || dates.length < 2) return '';
  684. return dates.map(date => date.format('YYYY-MM-DD')).join(' ~ ');
  685. },
  686. courseChange(row) {
  687. this.queryParams.videoId = null;
  688. if (row === '') {
  689. this.videoList = [];
  690. return
  691. }
  692. videoList(row).then(response => {
  693. this.videoList = response.list
  694. });
  695. },
  696. updateQwuser() {
  697. for (const user of this.myQwUserList) {
  698. if (user.dictValue == this.queryParams.qwUserId) {
  699. this.queryParams.corpId = user.corpId;
  700. break;
  701. }
  702. }
  703. this.getList();
  704. },
  705. handleClickX(tab) {
  706. this.activeName=tab.name;
  707. if(tab.name=="00"){
  708. this.queryParams.logType=null;
  709. }else{
  710. this.queryParams.logType=tab.name;
  711. }
  712. this.getList()
  713. },
  714. // 营期时间
  715. handleScheduleTimeChange(scheduleTime) {
  716. if (scheduleTime && scheduleTime.length >= 2) {
  717. this.scheduleTimeText = this.formatDateRange(scheduleTime);
  718. this.queryParams.scheduleStartTime = scheduleTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
  719. this.queryParams.scheduleEndTime = scheduleTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
  720. console.log(this.queryParams.scheduleStartTime)
  721. console.log(this.queryParams.scheduleEndTime)
  722. } else {
  723. this.scheduleTimeText = '';
  724. this.queryParams.scheduleStartTime = null;
  725. this.queryParams.scheduleEndTime = null;
  726. }
  727. },
  728. // 创建时间
  729. createChange(createTime) {
  730. if (createTime && createTime.length >= 2) {
  731. this.createTimeText = this.formatDateRange(createTime);
  732. this.queryParams.sTime = createTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
  733. this.queryParams.eTime = createTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
  734. } else {
  735. this.createTimeText = '';
  736. this.queryParams.sTime = null;
  737. this.queryParams.eTime = null;
  738. }
  739. },
  740. // 更新时间
  741. updateChange(updateTime) {
  742. if (updateTime && updateTime.length >= 2) {
  743. this.updateTimeText = this.formatDateRange(updateTime);
  744. this.queryParams.upSTime = updateTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
  745. this.queryParams.upETime = updateTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
  746. } else {
  747. this.updateTimeText = '';
  748. this.queryParams.upSTime = null;
  749. this.queryParams.upETime = null;
  750. }
  751. },
  752. // 进线时间
  753. qecCreateTimeChange(qecCreateTime) {
  754. if (qecCreateTime && qecCreateTime.length >= 2) {
  755. // 检查选择的日期范围是否超过7天(包括起始和结束日期)
  756. const startDate = new Date(qecCreateTime[0]);
  757. const endDate = new Date(qecCreateTime[1]);
  758. // 设置时间为当天开始,避免时间部分影响计算
  759. startDate.setHours(0, 0, 0, 0);
  760. endDate.setHours(0, 0, 0, 0);
  761. const timeDiff = Math.abs(endDate - startDate);
  762. const diffDays = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
  763. // 如果超过6天的范围(总共7天,包括起始日)
  764. if (diffDays > 6) {
  765. this.$message.error('进线时间选择范围不能超过7天');
  766. // 清空选择
  767. this.qecCreateTime = [];
  768. this.qecCreateTimeText = '';
  769. this.queryParams.qecSTime = null;
  770. this.queryParams.qecETime = null;
  771. this.qecCalendarKey++;
  772. return;
  773. }
  774. this.qecCreateTimeText = this.formatDateRange(qecCreateTime);
  775. this.queryParams.qecSTime = qecCreateTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
  776. this.queryParams.qecETime = qecCreateTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
  777. } else {
  778. this.qecCreateTimeText = '';
  779. this.queryParams.qecSTime = null;
  780. this.queryParams.qecETime = null;
  781. }
  782. },
  783. /** 查询短链课程看课记录列表 */
  784. getList() {
  785. this.loading = true;
  786. let param = JSON.parse(JSON.stringify(this.queryParams));
  787. if (param.logType == "10") {
  788. param.logType = null;
  789. }
  790. myListCourseWatchLog(param).then(response => {
  791. this.courseWatchLogList = response.rows;
  792. this.total = response.total;
  793. this.loading = false;
  794. });
  795. },
  796. // 取消按钮
  797. cancel() {
  798. this.open = false;
  799. this.reset();
  800. },
  801. // 表单重置
  802. reset() {
  803. this.form = {
  804. logId: null,
  805. userId: null,
  806. videoId: null,
  807. logType: null,
  808. createTime: null,
  809. updateTime: null,
  810. qwExternalContactId: null,
  811. externalUserName:null,
  812. duration: null,
  813. qwUserId: null,
  814. companyUserId: null,
  815. companyId: null,
  816. courseId: null,
  817. sTime:null,
  818. eTime:null,
  819. upSTime:null,
  820. upETime:null,
  821. qecSTime:null,
  822. qecETime:null,
  823. scheduleStartTime: null,
  824. scheduleEndTime: null,
  825. };
  826. // 统一重置日历组件
  827. this.resetCalendars();
  828. this.resetForm("form");
  829. },
  830. /** 搜索按钮操作 */
  831. handleQuery() {
  832. this.queryParams.pageNum = 1;
  833. this.getList();
  834. },
  835. /** 重置按钮操作 */
  836. resetQuery() {
  837. this.resetForm("queryForm");
  838. this.queryParams.sTime = null;
  839. this.queryParams.eTime = null;
  840. this.queryParams.project = null;
  841. this.queryParams.upSTime = null;
  842. this.queryParams.upETime = null;
  843. this.queryParams.qecSTime = null;
  844. this.queryParams.qecETime = null;
  845. this.queryParams.scheduleStartTime = null;
  846. this.queryParams.scheduleEndTime = null;
  847. this.queryParams.sopId = null; // 重置SOP ID
  848. // 重置SOP搜索
  849. this.handleSopClear();
  850. // 统一重置日历组件
  851. this.resetCalendars();
  852. this.handleQuery();
  853. },
  854. // 多选框选中数据
  855. handleSelectionChange(selection) {
  856. this.ids = selection.map(item => item.logId)
  857. this.single = selection.length !== 1
  858. this.multiple = !selection.length
  859. },
  860. /** 新增按钮操作 */
  861. handleAdd() {
  862. this.reset();
  863. this.open = true;
  864. this.title = "添加短链课程看课记录";
  865. },
  866. /** 修改按钮操作 */
  867. handleUpdate(row) {
  868. this.reset();
  869. const logId = row.logId || this.ids
  870. getCourseWatchLog(logId).then(response => {
  871. this.form = response.data;
  872. this.open = true;
  873. this.title = "修改短链课程看课记录";
  874. });
  875. },
  876. /** 提交按钮 */
  877. submitForm() {
  878. this.$refs["form"].validate(valid => {
  879. if (valid) {
  880. if (this.form.logId != null) {
  881. updateCourseWatchLog(this.form).then(response => {
  882. this.msgSuccess("修改成功");
  883. this.open = false;
  884. this.getList();
  885. });
  886. } else {
  887. addCourseWatchLog(this.form).then(response => {
  888. this.msgSuccess("新增成功");
  889. this.open = false;
  890. this.getList();
  891. });
  892. }
  893. }
  894. });
  895. },
  896. /** 删除按钮操作 */
  897. handleDelete(row) {
  898. const logIds = row.logId || this.ids;
  899. this.$confirm('是否确认删除短链课程看课记录编号为"' + logIds + '"的数据项?', "警告", {
  900. confirmButtonText: "确定",
  901. cancelButtonText: "取消",
  902. type: "warning"
  903. }).then(function () {
  904. return delCourseWatchLog(logIds);
  905. }).then(() => {
  906. this.getList();
  907. this.msgSuccess("删除成功");
  908. }).catch(() => {
  909. });
  910. },
  911. /** 导出按钮操作 */
  912. handleExport() {
  913. const queryParams = this.queryParams;
  914. this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
  915. confirmButtonText: "确定",
  916. cancelButtonText: "取消",
  917. type: "warning"
  918. }).then(() => {
  919. this.exportLoading = true;
  920. return myExportCourseWatchLog(queryParams);
  921. }).then(response => {
  922. this.download(response.msg);
  923. this.exportLoading = false;
  924. }).catch(() => {
  925. });
  926. },
  927. openAnswerLogFun(row) {
  928. this.openAnswerLog = true;
  929. this.answerLogQueryParams.watchLogId = row.logId;
  930. this.answerLogList();
  931. },
  932. answerLogList() {
  933. this.loadingAnswerLog = true;
  934. myListLogs(this.answerLogQueryParams).then(e => {
  935. this.answerLogsList = e.rows;
  936. this.answerLogTotal = e.total;
  937. this.loadingAnswerLog = false;
  938. })
  939. },
  940. openRedLogFun(row) {
  941. this.openRedLog = true;
  942. this.redLogQueryParams.watchLogId = row.logId;
  943. this.redLogList();
  944. },
  945. redLogList() {
  946. this.loadingRedLog = true;
  947. console.info("-----watch",this.redLogQueryParams)
  948. myListCourseRedPacketLog(this.redLogQueryParams).then(e => {
  949. this.redLogsList = e.rows;
  950. this.redLogTotal = e.total;
  951. this.loadingRedLog = false;
  952. })
  953. },
  954. addUserTag(){
  955. if(this.ids==null||this.ids==""){
  956. return this.$message('请选择需要添加标签的客户');
  957. }
  958. this.getPageListTagGroup();
  959. setTimeout(() => {
  960. for (let i = 0; i < this.tagGroupList.length; i++) {
  961. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  962. this.tagGroupList[i].tag[x].isSelected=false;
  963. }
  964. }
  965. }, 200);
  966. this.tagOpen = true;
  967. },
  968. delUserTag(){
  969. if(this.ids==null||this.ids==""){
  970. return this.$message('请选择需要移除标签的客户');
  971. }
  972. this.getPageListTagGroup();
  973. setTimeout(() => {
  974. for (let i = 0; i < this.tagGroupList.length; i++) {
  975. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  976. this.tagGroupList[i].tag[x].isSelected=false;
  977. }
  978. }
  979. }, 200);
  980. this.tagDelOpen = true;
  981. },
  982. getPageListTagGroup(){
  983. this.queryTagParams.corpId=this.queryParams.corpId
  984. allListTagGroup(this.queryTagParams).then(response => {
  985. this.tagGroupList = response.rows;
  986. this.tagTotal = response.total;
  987. });
  988. },
  989. tagSelection(row){
  990. row.isSelected= !row.isSelected;
  991. this.$forceUpdate();
  992. },
  993. handleSearchTags(name){
  994. if (!name){
  995. return this.$message.error("请输入要搜索的标签")
  996. }
  997. this.queryTagParams.name=name;
  998. this.queryTagParams.corpId=this.queryParams.corpId;
  999. searchTags(this.queryTagParams).then(response => {
  1000. this.tagGroupList = response.rows;
  1001. });
  1002. // searchTags({name:name,corpId:this.queryParams.corpId}).then(response => {
  1003. // this.tagGroupList = response.rows;
  1004. // });
  1005. },
  1006. cancelSearchTags(){
  1007. this.resetSearchQueryTag()
  1008. this.getPageListTagGroup();
  1009. },
  1010. resetSearchQueryTag(){
  1011. this.queryTagParams= {
  1012. pageNum: 1,
  1013. pageSize: 5,
  1014. total:0,
  1015. name:null,
  1016. };
  1017. },
  1018. addTagSubmitForm(){
  1019. for (let i = 0; i < this.tagGroupList.length; i++) {
  1020. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  1021. if(this.tagGroupList[i].tag[x].isSelected==true){
  1022. this.addTagFormByWatch.tagIds.push(this.tagGroupList[i].tag[x].tagId)
  1023. }
  1024. }
  1025. }
  1026. if(this.addTagFormByWatch.tagIds==[]||this.addTagFormByWatch.tagIds==null||this.addTagFormByWatch.tagIds==""){
  1027. return this.$message('请选择标签');
  1028. }
  1029. this.addTagFormByWatch.logIds=this.ids;
  1030. let loadingRock = this.$loading({
  1031. lock: true,
  1032. text: '正在执行中请稍后~~请不要刷新页面!!',
  1033. spinner: 'el-icon-loading',
  1034. background: 'rgba(0, 0, 0, 0.7)'
  1035. });
  1036. addTagByWatch(this.addTagFormByWatch).then(response => {
  1037. // this.msgSuccess(response.msg);
  1038. this.resultMessage = response.msg;
  1039. this.resultDialogVisible = true; // 显示弹窗
  1040. this.resultTitle = '批量添加标签结果';
  1041. this.tagOpen = false;
  1042. loadingRock.close();
  1043. this.addTagFormByWatch={
  1044. logIds:[],
  1045. tagIds:[]
  1046. };
  1047. this.getList()
  1048. }).finally(res=>{
  1049. loadingRock.close();
  1050. });
  1051. },
  1052. tagDelSubmitForm(){
  1053. for (let i = 0; i < this.tagGroupList.length; i++) {
  1054. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  1055. if(this.tagGroupList[i].tag[x].isSelected==true){
  1056. this.addTagFormByWatch.tagIds.push(this.tagGroupList[i].tag[x].tagId)
  1057. }
  1058. }
  1059. }
  1060. if(this.addTagFormByWatch.tagIds==[]||this.addTagFormByWatch.tagIds==null||this.addTagFormByWatch.tagIds==""){
  1061. return this.$message('请选择标签');
  1062. }
  1063. this.addTagFormByWatch.corpId=this.queryParams.corpId
  1064. this.addTagFormByWatch.logIds=this.ids;
  1065. let loadingRock = this.$loading({
  1066. lock: true,
  1067. text: '正在执行中请稍后~~请不要刷新页面!!',
  1068. spinner: 'el-icon-loading',
  1069. background: 'rgba(0, 0, 0, 0.7)'
  1070. });
  1071. delTagByWatch(this.addTagFormByWatch).then(response => {
  1072. // this.msgSuccess(response.msg);
  1073. this.resultMessage = response.msg;
  1074. this.resultDialogVisible = true; // 显示弹窗
  1075. this.resultTitle = '批量移除标签结果';
  1076. this.tagDelOpen = false;
  1077. loadingRock.close();
  1078. this.addTagFormByWatch={
  1079. userIds:[],
  1080. tagIds:[]
  1081. };
  1082. this.getList()
  1083. }).finally(res=>{
  1084. loadingRock.close();
  1085. });
  1086. },
  1087. addTagCancel() {
  1088. this.tagOpen = false;
  1089. this.addTagFormByWatch={
  1090. logIds:[],
  1091. tagIds:[]
  1092. };
  1093. },
  1094. DelTagCancel() {
  1095. this.tagDelOpen = false;
  1096. this.addTagFormByWatch={
  1097. logIds:[],
  1098. tagIds:[]
  1099. };
  1100. },
  1101. /**
  1102. * 异步查询SOP列表
  1103. * @param {string} queryString - 查询字符串
  1104. * @param {function} callback - 回调函数
  1105. */
  1106. querySopAsync(queryString, callback) {
  1107. if (!queryString) {
  1108. callback([]);
  1109. return;
  1110. }
  1111. infoSop({ name: queryString }).then(response => {
  1112. if (response && response.rows) {
  1113. const suggestions = response.rows.map(item => ({
  1114. value: item.name,
  1115. id: item.id,
  1116. name: item.name
  1117. }));
  1118. callback(suggestions);
  1119. } else {
  1120. callback([]);
  1121. }
  1122. }).catch(error => {
  1123. console.error('通过sop查询失败:', error);
  1124. callback([]);
  1125. });
  1126. },
  1127. /**
  1128. * 选择SOP
  1129. * @param {object} item - 选中的SOP项
  1130. */
  1131. handleSopSelect(item) {
  1132. this.selectedSopId = item.id;
  1133. this.queryParams.sopId = item.id;
  1134. this.sopSearchText = item.name;
  1135. },
  1136. /**
  1137. * 清空SOP选择
  1138. */
  1139. handleSopClear() {
  1140. this.selectedSopId = null;
  1141. this.queryParams.sopId = null;
  1142. this.sopSearchText = '';
  1143. },
  1144. }
  1145. };
  1146. </script>
  1147. <style scoped>
  1148. /* CSS 样式 */
  1149. .tag-container {
  1150. display: flex;
  1151. flex-wrap: wrap; /* 超出宽度时自动换行 */
  1152. gap: 8px; /* 设置标签之间的间距 */
  1153. }
  1154. .name-background {
  1155. display: inline-block;
  1156. background-color: #abece6; /* 背景颜色 */
  1157. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  1158. border-radius: 4px; /* 可选:设置圆角 */
  1159. }
  1160. /* CSS 样式 */
  1161. .tag-container {
  1162. display: flex;
  1163. flex-wrap: wrap; /* 超出宽度时自动换行 */
  1164. gap: 8px; /* 设置标签之间的间距 */
  1165. }
  1166. .name-background {
  1167. display: inline-block;
  1168. background-color: #abece6; /* 背景颜色 */
  1169. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  1170. border-radius: 4px; /* 可选:设置圆角 */
  1171. }
  1172. .tag-box {
  1173. padding: 8px 12px;
  1174. border: 1px solid #989797;
  1175. border-radius: 4px;
  1176. cursor: pointer;
  1177. display: inline-block;
  1178. }
  1179. .tag-selected {
  1180. background-color: #00bc98;
  1181. color: #fff;
  1182. border-color: #00bc98;
  1183. }
  1184. .el-tag + .el-tag {
  1185. margin-left: 10px;
  1186. }
  1187. .button-new-tag {
  1188. margin-left: 10px;
  1189. height: 32px;
  1190. line-height: 30px;
  1191. padding-top: 0;
  1192. padding-bottom: 0;
  1193. }
  1194. .input-new-tag {
  1195. width: 90px;
  1196. margin-left: 10px;
  1197. vertical-align: bottom;
  1198. }
  1199. /* 新增的滚动容器样式(不影响原有样式) */
  1200. .scroll-wrapper {
  1201. max-height: 130px; /* 大约三行的高度 */
  1202. overflow-y: auto; /* 垂直滚动 */
  1203. padding-right: 5px; /* 为滚动条留出空间 */
  1204. }
  1205. /* 美化滚动条(可选) */
  1206. .scroll-wrapper::-webkit-scrollbar {
  1207. width: 6px;
  1208. }
  1209. .scroll-wrapper::-webkit-scrollbar-thumb {
  1210. background: rgba(0, 0, 0, 0.2);
  1211. border-radius: 3px;
  1212. }
  1213. /* SOP搜索框样式 */
  1214. .sop-item {
  1215. display: flex;
  1216. align-items: center;
  1217. }
  1218. .sop-name {
  1219. font-size: 14px;
  1220. color: #606266;
  1221. }
  1222. </style>