index.vue 42 KB

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