You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2162 lines
64 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div style="padding:10px;">
  3. <!-- 搜索栏 -->
  4. <div class="search">
  5. <el-form :inline="true">
  6. <el-form-item label="剧本标题:" style="margin-right:50px;">
  7. <el-input
  8. v-model="queryParams.query.title"
  9. style="height:30px;"
  10. placeholder="请输入剧本标题"
  11. />
  12. </el-form-item>
  13. <el-form-item label="工作室:" style="margin-right:50px;">
  14. <el-input
  15. v-model="queryParams.query.studioName"
  16. style="height:30px;"
  17. placeholder="请输入工作室"
  18. />
  19. </el-form-item>
  20. <el-form-item label="标签:" style="margin-right:50px;">
  21. <el-input
  22. v-model="queryParams.query.labelName"
  23. style="height:30px;"
  24. placeholder="请输入标签"
  25. />
  26. </el-form-item>
  27. </el-form>
  28. <div class="search-button">
  29. <el-button
  30. size="medium"
  31. type="primary"
  32. style="height:36px;width:100px;"
  33. @click="search"
  34. >搜索</el-button
  35. >
  36. <el-button
  37. size="medium"
  38. style="margin-left:20px;height:36px;width:100px;"
  39. @click="refresh"
  40. >重置</el-button
  41. >
  42. </div>
  43. </div>
  44. <div class="add-button">
  45. <el-button
  46. size="medium"
  47. type="primary"
  48. style="height:36px;width:100px;"
  49. @click="handleAdd"
  50. >新建</el-button
  51. >
  52. </div>
  53. <!-- 列表 -->
  54. <div class="content">
  55. <el-table
  56. v-loading="loading"
  57. ref="singleTable"
  58. :data="tableData"
  59. border
  60. style="width: 100%"
  61. >
  62. <el-table-column align="center" type="index" label="序号" width="50" />
  63. <el-table-column align="center" property="title" label="剧本标题" />
  64. <el-table-column align="center" property="studioName" label="工作室" />
  65. <el-table-column align="center" property="labelName" label="标签" />
  66. <el-table-column
  67. align="center"
  68. property="createTime"
  69. label="创建时间"
  70. />
  71. <el-table-column align="center" label="操作">
  72. <template slot-scope="scope">
  73. <el-button type="text" size="mini" @click="handleView(scope.row)"
  74. ><div style="color:#000;">查看</div></el-button
  75. >
  76. <el-button type="text" size="mini" @click="handleEdit(scope.row)"
  77. ><div style="color:#02A7F0;">编辑</div></el-button
  78. >
  79. <el-button type="text" size="mini" @click="handleTips(scope.row)"
  80. >Tips维护</el-button
  81. >
  82. <el-button type="text" size="mini" @click="hanDel(scope.row)"
  83. ><div style="color:#D9001B;">删除</div></el-button
  84. >
  85. </template>
  86. </el-table-column>
  87. </el-table>
  88. <pagination
  89. v-show="total > 0"
  90. :total="total"
  91. :page.sync="queryParams.pageNum"
  92. :limit.sync="queryParams.pageSize"
  93. @pagination="queryList"
  94. />
  95. </div>
  96. <!-- 新增表单 -->
  97. <el-dialog
  98. @open="openDialog"
  99. :title="dialog.title"
  100. :visible.sync="dialog.Visible"
  101. width="1000px"
  102. :before-close="handleClose"
  103. >
  104. <el-form
  105. ref="ruleForm"
  106. :model="ruleForm"
  107. :rules="rules"
  108. :inline="true"
  109. label-width="100px"
  110. class="demo-ruleForm"
  111. >
  112. <h3 class="form-title">基本信息</h3>
  113. <el-form-item label="剧本标题:" prop="title" style="width:45%">
  114. <el-input
  115. :disabled="disabled"
  116. v-model="ruleForm.title"
  117. style="width:300px;"
  118. />
  119. </el-form-item>
  120. <el-form-item label="工作室:" prop="studioName" style="width:45%">
  121. <el-input
  122. :disabled="disabled"
  123. v-model="ruleForm.studioName"
  124. style="width:300px;"
  125. />
  126. </el-form-item>
  127. <el-form-item label="标签:" prop="labelName" style="width:100%">
  128. <el-input
  129. :disabled="disabled"
  130. v-model="ruleForm.labelName"
  131. style="width:300px;"
  132. />
  133. </el-form-item>
  134. <h3 class="form-title">剧本图片</h3>
  135. <el-form-item label="封面" prop="cover">
  136. <el-image
  137. v-if="type == 'view'"
  138. style="width: 146px; height: 146px"
  139. :src="ruleForm.cover"
  140. fit="fill"
  141. >
  142. </el-image>
  143. <el-upload
  144. v-if="type == 'add' || type == 'edit'"
  145. class="avatar-uploader"
  146. action
  147. :show-file-list="false"
  148. :auto-upload="false"
  149. :on-change="uploadImg"
  150. :on-success="handleAvatar"
  151. :before-upload="beforeAvatarUpload"
  152. >
  153. <img v-if="ruleForm.cover" :src="ruleForm.cover" class="avatar" />
  154. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  155. </el-upload>
  156. </el-form-item>
  157. <el-form-item label="其它图片" style="width:100%">
  158. <div
  159. v-for="(item, l) in dataImg"
  160. :key="l"
  161. class="imgdata"
  162. style="margin-left:10px;"
  163. >
  164. <el-image
  165. style="width: 146px; height: 146px"
  166. :src="item"
  167. fit="fill"
  168. >
  169. </el-image>
  170. <div class="imgdialog" v-if="type == 'add' || type == 'edit'">
  171. <p>
  172. <i
  173. class="el-icon-delete"
  174. @click="delDataImg(item, l)"
  175. style="font-size: 20px;"
  176. ></i>
  177. </p>
  178. </div>
  179. </div>
  180. <el-upload
  181. v-if="type == 'add' || type == 'edit'"
  182. class="avatar-uploader"
  183. style="float:left;margin-left: 10px;"
  184. action
  185. list-type="picture-card"
  186. :show-file-list="false"
  187. :http-request="changeImgs"
  188. >
  189. <i class="el-icon-plus"></i>
  190. </el-upload>
  191. <!-- <el-upload
  192. v-if="type == 'add' || type == 'edit'"
  193. action
  194. class="avatar-uploader"
  195. list-type="picture-card"
  196. :auto-upload="false"
  197. :on-change="changeImgs"
  198. :on-success="handleAvatarSuccess"
  199. :before-upload="beforeAvatarUpload"
  200. :file-list="dataImgs"
  201. >
  202. <i class="el-icon-plus" />
  203. <div slot="file" slot-scope="{ file }">
  204. <img
  205. class="el-upload-list__item-thumbnail"
  206. :src="file.url"
  207. alt=""
  208. />
  209. <span class="el-upload-list__item-actions">
  210. <span
  211. v-if="!disabled"
  212. class="el-upload-list__item-delete"
  213. @click="handleRemove(file)"
  214. >
  215. <i class="el-icon-delete"></i>
  216. </span>
  217. </span>
  218. </div>
  219. </el-upload> -->
  220. </el-form-item>
  221. <h3 class="form-title">剧本简介</h3>
  222. <el-form-item label="简介" prop="introduction" style="width:100%">
  223. <!-- <el-input
  224. v-if="type == 'view'"
  225. :disabled="disabled"
  226. v-model="ruleForm.introduction"
  227. style="width:700px"
  228. rows="10"
  229. type="textarea"
  230. /> -->
  231. <div
  232. v-if="type == 'view'"
  233. style="width:700px;height:400px;border:1px solid #ddd;padding:10px;"
  234. v-html="ruleForm.introduction"
  235. ></div>
  236. <!-- <Tinymce
  237. v-if="type == 'add' || type == 'edit'"
  238. ref="editor"
  239. v-model="ruleForm.introduction"
  240. :height="400"
  241. :width="700"
  242. /> -->
  243. <el-input
  244. type="textarea"
  245. v-if="type == 'add' || type == 'edit'"
  246. style="width:700px"
  247. rows="10"
  248. placeholder="请输入内容"
  249. v-model="ruleForm.introduction"
  250. ></el-input>
  251. </el-form-item>
  252. <h3 class="form-title">开本流程</h3>
  253. <div v-if="type == 'add' || type == 'edit'">
  254. <el-table
  255. :header-cell-style="{ background: '#eee', color: '#606266' }"
  256. :data="ruleForm.processesList"
  257. border
  258. style="width: 90%;margin-left:30px;"
  259. >
  260. <el-table-column
  261. align="center"
  262. type="index"
  263. label="序号"
  264. width="50"
  265. />
  266. <el-table-column
  267. align="center"
  268. property="title"
  269. label="流程标题"
  270. width="130"
  271. >
  272. <template slot-scope="scope">
  273. <el-input
  274. v-model="ruleForm.processesList[scope.$index].title"
  275. />
  276. </template>
  277. </el-table-column>
  278. <el-table-column
  279. align="center"
  280. property="code"
  281. label="流程编号"
  282. width="100"
  283. >
  284. <template slot-scope="scope">
  285. <el-input
  286. @input="changCode"
  287. v-model.number="ruleForm.processesList[scope.$index].code"
  288. />
  289. </template>
  290. </el-table-column>
  291. <el-table-column
  292. align="center"
  293. property="introduction"
  294. label="简介"
  295. >
  296. <template slot-scope="scope">
  297. <el-input
  298. v-model="ruleForm.processesList[scope.$index].introduction"
  299. />
  300. </template>
  301. </el-table-column>
  302. <el-table-column
  303. align="center"
  304. property="sort"
  305. label="排序"
  306. width="100"
  307. >
  308. <template slot-scope="scope">
  309. <el-input
  310. type="number"
  311. @input="changSort"
  312. @mousewheel.native.prevent
  313. @keyup.native="prevent($event)"
  314. v-model="ruleForm.processesList[scope.$index].sort"
  315. />
  316. </template>
  317. </el-table-column>
  318. <el-table-column align="center" label="操作" width="100">
  319. <template slot-scope="scope">
  320. <el-button type="text" size="mini" @click="Del(scope.$index)"
  321. >删除</el-button
  322. >
  323. </template>
  324. </el-table-column>
  325. </el-table>
  326. </div>
  327. <div v-if="type == 'view'">
  328. <el-table
  329. :header-cell-style="{ background: '#eee', color: '#606266' }"
  330. :data="ruleForm.processesList"
  331. border
  332. style="width: 90%;margin-left:30px;"
  333. >
  334. <el-table-column
  335. align="center"
  336. type="index"
  337. label="序号"
  338. width="50"
  339. />
  340. <el-table-column align="center" property="title" label="流程标题">
  341. </el-table-column>
  342. <el-table-column align="center" property="code" label="流程编号">
  343. </el-table-column>
  344. <el-table-column
  345. align="center"
  346. property="introduction"
  347. label="简介"
  348. >
  349. </el-table-column>
  350. <el-table-column
  351. align="center"
  352. property="sort"
  353. label="排序"
  354. width="50"
  355. >
  356. </el-table-column>
  357. </el-table>
  358. </div>
  359. <div style="margin-top:15px;" v-if="type == 'add' || type == 'edit'">
  360. <el-button
  361. type="success"
  362. :disabled="disabledButton"
  363. style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99"
  364. @click="handleAddK"
  365. >新增</el-button
  366. >
  367. </div>
  368. <h3 class="form-title">剧本资源</h3>
  369. <!-- <el-form-item label="图片" prop="imgUrls" style="width: 100%;">
  370. <el-radio-group
  371. :disabled="disabled"
  372. v-model="radioImg"
  373. @change="changeImg"
  374. >
  375. <el-radio :label="1">本地上传</el-radio>
  376. <el-radio :label="2">网易云地址</el-radio>
  377. </el-radio-group>
  378. </el-form-item> -->
  379. <el-form-item
  380. label="图片"
  381. prop="imgUrls"
  382. style="width: 100%;"
  383. :style="dialog.title != '查看剧本' ? '' : 'pointer-events:none'"
  384. v-if="radioImg == 1"
  385. >
  386. <div v-for="(item, s) in imgData" :key="s" class="imgdata">
  387. <el-image
  388. style="width: 146px; height: 146px"
  389. :src="item.url"
  390. fit="fill"
  391. >
  392. </el-image>
  393. <div class="imgdialog">
  394. <p>
  395. <i
  396. class="el-icon-delete"
  397. @click="deldialogimg(item, s, 'img')"
  398. style="font-size: 20px;"
  399. ></i>
  400. </p>
  401. </div>
  402. <div class="sz_container" style="text-align:center">
  403. <span>{{ item.processNames }}</span>
  404. </div>
  405. <div
  406. v-if="type == 'add' || type == 'edit'"
  407. class="sz_container"
  408. style="text-align:center"
  409. >
  410. <el-button size="mini" type="text" @click="setLc(item, s, 'img')"
  411. >关联流程</el-button
  412. >
  413. </div>
  414. </div>
  415. <el-upload
  416. v-if="type == 'add' || type == 'edit'"
  417. class="avatar-uploader"
  418. style="float:left;margin-left:60px"
  419. action
  420. list-type="picture-card"
  421. :show-file-list="false"
  422. :http-request="labeluploadimg"
  423. >
  424. <i class="el-icon-plus"></i>
  425. </el-upload>
  426. <el-dialog :visible.sync="dialogVisible">
  427. <img width="100%" :src="dialogImageUrl" alt="" />
  428. </el-dialog>
  429. </el-form-item>
  430. <el-form-item
  431. v-if="radioImg == 2"
  432. style="width: 100%;"
  433. class="urlTable"
  434. >
  435. <el-table
  436. ref="img"
  437. v-if="type == 'add' || type == 'edit'"
  438. :data="ruleForm.radioImg"
  439. border
  440. style="width: 80%;margin-left:100px;"
  441. >
  442. <el-table-column
  443. align="center"
  444. type="index"
  445. label="序号"
  446. width="50"
  447. />
  448. <el-table-column align="center" property="date" label="资源标题">
  449. <template slot-scope="scope">
  450. <el-input v-model="ruleForm.radioImg[scope.$index].title" />
  451. </template>
  452. </el-table-column>
  453. <el-table-column align="center" property="url" label="资源URL">
  454. <template slot-scope="scope">
  455. <el-input v-model="ruleForm.radioImg[scope.$index].url" />
  456. </template>
  457. </el-table-column>
  458. <el-table-column
  459. align="center"
  460. property="processId"
  461. label="关联流程"
  462. >
  463. <template slot-scope="scope">
  464. <el-select
  465. v-model="ruleForm.radioImg[scope.$index].processId"
  466. clearable
  467. multiple
  468. @change="changePro('img')"
  469. placeholder="请选择流程"
  470. >
  471. <el-option
  472. v-for="(item, o) in ruleForm.processesList"
  473. :key="o"
  474. :label="item.title"
  475. :value="item.code"
  476. >
  477. </el-option>
  478. </el-select>
  479. </template>
  480. </el-table-column>
  481. <el-table-column align="center" label="操作">
  482. <template slot-scope="scope">
  483. <el-button type="text" size="mini" @click="DelImg(scope.$index)"
  484. >删除</el-button
  485. >
  486. </template>
  487. </el-table-column>
  488. </el-table>
  489. <el-table
  490. v-if="type == 'view'"
  491. :data="ruleForm.radioImg"
  492. border
  493. style="width: 80%;margin-left:100px;"
  494. >
  495. <el-table-column
  496. align="center"
  497. type="index"
  498. label="序号"
  499. width="50"
  500. />
  501. <el-table-column align="center" property="title" label="资源标题" />
  502. <el-table-column align="center" property="url" label="资源URL" />
  503. <el-table-column
  504. align="center"
  505. property="processId"
  506. label="关联流程"
  507. >
  508. <template slot-scope="scope">
  509. {{ scope.row.processNames }}
  510. </template>
  511. </el-table-column>
  512. </el-table>
  513. <div style="margin-top:15px;" v-if="type == 'add' || type == 'edit'">
  514. <el-button
  515. type="success"
  516. style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99"
  517. @click="handleAddImg"
  518. >新增</el-button
  519. >
  520. </div>
  521. </el-form-item>
  522. <el-form-item label="音频" prop="imgUrls" style="width: 100%;">
  523. <el-radio-group
  524. :disabled="disabled"
  525. v-model="radioMusic"
  526. @change="changeMusic"
  527. >
  528. <el-radio :label="1">本地上传</el-radio>
  529. <el-radio :label="2">网易云地址</el-radio>
  530. </el-radio-group>
  531. </el-form-item>
  532. <el-form-item
  533. style="margin-left: 100px;"
  534. class="audioUpload"
  535. v-if="radioMusic == 1"
  536. >
  537. <div v-for="(item, i) in musicData" :key="i" class="imgdata">
  538. <!-- <el-image
  539. style="width: 146px; height: 146px"
  540. :src="item.url"
  541. fit="fill"
  542. >
  543. </el-image> -->
  544. <audio
  545. :src="item.url"
  546. width="178px"
  547. height="178px"
  548. controls="controls"
  549. v-if="musicData.length > 0"
  550. ></audio>
  551. <!-- <audio
  552. style="width: 146px; height: 146px"
  553. :src="item.url"
  554. v-if="musicData.length > 0 "
  555. ></audio> -->
  556. <!-- <div class="imgdialog">
  557. <p>
  558. <i class="el-icon-zoom-in" style="font-size: 20px"></i>
  559. <i
  560. class="el-icon-delete"
  561. @click="deldialogimg(item, i, 'music')"
  562. style="font-size: 20px; padding-left: 30px"
  563. ></i>
  564. </p>
  565. </div> -->
  566. <div class="sz_container" style="text-align:center">
  567. <span>{{ item.processNames }}</span>
  568. </div>
  569. <div
  570. v-if="type == 'add' || type == 'edit'"
  571. class="sz_container"
  572. style="display: flex;justify-content: space-around;"
  573. >
  574. <el-button
  575. size="mini"
  576. type="text"
  577. @click="setLc(item, i, 'music')"
  578. >关联流程</el-button
  579. >
  580. <el-button
  581. size="mini"
  582. type="text"
  583. @click="deldialogimg(item, i, 'music')"
  584. >删除音频</el-button
  585. >
  586. </div>
  587. </div>
  588. <el-upload
  589. v-if="type == 'add' || type == 'edit'"
  590. class="avatar-uploader"
  591. style="float:left;margin-left:60px"
  592. action
  593. list-type="picture-card"
  594. :show-file-list="false"
  595. :before-upload="uploadAudio"
  596. :http-request="labeluploadmusic"
  597. element-loading-text="正在上传..."
  598. v-loading="loadingAudio"
  599. >
  600. <i class="el-icon-plus"></i>
  601. </el-upload>
  602. <el-dialog :visible.sync="dialogVisible">
  603. <img width="100%" :src="dialogImageUrl" alt="" />
  604. </el-dialog>
  605. </el-form-item>
  606. <el-form-item
  607. v-if="radioMusic == 2"
  608. style="width: 100%;"
  609. class="urlTable"
  610. >
  611. <el-table
  612. ref="music"
  613. v-if="type == 'add' || type == 'edit'"
  614. :data="ruleForm.radioMusic"
  615. border
  616. style="width: 80%;margin-left:100px;"
  617. >
  618. <el-table-column
  619. align="center"
  620. type="index"
  621. label="序号"
  622. width="50"
  623. />
  624. <el-table-column align="center" property="title" label="资源标题">
  625. <template slot-scope="scope">
  626. <el-input v-model="ruleForm.radioMusic[scope.$index].title" />
  627. </template>
  628. </el-table-column>
  629. <el-table-column align="center" property="url" label="资源URL">
  630. <template slot-scope="scope">
  631. <el-input v-model="ruleForm.radioMusic[scope.$index].url" />
  632. </template>
  633. </el-table-column>
  634. <el-table-column
  635. align="center"
  636. property="processId"
  637. label="关联流程"
  638. >
  639. <template slot-scope="scope">
  640. <el-select
  641. v-model="ruleForm.radioMusic[scope.$index].processId"
  642. clearable
  643. multiple
  644. @change="changePro('music')"
  645. placeholder="请选择流程"
  646. >
  647. <el-option
  648. v-for="item in ruleForm.processesList"
  649. :key="item.value"
  650. :label="item.title"
  651. :value="item.code"
  652. >
  653. </el-option>
  654. </el-select>
  655. </template>
  656. </el-table-column>
  657. <el-table-column align="center" label="操作">
  658. <template slot-scope="scope">
  659. <el-button
  660. type="text"
  661. size="mini"
  662. @click="DelMusic(scope.$index)"
  663. >删除</el-button
  664. >
  665. </template>
  666. </el-table-column>
  667. </el-table>
  668. <el-table
  669. v-if="type == 'view'"
  670. :data="ruleForm.radioMusic"
  671. border
  672. style="width: 80%;margin-left:100px;"
  673. >
  674. <el-table-column
  675. align="center"
  676. type="index"
  677. label="序号"
  678. width="50"
  679. />
  680. <el-table-column align="center" property="title" label="资源标题">
  681. <template>
  682. <div>
  683. 11111111
  684. </div>
  685. </template>
  686. </el-table-column>
  687. <el-table-column align="center" property="url" label="资源URL" />
  688. <el-table-column
  689. align="center"
  690. property="processId"
  691. label="关联流程"
  692. >
  693. <template slot-scope="scope">
  694. {{ scope.row.processNames }}
  695. </template>
  696. </el-table-column>
  697. </el-table>
  698. <div style="margin-top:15px;" v-if="type == 'add' || type == 'edit'">
  699. <el-button
  700. type="success"
  701. style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99"
  702. @click="handleAddMusic"
  703. >新增</el-button
  704. >
  705. </div>
  706. </el-form-item>
  707. <!-- <el-form-item label="视频" prop="imgUrls" style="width: 100%;">
  708. <el-radio-group
  709. :disabled="disabled"
  710. v-model="radioVideo"
  711. @change="changeVideo"
  712. >
  713. <el-radio :label="1">本地上传</el-radio>
  714. <el-radio :label="2">网易云地址</el-radio>
  715. </el-radio-group>
  716. </el-form-item> -->
  717. <el-form-item
  718. label="视频"
  719. prop="imgUrls"
  720. style="width: 100%;"
  721. class="videoUpload"
  722. v-if="radioVideo == 1"
  723. >
  724. <div v-for="(item, idx) in videoData" :key="idx" class="imgdata">
  725. <!-- <el-image
  726. style="width: 146px; height: 146px"
  727. :src="item.url"
  728. fit="fill"
  729. >
  730. </el-image> -->
  731. <video
  732. :src="item.url"
  733. width="178px"
  734. height="178px"
  735. controls="controls"
  736. v-if="videoData.length > 0"
  737. ></video>
  738. <!-- <div class="imgdialog">
  739. <p>
  740. <i class="el-icon-zoom-in" @click="handleView(item,idx)" style="font-size: 20px"></i>
  741. <i
  742. class="el-icon-delete"
  743. @click="deldialogimg(item, idx, 'video')"
  744. style="font-size: 20px; padding-left: 30px"
  745. ></i>
  746. </p>
  747. </div> -->
  748. <div
  749. class="sz_container"
  750. style="width:178px; text-align:center;margin-right:20px;"
  751. >
  752. <span>{{ item.processNames }}</span>
  753. </div>
  754. <div
  755. v-if="type == 'add' || type == 'edit'"
  756. class="sz_container"
  757. style="width:178px"
  758. >
  759. <el-button
  760. style="margin-right:60px;"
  761. size="mini"
  762. type="text"
  763. @click="setLc(item, idx, 'video')"
  764. >关联流程</el-button
  765. >
  766. <el-button
  767. size="mini"
  768. type="text"
  769. @click="deldialogimg(item, idx, 'video')"
  770. >删除视频</el-button
  771. >
  772. </div>
  773. </div>
  774. <el-upload
  775. v-if="type == 'add' || type == 'edit'"
  776. class="avatar-uploader"
  777. style="float:left;margin-left:60px"
  778. action
  779. list-type="picture-card"
  780. :show-file-list="false"
  781. :before-upload="uploadVideo"
  782. :http-request="labeluploadvideo"
  783. element-loading-text="正在上传..."
  784. v-loading="loading"
  785. >
  786. <i class="el-icon-plus"></i>
  787. </el-upload>
  788. <el-dialog :visible.sync="dialogVideo"> </el-dialog>
  789. </el-form-item>
  790. <el-form-item
  791. v-if="radioVideo == 2"
  792. style="width: 100%;"
  793. class="urlTable"
  794. >
  795. <el-table
  796. ref="video"
  797. v-if="type == 'add' || type == 'edit'"
  798. :data="ruleForm.radioVideo"
  799. border
  800. style="width: 80%;margin-left:100px;"
  801. >
  802. <el-table-column
  803. align="center"
  804. type="index"
  805. label="序号"
  806. width="50"
  807. />
  808. <el-table-column align="center" property="title" label="资源标题">
  809. <template slot-scope="scope">
  810. <el-input v-model="ruleForm.radioVideo[scope.$index].title" />
  811. </template>
  812. </el-table-column>
  813. <el-table-column align="center" property="url" label="资源URL">
  814. <template slot-scope="scope">
  815. <el-input v-model="ruleForm.radioVideo[scope.$index].url" />
  816. </template>
  817. </el-table-column>
  818. <el-table-column
  819. align="center"
  820. property="processId"
  821. label="关联流程"
  822. >
  823. <template slot-scope="scope">
  824. <el-select
  825. v-model="ruleForm.radioVideo[scope.$index].processId"
  826. clearable
  827. multiple
  828. @change="changePro('video')"
  829. placeholder="请选择流程"
  830. >
  831. <el-option
  832. v-for="(item, u) in ruleForm.processesList"
  833. :key="u"
  834. :label="item.title"
  835. :value="item.code"
  836. >
  837. </el-option>
  838. </el-select>
  839. </template>
  840. </el-table-column>
  841. <el-table-column align="center" label="操作">
  842. <template slot-scope="scope">
  843. <el-button
  844. type="text"
  845. size="mini"
  846. @click="DelVideo(scope.$index)"
  847. >删除</el-button
  848. >
  849. </template>
  850. </el-table-column>
  851. </el-table>
  852. <el-table
  853. v-if="type == 'view'"
  854. :data="ruleForm.radioVideo"
  855. border
  856. style="width: 80%;margin-left:100px;"
  857. >
  858. <el-table-column
  859. align="center"
  860. type="index"
  861. label="序号"
  862. width="50"
  863. />
  864. <el-table-column align="center" property="title" label="资源标题" />
  865. <el-table-column align="center" property="url" label="资源URL" />
  866. <el-table-column
  867. align="center"
  868. property="processId"
  869. label="关联流程"
  870. >
  871. <template slot-scope="scope">
  872. {{ scope.row.processNames }}
  873. </template>
  874. </el-table-column>
  875. </el-table>
  876. <div v-if="type == 'add' || type == 'edit'" style="margin-top:15px;">
  877. <el-button
  878. type="success"
  879. style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99"
  880. @click="handleAddVideo"
  881. >新增</el-button
  882. >
  883. </div>
  884. </el-form-item>
  885. <!-- <el-form-item>
  886. <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
  887. <el-button @click="resetForm('ruleForm')">重置</el-button>
  888. </el-form-item> -->
  889. </el-form>
  890. <span slot="footer" class="dialog-footer">
  891. <el-button @click="subEsc"> </el-button>
  892. <el-button
  893. v-if="type == 'add' || type == 'edit'"
  894. type="primary"
  895. @click="subMit"
  896. > </el-button
  897. >
  898. </span>
  899. </el-dialog>
  900. <!-- 关联流程 -->
  901. <el-dialog
  902. title="关联流程"
  903. :visible.sync="process.Visible"
  904. width="30%"
  905. center
  906. >
  907. <el-form>
  908. <el-form-item label="关联流程">
  909. <el-select
  910. v-model="processId"
  911. clearable
  912. multiple
  913. placeholder="请选择流程"
  914. @change="changeLiuc"
  915. >
  916. <el-option
  917. v-for="(item, y) in ruleForm.processesList"
  918. :key="y"
  919. :label="item.title"
  920. :value="item.code"
  921. >
  922. </el-option>
  923. </el-select>
  924. </el-form-item>
  925. </el-form>
  926. <span slot="footer" class="dialog-footer">
  927. <el-button @click="process.Visible = false"> </el-button>
  928. <el-button type="primary" @click="subMitLc"> </el-button>
  929. </span>
  930. </el-dialog>
  931. </div>
  932. </template>
  933. <script>
  934. import Tinymce from "@/components/Tinymce";
  935. import {
  936. queryJbInfo,
  937. addJbInfo,
  938. updateJbInfo,
  939. queryJbDetail,
  940. deleteJbInfo,
  941. queryFindList //获取流程列表
  942. } from "@/api/sce/sce.js";
  943. import { uploadFile, delFile } from "@/api/upload/upload.js";
  944. const baseUrl = process.env.VUE_APP_BASE_API;
  945. export default {
  946. components: { Tinymce },
  947. data() {
  948. return {
  949. loadingAudio: false,
  950. baseUrl,
  951. loading: true,
  952. queryParams: {
  953. pageNum: 1,
  954. pageSize: 10,
  955. query: {
  956. title: undefined,
  957. studioName: undefined,
  958. labelName: undefined
  959. }
  960. },
  961. tableData: [],
  962. rules: {
  963. title: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
  964. labelName: [
  965. { required: true, message: "请输入标签名称", trigger: "blur" }
  966. ],
  967. cover: [{ required: true, message: "请选择封面", trigger: "blur" }],
  968. introduction: [
  969. { required: true, message: "请输入简介", trigger: "blur" }
  970. ]
  971. },
  972. dialog: {
  973. title: "新增剧本",
  974. Visible: false
  975. },
  976. ruleForm: {
  977. processesList: [],
  978. imgUrl: "",
  979. imgUrls: [],
  980. radioImg: [],
  981. radioMusic: [],
  982. radioVideo: [],
  983. resourcesList: []
  984. },
  985. dialogVisible: false,
  986. active: "",
  987. imageUrl: "",
  988. total: 0,
  989. dialogVisible: false,
  990. dialogImageUrl: "",
  991. dataImg: [],
  992. dataImgs: [],
  993. lcData: [],
  994. radioImg: "1",
  995. radioMusic: "1",
  996. radioVideo: "1",
  997. type: "",
  998. imgData: [],
  999. musicData: [],
  1000. videoData: [],
  1001. processId: [],
  1002. process: {
  1003. Visible: false
  1004. },
  1005. list: {},
  1006. typeUrl: "",
  1007. imgType: false,
  1008. musicType: false,
  1009. videoType: false,
  1010. imgIndex: "",
  1011. musicIdnex: "",
  1012. videoIndex: "",
  1013. dataList: {},
  1014. disabled: false,
  1015. disabledButton: false,
  1016. dialogVideo: false
  1017. };
  1018. },
  1019. mounted() {
  1020. this.queryList();
  1021. // this.queryFindList();
  1022. },
  1023. methods: {
  1024. changeLiuc(e){
  1025. // console.log(e);
  1026. },
  1027. //音频校验
  1028. uploadAudio(file) {
  1029. console.log(file);
  1030. if (
  1031. [
  1032. "audio/mpeg"
  1033. // "video/ogg",
  1034. // "video/flv",
  1035. // "video/avi",
  1036. // "video/rmvb",
  1037. // "video/mkv",
  1038. // "video/x-matroska"
  1039. ].indexOf(file.type) == -1
  1040. ) {
  1041. this.$message.error("上传视频只能是 mp3格式!");
  1042. return false;
  1043. }
  1044. const isLt2G = file.size / 1024 / 1024 < 2000000;
  1045. if (!isLt2G) {
  1046. this.$message.error("上传文件大小不能超过 2GB!");
  1047. }
  1048. return isLt2G;
  1049. },
  1050. //视频上传格式校验
  1051. uploadVideo(file) {
  1052. if (
  1053. [
  1054. "video/mp4",
  1055. "video/ogg",
  1056. "video/flv",
  1057. "video/avi",
  1058. "video/rmvb",
  1059. "video/mkv",
  1060. "video/x-matroska"
  1061. ].indexOf(file.type) == -1
  1062. ) {
  1063. this.$message.error(
  1064. "上传视频只能是 mp4、ogg、flv、avi、rmvb 、x-matroska格式!"
  1065. );
  1066. return false;
  1067. }
  1068. const isLt2G = file.size / 1024 / 1024 < 2000000;
  1069. if (!isLt2G) {
  1070. this.$message.error("上传文件大小不能超过 2GB!");
  1071. }
  1072. return isLt2G;
  1073. },
  1074. //新增剧本流程数据
  1075. openDialog() {
  1076. if (this.dialog.title == "新增剧本") {
  1077. //随机生成4位数函数
  1078. function rand(min, max) {
  1079. return Math.floor(Math.random() * (max - min)) + min;
  1080. }
  1081. this.queryFindList();
  1082. this.ruleForm.processesList.push(
  1083. {
  1084. title: "开场", //标题
  1085. // code: 1233, //随机4位数
  1086. code: rand(1000, 9999), //随机4位数
  1087. introduction: "开场", //介绍
  1088. sort: "1", //排序
  1089. type: "1" //类型
  1090. },
  1091. {
  1092. title: "选角",
  1093. code: rand(1000, 9999),
  1094. introduction: "选角",
  1095. sort: "2",
  1096. type: "2"
  1097. },
  1098. {
  1099. title: "复盘",
  1100. code: rand(1000, 9999),
  1101. introduction: "复盘",
  1102. sort: "99",
  1103. type: "9"
  1104. }
  1105. );
  1106. console.log('type',this.ruleForm.processesList)
  1107. }
  1108. },
  1109. mapForChannel(e) {
  1110. for (var i = 0; i < this.lcData.length; i++) {
  1111. if (this.lcData[i].id == e) {
  1112. return this.lcData[i].title;
  1113. }
  1114. }
  1115. },
  1116. ForChannel(e) {
  1117. var a = e.split(",");
  1118. var tmp = [];
  1119. for (var i = 0; i < this.ruleForm.processesList.length; i++) {
  1120. for (var s = 0; s < a.length; s++) {
  1121. if (this.ruleForm.processesList[i].code == e[s]) {
  1122. tmp.push(this.ruleForm.processesList[i].title);
  1123. return tmp;
  1124. }
  1125. }
  1126. }
  1127. },
  1128. handleClose(done) {
  1129. this.$confirm("确认关闭?")
  1130. .then(_ => {
  1131. done();
  1132. this.type = "";
  1133. })
  1134. .catch(_ => {});
  1135. },
  1136. changSort(val) {
  1137. if (this.ruleForm.processesList.length > 1) {
  1138. for (var i = 0; i < this.ruleForm.processesList.length; i++) {
  1139. let s = i + 1;
  1140. if (
  1141. s < this.ruleForm.processesList.length ||
  1142. s == this.ruleForm.processesList.length
  1143. ) {
  1144. if (
  1145. this.ruleForm.processesList[i].sort ==
  1146. this.ruleForm.processesList[s].sort
  1147. ) {
  1148. // this.$message({
  1149. // message: "输入的流程排序有重复,请重新输入",
  1150. // type: "error"
  1151. // });
  1152. // this.ruleForm.processesList[s].sort = "";
  1153. // console.log(val);
  1154. // this.disabledButton = true;
  1155. } else {
  1156. this.disabledButton = false;
  1157. }
  1158. }
  1159. }
  1160. }
  1161. },
  1162. changCode(val) {
  1163. if (this.ruleForm.processesList.length > 1) {
  1164. for (var i = 0; i < this.ruleForm.processesList.length; i++) {
  1165. let s = i + 1;
  1166. if (
  1167. s < this.ruleForm.processesList.length ||
  1168. s == this.ruleForm.processesList.length
  1169. ) {
  1170. if (
  1171. this.ruleForm.processesList[i].code ==
  1172. this.ruleForm.processesList[s].code
  1173. ) {
  1174. this.$message({
  1175. message: "输入的流程编号有重复,请重新输入",
  1176. type: "error"
  1177. });
  1178. this.ruleForm.processesList[s].code = "";
  1179. console.log(val);
  1180. this.disabledButton = true;
  1181. } else {
  1182. this.disabledButton = false;
  1183. }
  1184. }
  1185. }
  1186. }
  1187. },
  1188. //获取列表
  1189. async queryList() {
  1190. this.loading = true;
  1191. try {
  1192. let res = await queryJbInfo(this.queryParams);
  1193. this.tableData = res.data.rows;
  1194. this.total = res.data.total;
  1195. this.loading = false;
  1196. } catch (err) {}
  1197. },
  1198. //搜索
  1199. search() {
  1200. this.queryList();
  1201. },
  1202. //重置
  1203. refresh() {
  1204. this.queryParams = {
  1205. pageNum: 1,
  1206. pageSize: 10,
  1207. query: {
  1208. title: undefined,
  1209. studioName: undefined,
  1210. labelName: undefined
  1211. }
  1212. };
  1213. this.queryList();
  1214. },
  1215. //跳转Tips维护
  1216. handleTips(row) {
  1217. this.$router.push({
  1218. name: "Tips/index",
  1219. query: { scenarioId: row.id, type: "sceinfo" }
  1220. });
  1221. },
  1222. //获取流程
  1223. async queryFindList() {
  1224. try {
  1225. let res = await queryFindList({});
  1226. this.lcData = res.data;
  1227. } catch (err) {}
  1228. },
  1229. //获取详情
  1230. async queryListDetail(id) {
  1231. try {
  1232. this.ruleForm = {
  1233. studioName: "",
  1234. title: "",
  1235. labelName: "",
  1236. imgUrl: "",
  1237. cover: "",
  1238. introduction: "",
  1239. processesList: [],
  1240. imgUrl: "",
  1241. radioImg: [],
  1242. radioMusic: [],
  1243. radioVideo: [],
  1244. resourcesList: []
  1245. };
  1246. this.imgData = [];
  1247. this.musicData = [];
  1248. this.videoData = [];
  1249. this.radioMusic = 1;
  1250. this.radioVideo = 1;
  1251. this.radioImg = 1;
  1252. let res = await queryJbDetail(id);
  1253. this.ruleForm = res.data;
  1254. if (this.ruleForm.imgUrl != null) {
  1255. this.dataImg = this.ruleForm.imgUrl.split(",");
  1256. }
  1257. var img = [];
  1258. var music = [];
  1259. var video = [];
  1260. for (var i in res.data.resourcesList) {
  1261. if (
  1262. res.data.resourcesList[i].mediaType == 1 &&
  1263. res.data.resourcesList[i].sourceType == 2
  1264. ) {
  1265. this.radioImg = 2;
  1266. img.push(res.data.resourcesList[i]);
  1267. }
  1268. if (
  1269. res.data.resourcesList[i].mediaType == 1 &&
  1270. res.data.resourcesList[i].sourceType == 1
  1271. ) { //图片
  1272. this.radioImg = 1;
  1273. img.push(res.data.resourcesList[i]);
  1274. }
  1275. }
  1276. if (this.radioImg == 1) {
  1277. this.imgData = img;
  1278. } else if (this.radioImg == 2) {
  1279. this.ruleForm.radioImg = img.map(n => {
  1280. return {
  1281. mediaType: n.mediaType,
  1282. sourceType: n.sourceType,
  1283. title: n.title,
  1284. url: n.url,
  1285. processNames: n.processNames,
  1286. processId: n.processId.split(",")
  1287. };
  1288. });
  1289. }
  1290. for (var i in res.data.resourcesList) {
  1291. if (
  1292. res.data.resourcesList[i].mediaType == 2 &&
  1293. res.data.resourcesList[i].sourceType == 2
  1294. ) {
  1295. this.radioMusic = 2;
  1296. music.push(res.data.resourcesList[i]);
  1297. }
  1298. if (
  1299. res.data.resourcesList[i].mediaType == 2 &&
  1300. res.data.resourcesList[i].sourceType == 1
  1301. ) {
  1302. this.radioMusic = 1;
  1303. music.push(res.data.resourcesList[i]);
  1304. }
  1305. }
  1306. if (this.radioMusic == 1) {
  1307. this.musicData = music;
  1308. } else if (this.radioMusic == 2) {
  1309. this.ruleForm.radioMusic = music.map(n => {
  1310. return {
  1311. mediaType: n.mediaType,
  1312. sourceType: n.sourceType,
  1313. title: n.title,
  1314. url: n.url,
  1315. processNames: n.processNames,
  1316. processId: n.processId.split(",")
  1317. };
  1318. });
  1319. }
  1320. for (var i in res.data.resourcesList) {
  1321. if (
  1322. res.data.resourcesList[i].mediaType == 3 &&
  1323. res.data.resourcesList[i].sourceType == 2
  1324. ) {
  1325. this.radioVideo = 2;
  1326. video.push(res.data.resourcesList[i]);
  1327. }
  1328. if (
  1329. res.data.resourcesList[i].mediaType == 3 &&
  1330. res.data.resourcesList[i].sourceType == 1
  1331. ) {
  1332. this.radioVideo = 1;
  1333. video.push(res.data.resourcesList[i]);
  1334. }
  1335. }
  1336. if (this.radioVideo == 1) {
  1337. this.videoData = video;
  1338. } else if (this.radioVideo == 2) {
  1339. this.ruleForm.radioVideo = video.map(n => {
  1340. return {
  1341. mediaType: n.mediaType,
  1342. sourceType: n.sourceType,
  1343. title: n.title,
  1344. url: n.url,
  1345. processNames: n.processNames,
  1346. processId: n.processId.split(",")
  1347. };
  1348. });
  1349. }
  1350. // res.data.resourcesList.map(n => {
  1351. // var a = [];
  1352. // var b = [];
  1353. // var c = [];
  1354. // if (n.mediaType == 2 && n.sourceType == 1) {
  1355. // consooe.log(1111);
  1356. // b.push(n);
  1357. // this.musicData = b;
  1358. // this.radioMusic = 1;
  1359. // }
  1360. // if (n.mediaType == 2 && n.sourceType == 2) {
  1361. // b.push(n);
  1362. // this.ruleForm.radioMusic = b.map(n => {
  1363. // return {
  1364. // mediaType: n.mediaType,
  1365. // sourceType: n.sourceType,
  1366. // title: n.title,
  1367. // url: n.url,
  1368. // processNames: n.processNames,
  1369. // processId: n.processId.split(",")
  1370. // };
  1371. // });
  1372. // this.radioMusic = 2;
  1373. // }
  1374. // if (n.mediaType == 3 && n.sourceType == 1) {
  1375. // c.push(n);
  1376. // this.videoData = c;
  1377. // this.radioVideo = 1;
  1378. // }
  1379. // if (n.mediaType == 3 && n.sourceType == 2) {
  1380. // c.push(n);
  1381. // this.ruleForm.radioVideo = c.map(n => {
  1382. // return {
  1383. // mediaType: n.mediaType,
  1384. // sourceType: n.sourceType,
  1385. // title: n.title,
  1386. // url: n.url,
  1387. // processNames: n.processNames,
  1388. // processId: n.processId.split(",")
  1389. // };
  1390. // });
  1391. // this.radioVideo = 2;
  1392. // }
  1393. // });
  1394. } catch (err) {}
  1395. },
  1396. // 新增
  1397. handleAdd() {
  1398. this.type = "add";
  1399. this.ruleForm = {
  1400. studioName: "",
  1401. title: "",
  1402. labelName: "",
  1403. imgUrl: "",
  1404. cover: "",
  1405. introduction: "",
  1406. processesList: [],
  1407. imgUrl: "",
  1408. radioImg: [],
  1409. radioMusic: [],
  1410. radioVideo: [],
  1411. resourcesList: []
  1412. };
  1413. this.dataImg = [];
  1414. this.imgData = [];
  1415. this.musicData = [];
  1416. this.videoData = [];
  1417. this.radioMusic = 1;
  1418. this.radioVideo = 1;
  1419. this.radioImg = 1;
  1420. this.disabled = false;
  1421. this.dialog.title = "新增剧本";
  1422. setTimeout(() => {
  1423. this.dialog.Visible = true;
  1424. }, 500);
  1425. },
  1426. async subMit() {
  1427. // if (this.imgType == true && this.radioImg == 1) {
  1428. // this.$message({
  1429. // message: "请绑定图片相关流程",
  1430. // type: "error"
  1431. // });
  1432. // return false;
  1433. // }
  1434. // if (this.musicType == true && this.radioMusic == 1) {
  1435. // this.$message({
  1436. // message: "请绑定音频相关流程",
  1437. // type: "error"
  1438. // });
  1439. // return false;
  1440. // }
  1441. // if (this.videoType == true && this.radioVideo == 1) {
  1442. // this.$message({
  1443. // message: "请绑定视频相关流程",
  1444. // type: "error"
  1445. // });
  1446. // return false;
  1447. // }
  1448. this.ruleForm.imgUrl = this.dataImg.join(",");
  1449. if (this.radioImg == 1) {
  1450. this.ruleForm.radioImg = this.imgData;
  1451. }
  1452. if (this.radioMusic == 1) {
  1453. this.ruleForm.radioMusic = this.musicData;
  1454. }
  1455. if (this.radioVideo == 1) {
  1456. this.ruleForm.radioVideo = this.videoData;
  1457. }
  1458. let data = this.ruleForm.radioImg
  1459. .concat(this.ruleForm.radioMusic)
  1460. .concat(this.ruleForm.radioVideo);
  1461. let a = [];
  1462. let b = this.ruleForm.processesList.map(n => {
  1463. if (n.title != "") {
  1464. a.push(n);
  1465. }
  1466. });
  1467. this.ruleForm.processesList = a.map(n => {
  1468. return {
  1469. title: n.title,
  1470. code: n.code,
  1471. introduction: n.introduction,
  1472. sort: n.sort,
  1473. type:n.type,
  1474. };
  1475. });
  1476. let list = [];
  1477. data.map(n => {
  1478. if (n.url != "") {
  1479. list.push(n);
  1480. }
  1481. });
  1482. this.ruleForm.resourcesList = list.map(n => {
  1483. let type = typeof n.processId;
  1484. var processId = "";
  1485. if (type == "string") {
  1486. processId = n.processId;
  1487. } else if (type == "object") {
  1488. processId = n.processId.join(",");
  1489. }
  1490. return {
  1491. mediaType: n.mediaType,
  1492. sourceType: n.sourceType,
  1493. title: n.title,
  1494. url: n.url,
  1495. processId: processId
  1496. };
  1497. });
  1498. try {
  1499. this.$refs["ruleForm"].validate(async valid => {
  1500. if (valid) {
  1501. if (this.type == "add") {
  1502. var res = await addJbInfo(this.ruleForm);
  1503. if (res.code == 200) {
  1504. this.$message.success("新增成功");
  1505. this.dialog.Visible = false;
  1506. this.queryList();
  1507. } else {
  1508. this.$message({
  1509. message: res.msg,
  1510. type: "error"
  1511. });
  1512. }
  1513. } else if (this.type == "edit") {
  1514. var res = await updateJbInfo(this.ruleForm);
  1515. if (res.code == 200) {
  1516. this.$message.success("编辑成功");
  1517. this.dialog.Visible = false;
  1518. this.queryList();
  1519. } else {
  1520. this.$message({
  1521. message: res.msg,
  1522. type: "error"
  1523. });
  1524. }
  1525. }
  1526. }
  1527. });
  1528. } catch (err) {}
  1529. },
  1530. subEsc() {
  1531. this.type = "";
  1532. this.ruleForm = {
  1533. studioName: "",
  1534. title: "",
  1535. labelName: "",
  1536. imgUrl: "",
  1537. cover: "",
  1538. introduction: "",
  1539. processesList: [],
  1540. imgUrl: "",
  1541. radioImg: [],
  1542. radioMusic: [],
  1543. radioVideo: [],
  1544. resourcesList: []
  1545. };
  1546. this.radioImg = 1;
  1547. this.radioMusic = 1;
  1548. this.radioVideo = 1;
  1549. this.dialog.Visible = false;
  1550. },
  1551. dealRdata(attchments, keyname) {
  1552. //attchments:数组,键值
  1553. let list = [...attchments];
  1554. let result = [];
  1555. let obj = {};
  1556. for (let i = 0; i < list.length; i++) {
  1557. if (!obj[list[i][keyname]]) {
  1558. result.push(list[i]);
  1559. obj[list[i].wjDx] = true;
  1560. }
  1561. }
  1562. return result;
  1563. },
  1564. // 编辑
  1565. handleEdit(row) {
  1566. this.queryListDetail(row.id);
  1567. this.type = "edit";
  1568. this.disabled = false;
  1569. this.dialog.title = "编辑剧本";
  1570. setTimeout(() => {
  1571. this.dialog.Visible = true;
  1572. }, 500);
  1573. },
  1574. // 查看
  1575. handleView(row) {
  1576. console.log(this.type, 41231);
  1577. this.type = "view";
  1578. this.dialog.title = "查看剧本";
  1579. console.log(this.type, 41231222);
  1580. this.queryListDetail(row.id);
  1581. this.disabled = true;
  1582. setTimeout(() => {
  1583. this.dialog.Visible = true;
  1584. }, 500);
  1585. },
  1586. // 删除
  1587. async hanDel(row) {
  1588. try {
  1589. await this.$confirm("此操作将永久删除该剧本,是否继续?", "提示", {
  1590. confirmButtonText: "确定",
  1591. cancelButtonText: "取消",
  1592. type: "warning"
  1593. });
  1594. let res = await deleteJbInfo(row.id);
  1595. if (res.code == 200) {
  1596. this.$message.success("删除成功");
  1597. this.queryList();
  1598. } else {
  1599. this.$message({
  1600. message: res.msg,
  1601. type: "error"
  1602. });
  1603. }
  1604. } catch (err) {}
  1605. },
  1606. handleAvatar(res, file, fileList) {
  1607. // console.log(res, file, "整个");
  1608. },
  1609. handleAvatarSuccess(res, file) {
  1610. // console.log(res, file, "成功了吗");
  1611. },
  1612. //上传图片
  1613. async uploadImg(file, fileList) {
  1614. try {
  1615. let formData = new FormData();
  1616. let type = file.raw.type;
  1617. formData.append("file", file.raw);
  1618. formData.append("type", type);
  1619. let res = await uploadFile(formData);
  1620. // this.ruleForm.cover = res.data.wjUrl;
  1621. this.$set(this.ruleForm, "cover", res.data.wjUrl);
  1622. } catch (err) {}
  1623. },
  1624. changeImgs({ file }) {
  1625. let formData = new FormData();
  1626. formData.append("file", file);
  1627. formData.append("type", "product");
  1628. uploadFile(formData).then(res => {
  1629. this.dataImg.push(res.data.wjUrl);
  1630. });
  1631. },
  1632. beforeAvatarUpload(file) {
  1633. const isJPG = file.type;
  1634. const isLt2M = file.size / 1024 / 1024 < 2;
  1635. if (!isLt2M) {
  1636. this.$message.error("上传头像图片大小不能超过 2MB!");
  1637. }
  1638. return isJPG && isLt2M;
  1639. },
  1640. // 开本流程新增
  1641. handleAddK() {
  1642. //为空不能进行添加
  1643. let list = this.ruleForm.processesList;
  1644. if(list.length!=0){
  1645. if (list[list.length-1].title=="" || list[list.length-1].code=="" ||list[list.length-1].introduction=="" ||list[list.length-1].sort=="" ) {
  1646. this.$message({
  1647. message: '一次只能添加一条',
  1648. type: 'warning'
  1649. });
  1650. return false
  1651. }
  1652. }
  1653. this.ruleForm.processesList.push({
  1654. title: "",
  1655. code: "",
  1656. introduction: "",
  1657. sort: "",
  1658. type: "5"
  1659. });
  1660. },
  1661. //同步流程
  1662. tongbuliuchen(){
  1663. //删除图片
  1664. this.imgData.forEach((item,index)=>{
  1665. let imgprocessId=this.imgData[index].processId?this.imgData[index].processId.split(","):[]
  1666. let data=[]
  1667. let name=[]
  1668. if(this.ruleForm.processesList.length<1){
  1669. this.imgData[index].processId=null
  1670. this.imgData[index].processNames=null
  1671. }else{
  1672. for(let x=0;x<this.ruleForm.processesList.length;x++){
  1673. for(let y=0;y<imgprocessId.length;y++){
  1674. if(this.ruleForm.processesList[x].code.indexOf(imgprocessId[y])>-1 ){
  1675. data.push(imgprocessId[y])
  1676. }
  1677. if(this.ruleForm.processesList[x].code==imgprocessId[y]){
  1678. name.push(this.ruleForm.processesList[x].title)
  1679. }
  1680. }
  1681. this.imgData[index].processId=data.join(",")
  1682. this.imgData[index].processNames=name.join(",")
  1683. }
  1684. }
  1685. })
  1686. //删除音频
  1687. this.musicData.forEach((item,index)=>{
  1688. let imgprocessId=this.musicData[index].processId?this.musicData[index].processId.split(","):[]
  1689. let data=[]
  1690. let name=[]
  1691. for(let x=0;x<this.ruleForm.processesList.length;x++){
  1692. for(let y=0;y<imgprocessId.length;y++){
  1693. if(this.ruleForm.processesList[x].code.indexOf(imgprocessId[y])>-1 ){
  1694. data.push(imgprocessId[y])
  1695. }
  1696. if(this.ruleForm.processesList[x].code==imgprocessId[y]){
  1697. name.push(this.ruleForm.processesList[x].title)
  1698. }
  1699. }
  1700. this.musicData[index].processId=data.join(",")
  1701. this.musicData[index].processNames=name.join(",")
  1702. }
  1703. })
  1704. //删除视频
  1705. this.videoData.forEach((item,index)=>{
  1706. let imgprocessId=this.videoData[index].processId?this.videoData[index].processId.split(","):[]
  1707. let data=[]
  1708. let name=[]
  1709. for(let x=0;x<this.ruleForm.processesList.length;x++){
  1710. for(let y=0;y<imgprocessId.length;y++){
  1711. if(this.ruleForm.processesList[x].code.indexOf(imgprocessId[y])>-1 ){
  1712. data.push(imgprocessId[y])
  1713. }
  1714. if(this.ruleForm.processesList[x].code==imgprocessId[y]){
  1715. name.push(this.ruleForm.processesList[x].title)
  1716. }
  1717. }
  1718. this.videoData[index].processId=data.join(",")
  1719. this.videoData[index].processNames=name.join(",")
  1720. }
  1721. })
  1722. },
  1723. // 开本流程删除
  1724. Del(index) {
  1725. this.$confirm("此操作将永久删除该剧本流程,是否继续?", "提示", {
  1726. confirmButtonText: "确定",
  1727. cancelButtonText: "取消",
  1728. type: "warning"
  1729. })
  1730. .then(() => {
  1731. this.ruleForm.processesList.splice(index, 1),
  1732. this.tongbuliuchen();
  1733. this.$message({
  1734. type: "success",
  1735. message: "删除成功!"
  1736. });
  1737. })
  1738. .catch(() => {
  1739. this.$message({
  1740. type: "error",
  1741. message: "已取消删除"
  1742. });
  1743. });
  1744. },
  1745. // 图片预览
  1746. dialogimg(e) {
  1747. this.dialogVisible = true;
  1748. this.dialogImageUrl = this.ruleForm.imgUrls[e];
  1749. },
  1750. //资源删除
  1751. DelImg(index) {
  1752. this.ruleForm.radioImg.splice(index, 1);
  1753. },
  1754. DelMusic(index) {
  1755. this.ruleForm.radioMusic.splice(index, 1);
  1756. },
  1757. DelVideo(index) {
  1758. this.ruleForm.radioVideo.splice(index, 1);
  1759. },
  1760. handleRemove(file) {
  1761. // delFile({ wjUrl: item.url }).then(res => {
  1762. // if (res.code == 200) {
  1763. // this.$message.success("删除成功");
  1764. // }
  1765. // });
  1766. },
  1767. // 图片删除
  1768. deldialogimg(index) {
  1769. this.ruleForm.imgUrls.splice(index, 1);
  1770. var img = this.ruleForm.imgUrl[index];
  1771. // proUpdate({ wjUrl: img }).then((res) => {
  1772. // if (res.code == 200) {
  1773. // that.back();
  1774. // }
  1775. // });
  1776. },
  1777. changeImg(val) {
  1778. this.radioImg = val;
  1779. this.ruleForm.radioImg = [];
  1780. this.imgData = [];
  1781. },
  1782. changeMusic(val) {
  1783. this.radioMusic = val;
  1784. this.ruleForm.radioMusic = [];
  1785. this.musicData = [];
  1786. },
  1787. changeVideo(val) {
  1788. this.radioVideo = val;
  1789. this.ruleForm.radioVideo = [];
  1790. this.videoData = [];
  1791. },
  1792. changePro(type) {
  1793. if (type == "img") {
  1794. this.imgType = false;
  1795. } else if (type == "music") {
  1796. this.musicType = false;
  1797. } else if (type == "video") {
  1798. this.videoType = false;
  1799. }
  1800. },
  1801. //新增图片资源
  1802. handleAddImg() {
  1803. this.ruleForm.radioImg.push({
  1804. title: "",
  1805. url: "",
  1806. processId: [],
  1807. mediaType: 1,
  1808. sourceType: this.radioImg
  1809. });
  1810. if (this.$refs.img.data.length == 0) {
  1811. this.$refs.img.data = this.ruleForm.radioImg;
  1812. }
  1813. },
  1814. handleAddMusic() {
  1815. this.ruleForm.radioMusic.push({
  1816. title: "",
  1817. url: "",
  1818. processId: [],
  1819. mediaType: 2,
  1820. sourceType: this.radioMusic
  1821. });
  1822. if (this.$refs.music.data.length == 0) {
  1823. this.$refs.music.data = this.ruleForm.radioMusic;
  1824. }
  1825. },
  1826. handleAddVideo() {
  1827. this.ruleForm.radioVideo.push({
  1828. title: "",
  1829. url: "",
  1830. processId: [],
  1831. mediaType: 3,
  1832. sourceType: this.radioVideo
  1833. });
  1834. if (this.$refs.video.data.length == 0) {
  1835. this.$refs.video.data = this.ruleForm.radioVideo;
  1836. }
  1837. },
  1838. // 上传资源蹄片
  1839. labeluploadimg({ file }) {
  1840. const formdata = new FormData();
  1841. formdata.append("file", file);
  1842. formdata.append("type", "product");
  1843. uploadFile(formdata).then(res => {
  1844. this.imgData.push({
  1845. url: res.data.wjUrl,
  1846. processNames: "",
  1847. title: res.data.wjDx,
  1848. mediaType: 1,
  1849. sourceType: 1
  1850. });
  1851. this.imgType = true;
  1852. });
  1853. },
  1854. labeluploadmusic({ file }) {
  1855. this.loadingAudio = true;
  1856. const formdata = new FormData();
  1857. formdata.append("file", file);
  1858. formdata.append("type", "product");
  1859. uploadFile(formdata).then(res => {
  1860. this.musicData.push({
  1861. url: res.data.wjUrl,
  1862. processNames: "",
  1863. title: res.data.wjDx,
  1864. mediaType: 2,
  1865. sourceType: 1
  1866. });
  1867. this.loadingAudio = false;
  1868. this.musicType = true;
  1869. });
  1870. },
  1871. labeluploadvideo({ file }) {
  1872. this.loading = true;
  1873. const formdata = new FormData();
  1874. formdata.append("file", file);
  1875. formdata.append("type", "product");
  1876. uploadFile(formdata).then(res => {
  1877. this.videoData.push({
  1878. url: res.data.wjUrl,
  1879. processNames: "",
  1880. title: res.data.wjDx,
  1881. mediaType: 3,
  1882. sourceType: 1
  1883. });
  1884. this.loading = false; //取消加载
  1885. this.radioType = true;
  1886. this.findvideocover(res.data.wjUrl, file);
  1887. });
  1888. },
  1889. delDataImg(item, index) {
  1890. this.$confirm("此操作将永久删除图片,是否继续?", "提示", {
  1891. confirmButtonText: "确定",
  1892. cancelButtonText: "取消",
  1893. type: "warning"
  1894. })
  1895. .then(() => {
  1896. this.dataImg.splice(index, 1);
  1897. delFile({ wjUrl: item }).then(res => {
  1898. if (res.code == 200) {
  1899. this.$message.success("删除成功");
  1900. }
  1901. });
  1902. this.$message({
  1903. type: "success",
  1904. message: "删除成功!"
  1905. });
  1906. })
  1907. .catch(() => {
  1908. this.$message({
  1909. type: "error",
  1910. message: "已取消删除"
  1911. });
  1912. });
  1913. },
  1914. // 图片删除
  1915. deldialogimg(item, index, type) {
  1916. this.$confirm("此您确定要删除吗,是否继续?", "提示", {
  1917. confirmButtonText: "确定",
  1918. cancelButtonText: "取消",
  1919. type: "warning"
  1920. })
  1921. .then(() => {
  1922. switch (type) {
  1923. case "img":
  1924. this.imgData.splice(index, 1);
  1925. break;
  1926. case "music":
  1927. this.musicData.splice(index, 1);
  1928. break;
  1929. case "video":
  1930. this.videoData.splice(index, 1);
  1931. break;
  1932. default:
  1933. break;
  1934. }
  1935. delFile({ wjUrl: item.url }).then(res => {
  1936. if (res.code == 200) {
  1937. this.$message.success("删除成功");
  1938. }
  1939. });
  1940. })
  1941. .catch(() => {
  1942. this.$message({
  1943. type: "error",
  1944. message: "已取消删除"
  1945. });
  1946. });
  1947. },
  1948. //关联流程
  1949. setLc(item, i, type) {
  1950. console.log('item',item);
  1951. console.log('i',i);
  1952. console.log('type',type);
  1953. if (this.ruleForm.processesList.length == 0) {
  1954. this.$message({
  1955. message: "请新建流程",
  1956. type: "error"
  1957. });
  1958. return false;
  1959. }
  1960. if (type == "img") {
  1961. this.imgIndex = i;
  1962. try{
  1963. this.processId = this.imgData[i].processId.split(',')
  1964. }catch(err){}
  1965. } else if (type == "music") {
  1966. this.musicIndex = i;
  1967. try{
  1968. this.processId = this.musicData[i].processId.split(',')
  1969. }catch(err){}
  1970. } else if (type == "video") {
  1971. this.videoIndex = i;
  1972. try{
  1973. this.processId = this.videoData[i].processId.split(',')
  1974. }catch(err){}
  1975. }
  1976. this.list = item;
  1977. this.typeUrl = type;
  1978. // this.processId = "";
  1979. this.process.Visible = true;
  1980. },
  1981. subMitLc() {
  1982. this.process.Visible = false;
  1983. if (this.typeUrl == "img") {
  1984. this.imgType = false;
  1985. var tmp = [];
  1986. for (var i = 0; i < this.ruleForm.processesList.length; i++) {
  1987. for (var s = 0; s < this.processId.length; s++) {
  1988. if (this.ruleForm.processesList[i].code == this.processId[s]) {
  1989. tmp.push(this.ruleForm.processesList[i].title);
  1990. }
  1991. }
  1992. }
  1993. this.imgData[this.imgIndex].processNames = tmp.join(",");
  1994. this.imgData[this.imgIndex].processId = this.processId;
  1995. this.imgData[this.imgIndex].mediaType = 1;
  1996. this.imgData[this.imgIndex].sourceType = this.radioImg;
  1997. }
  1998. if (this.typeUrl == "music") {
  1999. this.musicType = false;
  2000. var tmp = [];
  2001. for (var i = 0; i < this.ruleForm.processesList.length; i++) {
  2002. for (var s = 0; s < this.processId.length; s++) {
  2003. if (this.ruleForm.processesList[i].code == this.processId[s]) {
  2004. tmp.push(this.ruleForm.processesList[i].title);
  2005. }
  2006. }
  2007. }
  2008. this.musicData[this.musicIndex].processNames = tmp.join(",");
  2009. this.musicData[this.musicIndex].processId = this.processId;
  2010. this.musicData[this.musicIndex].mediaType = 2;
  2011. this.musicData[this.musicIndex].sourceType = this.radioMusic;
  2012. }
  2013. if (this.typeUrl == "video") {
  2014. this.videoType = false;
  2015. var tmp = [];
  2016. for (var i = 0; i < this.ruleForm.processesList.length; i++) {
  2017. for (var s = 0; s < this.processId.length; s++) {
  2018. if (this.ruleForm.processesList[i].code == this.processId[s]) {
  2019. tmp.push(this.ruleForm.processesList[i].title);
  2020. }
  2021. }
  2022. }
  2023. this.videoData[this.videoIndex].processNames = tmp.join(",");
  2024. this.videoData[this.videoIndex].processId = this.processId;
  2025. this.videoData[this.videoIndex].mediaType = 3;
  2026. this.videoData[this.videoIndex].sourceType = this.radioVideo;
  2027. }
  2028. },
  2029. prevent(e) {
  2030. var keynum = window.event ? e.keyCode : e.which; //获取键盘码
  2031. if (keynum == 189 || keynum == 190 || keynum == 109 || keynum == 110) {
  2032. this.$message.warning("禁止输入小数以及负数");
  2033. e.target.value = "";
  2034. }
  2035. },
  2036. //查看视频
  2037. // handleView(item) {
  2038. // console.log(item, "视频地址");
  2039. // }
  2040. }
  2041. };
  2042. </script>
  2043. <style scoped>
  2044. .content {
  2045. background: #fff;
  2046. margin-top: 15px;
  2047. }
  2048. .add-button {
  2049. margin-top: 15px;
  2050. }
  2051. /deep/ .el-input__inner {
  2052. height: 30px;
  2053. }
  2054. .search-button {
  2055. display: flex;
  2056. }
  2057. .form-title {
  2058. margin-left: 30px;
  2059. padding-bottom: 10px;
  2060. border-bottom: 1px solid #000;
  2061. }
  2062. /deep/ .avatar-uploader .el-upload {
  2063. border: 1px dashed #000;
  2064. border-radius: 6px;
  2065. cursor: pointer;
  2066. position: relative;
  2067. overflow: hidden;
  2068. }
  2069. /deep/ .avatar-uploader .el-upload:hover {
  2070. border-color: #409eff;
  2071. }
  2072. /deep/ input::-webkit-outer-spin-button,
  2073. /deep/ input::-webkit-inner-spin-button {
  2074. -webkit-appearance: none !important;
  2075. }
  2076. /deep/ input[type="number"] {
  2077. -moz-appearance: textfield !important;
  2078. }
  2079. .avatar-uploader-icon {
  2080. font-size: 28px;
  2081. color: #8c939d;
  2082. width: 178px;
  2083. height: 178px;
  2084. line-height: 178px;
  2085. text-align: center;
  2086. }
  2087. .avatar {
  2088. width: 178px;
  2089. height: 178px;
  2090. display: block;
  2091. }
  2092. .urlTable /deep/ .el-form-item__content {
  2093. width: 100%;
  2094. }
  2095. </style>
  2096. <style lang="scss" scope>
  2097. .imgdata {
  2098. position: relative;
  2099. // display: inline-block;
  2100. float: left;
  2101. margin-left: 60px;
  2102. .imgdialog {
  2103. width: 146px;
  2104. height: 146px;
  2105. display: none;
  2106. position: absolute;
  2107. background: rgba(127, 127, 127, 0.5);
  2108. top: 0;
  2109. left: 0;
  2110. justify-content: space-between;
  2111. align-content: center;
  2112. p {
  2113. margin: auto;
  2114. i {
  2115. cursor: pointer;
  2116. color: white;
  2117. }
  2118. }
  2119. }
  2120. }
  2121. .imgdata:hover .imgdialog {
  2122. display: flex !important;
  2123. }
  2124. .audioUpload {
  2125. .el-form-item__content {
  2126. display: flex;
  2127. // flex-direction: column-reverse;
  2128. flex-wrap: wrap;
  2129. .imgdata {
  2130. margin-top: 20px;
  2131. }
  2132. }
  2133. }
  2134. .videoUpload {
  2135. .el-form-item__content {
  2136. margin-left: 100px;
  2137. display: flex;
  2138. // flex-direction: column-reverse;
  2139. flex-wrap: wrap;
  2140. .imgdata {
  2141. margin-top: 20px;
  2142. display: block !important;
  2143. flex-wrap: nowrap;
  2144. }
  2145. }
  2146. }
  2147. </style>