shopPublish.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336
  1. <template>
  2. <div class="components-container main-cont">
  3. <div style="display: inline-block;font-size:18px;margin-bottom: 15px;">
  4. <a href="#" @click="prev" style="text-decoration:none;font-size: 14px;">
  5. <icon-svg name="jiantou" style="width: 1.2em;height: 1.2em;position: relative;top: 0.3em;"></icon-svg>
  6. 返回
  7. </a>
  8. <span style="display: inline-block;margin: 0 15px;color: #D9D9D9;">|</span>
  9. <span>商品发布</span>
  10. </div>
  11. <div v-loading="tableDataLoading">
  12. <div style="position: relative;">
  13. <el-row>
  14. <el-col :span="8">
  15. <span>商品名称:</span>
  16. <el-input style="width: 200px;" class="margin15" placeholder="请输入商品标题" v-model="goodsName"
  17. autosize>
  18. </el-input>
  19. </el-col>
  20. <el-col :span="8">
  21. <span>商品分类:</span>
  22. <el-select v-model="classifyId" class="margin15" placeholder="请选择商品类型" style="width:200px;"
  23. @change="handleChange1">
  24. <el-option v-for="(item,index) in typeDatas" :key="index" :label="item.classifyName"
  25. :value="item.classifyId">
  26. </el-option>
  27. </el-select>
  28. </el-col>
  29. <!-- <el-col :span="6" >
  30. <span>商户号 :&nbsp;&nbsp;</span>
  31. <el-input style="width:200px;" class="margin15" placeholder="请输入商户号" v-model="merchants" autosize></el-input>
  32. </el-col> -->
  33. <el-col :span="8">
  34. <span>商品原价(选填):</span>
  35. <el-input style="width:200px;" class="margin15" placeholder="请输入商品原价" type="number" :min="0"
  36. :controls="false" v-model="originalMoney" autosize></el-input>
  37. </el-col>
  38. <el-col :span="8">
  39. <span>折扣价格:</span>
  40. <el-input style="width:200px;" class="margin15" placeholder="请输入折扣价格" type="number" :min="0"
  41. :controls="false" v-model="goodsMoney" autosize></el-input>
  42. </el-col>
  43. <el-col :span="8">
  44. <span>打包费(选填):</span>
  45. <el-input style="width:200px;" class="margin15" placeholder="请输入打包费" type="number" :min="0"
  46. :controls="false" v-model="packMoney" autosize></el-input>
  47. </el-col>
  48. <el-col :span="8">
  49. <span>商品销量(选填):</span>
  50. <el-input style="width:200px;" class="margin15" placeholder="请输入商品销量" type="number" :min="0"
  51. :controls="false" v-model="sales" autosize></el-input>
  52. </el-col>
  53. <!-- <el-col :span="8">
  54. <span>库存:</span>
  55. <el-input style="width:200px;" class="margin15" placeholder="请输入库存" type="number" :min="0" :controls="false"
  56. v-model="inventory" autosize></el-input>
  57. </el-col> -->
  58. <!-- <el-col :span="8">
  59. <span>商品状态:</span>
  60. <el-select v-model="status" class="margin15" placeholder="请选择商品状态" style="width:200px;">
  61. <el-option v-for="(item,index) in statusmain2" :key="item.index" :label="item.label"
  62. :value="item.value">
  63. </el-option>
  64. </el-select>
  65. </el-col> -->
  66. <el-col :span="8">
  67. <span>商品简介(选填):</span>
  68. <el-input style="width:200px;" class="margin15" placeholder="请输入商品简介" type="text"
  69. :controls="false" v-model="goodsDescribe" autosize></el-input>
  70. </el-col>
  71. </el-row>
  72. <el-row>
  73. <!-- <el-col :span="6">
  74. <span>会员价格:</span>
  75. <el-input style="width:200px;" class="margin15" placeholder="请输入会员价格" type="number" :min="0" :controls="false"
  76. v-model="memberPrice" autosize></el-input>
  77. </el-col>
  78. <el-col :span="6">
  79. <span>商品佣金:</span>
  80. <el-input style="width:200px;" class="margin15" placeholder="例0.1 等于10%" type="number" :min="0"
  81. :controls="false" v-model="commissionPrice" autosize></el-input>
  82. </el-col> -->
  83. </el-row>
  84. <el-row>
  85. <!-- <el-col :span="6">
  86. <span>必买理由:</span>
  87. <el-input style="width:200px;" class="margin15" placeholder="请输入必买理由" v-model="buyReason" autosize></el-input>
  88. </el-col>
  89. <el-col :span="6" style="margin-top: 20px;">
  90. <span>精选好物:</span>
  91. <el-radio-group v-model="isSelect">
  92. <el-radio :label="1">是</el-radio>
  93. <el-radio :label="0">否</el-radio>
  94. </el-radio-group>
  95. </el-col>
  96. <el-col :span="6" style="margin-top: 20px;">
  97. <span>首页商品:</span>
  98. <el-radio-group v-model="homeGoods">
  99. <el-radio :label="1">是</el-radio>
  100. <el-radio :label="0">否</el-radio>
  101. </el-radio-group>
  102. </el-col>
  103. <el-col :span="6" style="margin-top: 20px;">
  104. <span>每日推荐:</span>
  105. <el-radio-group v-model="isRecommend">
  106. <el-radio :label="1">是</el-radio>
  107. <el-radio :label="0">否</el-radio>
  108. </el-radio-group>
  109. </el-col> -->
  110. </el-row>
  111. <el-row>
  112. <!-- <el-col :span="6">
  113. <span>是否发货:</span>
  114. <el-select v-model="isExpress" class="margin15" placeholder="请选择商品是否发货" style="width:200px;">
  115. <el-option v-for="(item,index) in isExpressmain" :key="item.index" :label="item.label" :value="item.value">
  116. </el-option>
  117. </el-select>
  118. </el-col>
  119. <el-col :span="6">
  120. <span>商品品牌:</span>
  121. <el-select v-model="brandId" class="margin15" placeholder="请选择商品品牌" style="width:200px;">
  122. <el-option v-for="(item,index) in brandIds" :key="item.index" :label="item.label" :value="item.value">
  123. </el-option>
  124. </el-select>
  125. </el-col> -->
  126. <el-col :span="24">
  127. <div style="margin-top: 10px;">
  128. <span>商品标签:</span>
  129. <span class="bqList" v-for="(item,index) in labels" :key="index">{{item}}
  130. <span class="delss">
  131. <i class="el-icon-delete" @click="dels1(index)"></i>
  132. </span>
  133. </span>
  134. <el-input v-model="bq" style="width:200px;" placeholder="请输入标签"
  135. onkeyup="this.value=this.value.replace(/[, ]/g,'')"></el-input>
  136. <!-- <button class="tj" @click="btnTj">添加标签</button> -->
  137. <el-button type="primary" class="tj" size="mini" icon="el-icon-edit" circle @click="btnTj">
  138. </el-button>
  139. </div>
  140. </el-col>
  141. </el-row>
  142. <div style="display: flex;align-items: center;margin: 2% 0;">
  143. <span style="display: inline-block;text-align: right;">商品封面图:</span>
  144. <div
  145. style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
  146. <el-upload class="avatar-uploader" v-model="goodsCover"
  147. action="https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload" :show-file-list="false"
  148. :on-success="handleAvatarSuccess1">
  149. <img v-if="goodsCover" :src="goodsCover" class="avatar"
  150. style="width: 148px;height: 148px;" />
  151. <i v-else class="el-icon-plus avatar-uploader-icon"
  152. style="font-size: 28px;color: #8c939d"></i>
  153. </el-upload>
  154. </div>
  155. </div>
  156. <div style="display: flex;align-items: center;margin: 2% 0;flex-flow: wrap;">
  157. <span style="display: inline-block;text-align: right;">商品轮播图:</span>
  158. <div>
  159. <el-upload action="https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload"
  160. list-type="picture-card" :on-success="handleUploadSuccess" :on-change="handleChange"
  161. :on-remove="handleRemove">
  162. <i class="el-icon-plus"></i>
  163. </el-upload>
  164. </div>
  165. </div>
  166. <div style="display: flex;align-items: center;margin: 2% 0;">
  167. <span style="display: inline-block;text-align: right;">商品规格:</span>
  168. <el-radio-group v-model="guige" @change="guigeChange">
  169. <el-radio :label="0">单规格</el-radio>
  170. <el-radio :label="1">多规格</el-radio>
  171. </el-radio-group>
  172. <div v-if="guigeshow" style="margin-left: 20px;">
  173. <el-select v-model="ruleId" placeholder="请选择商品规格" style="width:200px;"
  174. @change="selectTrigger(ruleId)">
  175. <el-option v-for="(item,index) in specifdata" :key="item.index" :label="item.ruleName"
  176. :value="item.id">
  177. </el-option>
  178. </el-select>
  179. </div>
  180. </div>
  181. <div v-if="ruleValue" style="margin-left: 70px;">
  182. <div class="ruleitem" v-for="(item,index) in ruleValue" :key="index">
  183. <div>{{item.value}} <span @click="deleterule(index)">
  184. <icon-svg name="schu" class="ruleicon"></icon-svg>
  185. </span></div>
  186. <div>
  187. <el-tag :key="tag" v-for="(tag,j) in item.detail.split(',')" closable
  188. :disable-transitions="false" @close="handleClose(tag,j,item)">
  189. {{tag}}
  190. </el-tag>
  191. <el-input class="input-new-tag" v-model="inputValues[index]" ref="saveTagInput" size="small"
  192. style="width:120px;" placeholder="请输入属性名"
  193. @keyup.enter.native="handleInputConfirm(index,item)">
  194. </el-input>
  195. <el-button class="button-new-tag" size="small" @click="handleInputConfirm(index,item)">添加
  196. </el-button>
  197. </div>
  198. </div>
  199. <div style="margin-top:20px;" v-if="ruleshow">
  200. <div v-if="isshow" class="btn_specif">
  201. <el-button type="primary" @click="btnToclick()">添加新规格</el-button>
  202. <el-button type="success" @click="create()">立即生成</el-button>
  203. </div>
  204. </div>
  205. <div style="margin-top:10px;">
  206. <div v-if="!isshow" style="margin-top: 20px;">
  207. <div style="display: inline-block;">
  208. <span style="width:80px;display: inline-block;text-align: right;">规格:</span>
  209. <el-input style="width:50%;" v-model="releobject.value" placeholder="例:颜色"></el-input>
  210. </div>
  211. <div style="display: inline-block;">
  212. <span style="width:80px;display: inline-block;text-align: right;">规格值:</span>
  213. <el-input style="width:50%;" v-model="releobject.detail" placeholder="例:黑色"></el-input>
  214. </div>
  215. <div style="display: inline-block;">
  216. <el-button type="primary" @click="speciTo()">确 定</el-button>
  217. <el-button @click="speciTotwo()">取 消</el-button>
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222. <div style="display: flex;margin-top: 20px;" v-if="propshow">
  223. <span>商品属性:</span>
  224. <div class="property_table">
  225. <table style="width: 100%;">
  226. <tr style="display:flex;">
  227. <th style="width:120px;text-align: left;" v-for="item in headerData" v-if="item!='图片'">
  228. {{item}}</th>
  229. </tr>
  230. </table>
  231. <el-table :data="valueData">
  232. <el-table-column v-if="detailJson.length == 1" prop="value0" width="120">
  233. </el-table-column>
  234. <el-table-column v-if="detailJson.length == 2" prop="value0" width="120">
  235. </el-table-column>
  236. <el-table-column v-if="detailJson.length == 2" prop="value1" width="120">
  237. </el-table-column>
  238. <el-table-column v-if="detailJson.length == 3" prop="value0" width="120">
  239. </el-table-column>
  240. <el-table-column v-if="detailJson.length == 3" prop="value1" width="120">
  241. </el-table-column>
  242. <el-table-column v-if="detailJson.length == 3" prop="value2" width="120">
  243. </el-table-column>
  244. <el-table-column v-if="detailJson.length == 4" prop="value0" width="120">
  245. </el-table-column>
  246. <el-table-column v-if="detailJson.length == 4" prop="value1" width="120">
  247. </el-table-column>
  248. <el-table-column v-if="detailJson.length == 4" prop="value2" width="120">
  249. </el-table-column>
  250. <el-table-column v-if="detailJson.length == 4" prop="value3" width="120">
  251. </el-table-column>
  252. <el-table-column v-if="detailJson.length == 5" prop="value0" width="120">
  253. </el-table-column>
  254. <el-table-column v-if="detailJson.length == 5" prop="value1" width="120">
  255. </el-table-column>
  256. <el-table-column v-if="detailJson.length == 5" prop="value2" width="120">
  257. </el-table-column>
  258. <el-table-column v-if="detailJson.length == 5" prop="value3" width="120">
  259. </el-table-column>
  260. <el-table-column v-if="detailJson.length == 5" prop="value4" width="120">
  261. </el-table-column>
  262. <!-- <el-table-column prop="skuImg" width="100">
  263. <template slot-scope="scope">
  264. <div class="imgWrap"
  265. style=" width:60px;height:60px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 60px;">
  266. <el-upload style="width: 60px;height: 60px;" class="avatar-uploader" v-model="scope.row.skuImg"
  267. action="https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload" :show-file-list="false"
  268. :on-success="handleAvatarSuccess">
  269. <img v-if="scope.row.skuImg" :src="scope.row.skuImg" class="avatar"
  270. style="border-radius: 6px;width:60px;height: 60px;" @click="curRowIndex=scope.$index" />
  271. <i v-else class="el-icon-plus avatar-uploader-icon" @click="curRowIndex=scope.$index"></i>
  272. </el-upload>
  273. </div>
  274. </template>
  275. </el-table-column> -->
  276. <el-table-column prop="skuOriginalPrice" width="120">
  277. <template slot-scope="scope">
  278. <div>
  279. <el-input type="text" v-model="scope.row.skuOriginalPrice"
  280. style="width:80px;font-size:14px;">
  281. </el-input>
  282. </div>
  283. </template>
  284. </el-table-column>
  285. <el-table-column prop="skuPrice" width="120">
  286. <template slot-scope="scope">
  287. <div>
  288. <el-input type="text" v-model="scope.row.skuPrice"
  289. style="width:80px;font-size:14px;">
  290. </el-input>
  291. </div>
  292. </template>
  293. </el-table-column>
  294. <!-- <el-table-column prop="memberPrice" width="120">
  295. <template slot-scope="scope">
  296. <div>
  297. <el-input type="text" v-model="scope.row.memberPrice" style="width:80px;font-size:14px;">
  298. </el-input>
  299. </div>
  300. </template>
  301. </el-table-column> -->
  302. <!-- <el-table-column prop="stock" width="120">
  303. <template slot-scope="scope">
  304. <div>
  305. <el-input type="text" v-model="scope.row.stock" style="width:80px;font-size:14px;">
  306. </el-input>
  307. </div>
  308. </template>
  309. </el-table-column> -->
  310. <!-- <el-table-column prop="salesVolume" width="120">
  311. <template slot-scope="scope">
  312. <div>
  313. <el-input type="text" v-model="scope.row.salesVolume" style="width:80px;font-size:14px;">
  314. </el-input>
  315. </div>
  316. </template>
  317. </el-table-column> -->
  318. <el-table-column width="120">
  319. <template slot-scope="scope">
  320. <el-button size="mini" type="danger"
  321. @click="deleter(scope.$index)">删除
  322. </el-button>
  323. </template>
  324. </el-table-column>
  325. </el-table>
  326. </div>
  327. </div>
  328. <div style="display: flex;margin-top: 20px;padding-top: 30px;" v-if="propshow1">
  329. <span>商品属性:</span>
  330. <div class="property_table">
  331. <table style="width: 100%;">
  332. <tr style="display:flex;">
  333. <th style="width:150px;text-align: left;" v-for="item in headerData2" v-if="item!='图片'">
  334. {{item}}</th>
  335. </tr>
  336. </table>
  337. <el-table :data="valueData2">
  338. <!-- <el-table-column prop="skuImg" width="150">
  339. <template slot-scope="scope">
  340. <div class="imgWrap"
  341. style=" width:60px;height:60px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 60px;">
  342. <el-upload style="width: 60px;height: 60px;" class="avatar-uploader" v-model="scope.row.skuImg"
  343. action="https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload" :show-file-list="false"
  344. :on-success="handleAvatarSuccess3">
  345. <img v-if="scope.row.skuImg" :src="scope.row.skuImg" class="avatar"
  346. style="border-radius: 6px;width:60px;height: 60px;" @click="curRowIndex=scope.$index" />
  347. <i v-else class="el-icon-plus avatar-uploader-icon" @click="curRowIndex=scope.$index"></i>
  348. </el-upload>
  349. </div>
  350. </template>
  351. </el-table-column> -->
  352. <el-table-column prop="skuOriginalPrice" width="150">
  353. <template slot-scope="scope">
  354. <div>
  355. <el-input type="text" v-model="scope.row.skuOriginalPrice"
  356. style="width:80px;font-size:14px;">
  357. </el-input>
  358. </div>
  359. </template>
  360. </el-table-column>
  361. <el-table-column prop="skuPrice" width="150">
  362. <template slot-scope="scope">
  363. <div>
  364. <el-input type="text" v-model="scope.row.skuPrice"
  365. style="width:80px;font-size:14px;">
  366. </el-input>
  367. </div>
  368. </template>
  369. </el-table-column>
  370. <!-- <el-table-column prop="memberPrice" width="150">
  371. <template slot-scope="scope">
  372. <div>
  373. <el-input type="text" v-model="scope.row.memberPrice" style="width:80px;font-size:14px;">
  374. </el-input>
  375. </div>
  376. </template>
  377. </el-table-column> -->
  378. <!-- <el-table-column prop="stock" width="150">
  379. <template slot-scope="scope">
  380. <div>
  381. <el-input type="text" v-model="scope.row.stock" style="width:80px;font-size:14px;">
  382. </el-input>
  383. </div>
  384. </template>
  385. </el-table-column> -->
  386. <!-- <el-table-column prop="salesVolume" width="150">
  387. <template slot-scope="scope">
  388. <div>
  389. <el-input type="text" v-model="scope.row.salesVolume" style="width:80px;font-size:14px;">
  390. </el-input>
  391. </div>
  392. </template>
  393. </el-table-column> -->
  394. </el-table>
  395. </div>
  396. </div>
  397. <!-- <div style="height: 38px;line-height: 38px;margin:20px 0;">
  398. <span>是否包邮:</span>
  399. <el-radio-group v-model="positage" @change="agreeChange">
  400. <el-radio :label="0">是</el-radio>
  401. <el-radio :label="1">否</el-radio>
  402. <el-input v-if="priceshow" style="width:200px;margin-left: 10px;" placeholder="请输入邮费" type="number"
  403. v-model="postagePrice" autosize></el-input>
  404. </el-radio-group>
  405. </div> -->
  406. </div>
  407. <div class="tinymce-content" style="display: flex;">
  408. <div style="width:90px;">商品详情(选填):</div>
  409. <!-- <textarea id="tinymceId" :value="goodsDescribe" class="tinymce-textarea" /> -->
  410. <!-- <quill-editor ref="myTextEditor" v-model="goodsSynopsis" :options="quillOption"
  411. style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
  412. </quill-editor> -->
  413. <div v-for="(item,index) of goodsParticularsPicture">
  414. <div style="position: relative;margin: 5px;">
  415. <img :src="item" class="avatar" style="width:148px;height: 148px;" />
  416. <div @click="clearXq(index)" class="divhove">
  417. <i class="el-icon-delete" style="margin: 0;font-size: 18px;color: #fff;"></i>
  418. </div>
  419. </div>
  420. </div>
  421. <div class="imgs" style="width: 50%;">
  422. <el-upload action="https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload"
  423. list-type="picture-card" :show-file-list="false" :on-success="handleUploadSuccessXq"
  424. :on-progress="onprogress1">
  425. <el-progress v-if="percentage1>0 && percentage1<100" type="circle" :percentage="percentage1">
  426. </el-progress>
  427. <i v-else class="el-icon-plus"></i>
  428. </el-upload>
  429. <el-dialog :visible.sync="dialogVisible">
  430. <img width="100%" :src="dialogImageUrl" alt="">
  431. </el-dialog>
  432. </div>
  433. </div>
  434. <div style="text-align: center;margin-top:30px;">
  435. <el-button style='margin:0 20px 0 0;' size="mini" type="primary" icon="document" @click="prev">返回上一页
  436. </el-button>
  437. <el-button size="mini" type="primary" icon="document" @click="artiReleass">发布商品
  438. </el-button>
  439. </div>
  440. </div>
  441. </div>
  442. </template>
  443. <script>
  444. import {
  445. quillEditor
  446. } from 'vue-quill-editor'
  447. import 'quill/dist/quill.core.css'
  448. import 'quill/dist/quill.snow.css'
  449. import 'quill/dist/quill.bubble.css'
  450. import quillConfig from './quill-config.js'
  451. export default {
  452. components: {
  453. quillEditor
  454. },
  455. name: 'Tinymce',
  456. data() {
  457. return {
  458. specif: '',
  459. typeId: '',
  460. goodsName: '',
  461. classifyId: '',
  462. merchants: '',
  463. originalMoney: '',
  464. goodsMoney: '',
  465. packMoney: '',
  466. goodsSynopsis: '',
  467. memberPrice: '',
  468. inventory: '', //库存
  469. labels: [], //标签集合
  470. bq: '', //输入的标签名
  471. positage: 1,
  472. guige: 1,
  473. skuImg: '',
  474. ruleId: '',
  475. postagePrice: '',
  476. priceshow: true,
  477. isshow: true,
  478. commissionPrice: '',
  479. buyReason: '',
  480. ruleshow: false,
  481. propshow: false,
  482. guigeshow: true,
  483. propshow1: false,
  484. tableDataLoading: false,
  485. ruleValue: [],
  486. attr: [],
  487. attrs: [],
  488. headerData: [],
  489. valueData: [],
  490. detailJson: [],
  491. inputValues: {
  492. inputValue0: '',
  493. inputValue1: '',
  494. inputValue2: '',
  495. inputValue3: '',
  496. inputValue4: '',
  497. inputValue5: ''
  498. },
  499. sku: [],
  500. img: '',
  501. sales:0,
  502. salesVolume: '',
  503. status: 0,
  504. goodsPicture: '',
  505. typeDatas: [],
  506. value: [],
  507. isSelect: 1,
  508. homeGoods: 1,
  509. isRecommend: 1,
  510. isExpress: '',
  511. goodsCover: '',
  512. valueData2: [],
  513. headerData2: [],
  514. statusmain2: [{
  515. value: 0,
  516. label: '上架'
  517. },
  518. {
  519. value: 1,
  520. label: '下架'
  521. }
  522. ],
  523. isExpressmain: [{
  524. value: 1,
  525. label: '普通商品需要发货'
  526. },
  527. {
  528. value: 2,
  529. label: '虚拟商品无需发货'
  530. },
  531. {
  532. value: 3,
  533. label: '商铺核销无需发货'
  534. }
  535. ],
  536. attrName: '',
  537. ruleName: '',
  538. attrValue: [],
  539. releobject: {
  540. value: '',
  541. detail: ''
  542. },
  543. brandId: '',
  544. brandIds: [],
  545. specifdata: [],
  546. dialogVisible: false,
  547. isShow: false,
  548. hideUpload: false,
  549. limit: 1,
  550. id: '',
  551. hasChange: false,
  552. hasInit: false,
  553. tinymceId: 'tinymceId',
  554. height: 435,
  555. toolbar: [],
  556. menubar: 'file edit insert view format table',
  557. languageTypeList: {
  558. 'en': 'en',
  559. 'zh': 'zh_CN'
  560. },
  561. artiCletypes: [],
  562. // 富文本内容
  563. quillOption: quillConfig,
  564. goodsDescribe: '',
  565. potost: [],
  566. shopId: '',
  567. goodsParticularsPicture: [], //商品详情图
  568. percentage1: 0, //进度条
  569. dialogImageUrl: [],
  570. dialogVisible: false,
  571. }
  572. },
  573. methods: {
  574. // 图标上传
  575. handleAvatarSuccess(file) {
  576. if (this.curRowIndex == 0) {
  577. this.skuImg = file.data;
  578. this.valueData[0].skuImg = this.skuImg
  579. return
  580. } else {
  581. this.skuImg = file.data;
  582. this.valueData[this.curRowIndex].skuImg = this.skuImg
  583. }
  584. },
  585. // 图标上传
  586. handleAvatarSuccess3(file) {
  587. this.skuImg = file.data;
  588. this.valueData2[0].skuImg = this.skuImg
  589. },
  590. // 是否包邮
  591. agreeChange(val) {
  592. if (val == 1) {
  593. this.priceshow = true
  594. this.postagePrice = ''
  595. } else {
  596. this.priceshow = false
  597. this.postagePrice = 0
  598. }
  599. },
  600. // 是否多规格
  601. guigeChange(val) {
  602. if (val == 1) {
  603. this.ruleId = ''
  604. this.guigeshow = true
  605. this.propshow1 = false
  606. } else {
  607. this.ruleId = 0
  608. this.guigeshow = false
  609. this.propshow1 = true
  610. this.propshow = false
  611. this.ruleshow = false
  612. this.attr = []
  613. this.ruleValue = []
  614. this.guigeclect()
  615. }
  616. },
  617. // 单规格
  618. guigeclect() {
  619. if (this.originalMoney == '') {
  620. this.originalMoney = '0'
  621. }
  622. if (this.goodsMoney == '') {
  623. this.goodsMoney = this.goodsMoney
  624. }
  625. this.$http({
  626. url: this.$http.adornUrl('admin/goods/onlyFormatAttr'),
  627. method: 'get',
  628. params: this.$http.adornParams({
  629. 'originalPrice': this.originalMoney,
  630. 'price': this.goodsMoney,
  631. // 'coverImg': this.goodsCover,
  632. })
  633. }).then(({
  634. data
  635. }) => {
  636. let returnData = data.data;
  637. this.headerData2 = returnData.header
  638. this.valueData2 = returnData.value
  639. this.propshow = false
  640. this.propshow1 = true
  641. this.sku = returnData.value
  642. })
  643. },
  644. handleChange1(value) {
  645. this.classifyId = value;
  646. },
  647. handleChange(file, fileList) {
  648. this.hideUpload = fileList.length >= this.limit;
  649. },
  650. handleRemove(file, fileList) {
  651. console.log(file, '删除', fileList)
  652. this.hideUpload = fileList.length >= this.limit;
  653. for (var i in this.potost) {
  654. if (this.potost[i] == file.response.data) {
  655. this.potost.splice(i, 1);
  656. }
  657. }
  658. console.log('this.potost', this.potost)
  659. },
  660. handleAvatarSuccess1(file, fileList) {
  661. this.goodsCover = file.data
  662. },
  663. //上传成功
  664. handleUploadSuccess(file, fileList) {
  665. // this.goodsPicture += file.data + ','
  666. this.potost.push(file.data)
  667. },
  668. // 返回上一级
  669. prev() {
  670. this.$router.back()
  671. },
  672. // 添加标签
  673. btnTj() {
  674. if (this.bq == '' || this.bq == ' ') {
  675. this.$notify({
  676. title: '提示',
  677. duration: 1800,
  678. message: '请输入标签名',
  679. type: 'warning'
  680. });
  681. return
  682. } else {
  683. console.log('this.bq', this.bq)
  684. this.labels.push(this.bq)
  685. this.bq = ''
  686. }
  687. },
  688. // 删除标签
  689. dels1(index) {
  690. this.labels.splice(index, 1);
  691. console.log(this.labels)
  692. },
  693. // 发布商品
  694. artiReleass() {
  695. let photost = this.potost.toString()
  696. console.log(this.goodsDescribe)
  697. console.log(this.potost.toString())
  698. // photost = photost.substr(0, photost.length - 1)
  699. let goodsLabel = this.labels.toString()
  700. if (this.goodsName == '') {
  701. this.$notify({
  702. title: '提示',
  703. duration: 1800,
  704. message: '请输入商品标题',
  705. type: 'warning'
  706. });
  707. return
  708. }
  709. if (this.classifyId == '') {
  710. this.$notify({
  711. title: '提示',
  712. duration: 1800,
  713. message: '请选择商品类型',
  714. type: 'warning'
  715. });
  716. return
  717. }
  718. if (this.originalMoney == '') {
  719. this.originalMoney=this.goodsMoney
  720. // this.$notify({
  721. // title: '提示',
  722. // duration: 1800,
  723. // message: '请输入商品原价',
  724. // type: 'warning'
  725. // });
  726. // return
  727. }
  728. // if (this.originalMoney < 1) {
  729. // this.$notify({
  730. // title: '提示',
  731. // duration: 1800,
  732. // message: '商品原价不能小于1元',
  733. // type: 'warning'
  734. // });
  735. // return
  736. // }
  737. if (this.goodsMoney === '') {
  738. this.$notify({
  739. title: '提示',
  740. duration: 1800,
  741. message: '请输入折扣价格',
  742. type: 'warning'
  743. });
  744. return
  745. }
  746. if (this.packMoney == '') {
  747. this.packMoney ='0'
  748. // this.$notify({
  749. // title: '提示',
  750. // duration: 1800,
  751. // message: '请输入打包费',
  752. // type: 'warning'
  753. // });
  754. // return
  755. }
  756. if (this.goodsDescribe == '') {
  757. this.goodsDescribe ='无'
  758. // this.$notify({
  759. // title: '提示',
  760. // duration: 1800,
  761. // message: '请输入简介',
  762. // type: 'warning'
  763. // });
  764. // return
  765. }
  766. // if (this.salesVolume == '') {
  767. // this.$notify({
  768. // title: '提示',
  769. // duration: 1800,
  770. // message: '请输入商品销量',
  771. // type: 'warning'
  772. // });
  773. // return
  774. // }
  775. if (this.goodsCover == '') {
  776. this.$notify({
  777. title: '提示',
  778. duration: 1800,
  779. message: '请选择商品封面图',
  780. type: 'warning'
  781. });
  782. return
  783. }
  784. if (this.potost.length == 0) {
  785. this.$notify({
  786. title: '提示',
  787. duration: 1800,
  788. message: '请选择商品轮播图',
  789. type: 'warning'
  790. });
  791. return
  792. }
  793. // if (this.goodsDescribe == '') {
  794. // this.$notify({
  795. // title: '提示',
  796. // duration: 1800,
  797. // message: '请输入商品详情',
  798. // type: 'warning'
  799. // });
  800. // return
  801. // }
  802. // if (this.inventory == '') {
  803. // this.$notify({
  804. // title: '提示',
  805. // duration: 1800,
  806. // message: '请输入库存',
  807. // type: 'warning'
  808. // });
  809. // return
  810. // }
  811. if (this.sku.length == 0) {
  812. this.$notify({
  813. title: '提示',
  814. duration: 1800,
  815. message: '请选择商品规格',
  816. type: 'warning'
  817. });
  818. return
  819. }
  820. if (photost == '') {
  821. this.$notify({
  822. title: '提示',
  823. duration: 1800,
  824. message: '请上传轮播图',
  825. type: 'warning'
  826. });
  827. return
  828. }
  829. if (this.goodsParticularsPicture.length == 0) {
  830. this.goodsParticularsPicture=['https://moxuanyunshang.oss-cn-beijing.aliyuncs.com/xiangqing/12ecc56005731327e02f42f0d851848.png']
  831. console.log(this.goodsParticularsPicture,'详情图')
  832. // this.$notify({
  833. // title: '提示',
  834. // duration: 1800,
  835. // message: '请上传商品详情图',
  836. // type: 'warning'
  837. // });
  838. // return
  839. }
  840. if (this.guige == 0) {
  841. if (this.valueData2.length > 0) {
  842. if (this.valueData2[0].skuOriginalPrice == null || this.valueData2[0].skuOriginalPrice === '') {
  843. this.$notify({
  844. title: '提示',
  845. duration: 1800,
  846. message: '商品属性原价不能为空',
  847. type: 'warning'
  848. });
  849. return
  850. }
  851. if (this.valueData2[0].skuPrice == null || this.valueData2[0].skuPrice === '') {
  852. this.$notify({
  853. title: '提示',
  854. duration: 1800,
  855. message: '商品属性售价不能为空',
  856. type: 'warning'
  857. });
  858. return
  859. }
  860. }
  861. this.sku = this.valueData2
  862. console.log('----', this.valueData2)
  863. } else {
  864. this.sku = this.valueData
  865. }
  866. this.tableDataLoading = true
  867. this.$http({
  868. url: this.$http.adornUrl('admin/goods/insertGoods'),
  869. method: 'post',
  870. data: this.$http.adornData({
  871. 'goodsPicture': photost,
  872. 'goodsName': this.goodsName,
  873. 'classifyId': this.classifyId,
  874. 'originalMoney': this.originalMoney,
  875. 'goodsMoney': this.goodsMoney,
  876. 'packMoney': this.packMoney,
  877. 'goodsSynopsis': this.goodsSynopsis,
  878. 'memberPrice': this.memberPrice,
  879. 'inventory': this.inventory,
  880. 'salesVolume': this.salesVolume,
  881. 'sales':this.sales,
  882. 'status': this.status,
  883. 'goodsCover': this.goodsCover,
  884. 'goodsDescribe': this.goodsDescribe,
  885. 'postagePrice': this.postagePrice,
  886. 'sku': this.sku,
  887. 'attr': this.attr,
  888. 'goodsLabel': goodsLabel,
  889. 'shopId': this.shopId,
  890. 'goodsParticularsPicture': this.goodsParticularsPicture.toString()
  891. })
  892. }).then(({
  893. data
  894. }) => {
  895. if (data.code == 0) {
  896. this.tableDataLoading = false
  897. this.$message({
  898. message: '操作成功',
  899. type: 'success',
  900. duration: 1500,
  901. onClose: () => {
  902. this.goodsName = ''
  903. this.type = ''
  904. this.merchants = ''
  905. this.goodsMoney = ''
  906. this.packMoney = ''
  907. this.goodsSynopsis = ''
  908. this.memberPrice = ''
  909. this.inventory = ''
  910. this.originalMoney = ''
  911. this.salesVolume = ''
  912. this.sales = ''
  913. this.goodsDescribe = ''
  914. this.postagePrice = ''
  915. this.status = ''
  916. this.buyReason = ''
  917. this.brandId = ''
  918. // this.$router.push({
  919. // path: '/shopAdmin'
  920. // })
  921. this.$router.back()
  922. }
  923. })
  924. } else {
  925. this.tableDataLoading = false
  926. this.$message({
  927. message: data.msg,
  928. type: 'warning',
  929. duration: 1500,
  930. onClose: () => {}
  931. })
  932. }
  933. })
  934. },
  935. // 商品分类
  936. dataSelect() {
  937. this.tableDataLoading = true
  938. this.shopId = this.$cookie.get('shopId')
  939. this.$http({
  940. url: this.$http.adornUrl('admin/goods/selectAllClassify'),
  941. method: 'get',
  942. params: this.$http.adornParams({
  943. 'shopId': this.shopId
  944. })
  945. }).then(({
  946. data
  947. }) => {
  948. this.tableDataLoading = false
  949. let returnData = data.data;
  950. this.typeDatas = returnData
  951. })
  952. },
  953. // 商品规格
  954. specifSelect() {
  955. this.shopId = this.$cookie.get('shopId')
  956. this.$http({
  957. url: this.$http.adornUrl('selfGoodsRule/list'),
  958. method: 'get',
  959. params: this.$http.adornParams({
  960. 'shopId': this.shopId
  961. })
  962. }).then(({
  963. data
  964. }) => {
  965. let returnData = data.data;
  966. this.specifdata = returnData;
  967. })
  968. },
  969. // 删除商品属性
  970. deleter(index) {
  971. let length = this.sku.length
  972. if (length == 1) {
  973. this.$message({
  974. title: '提示',
  975. type: 'error',
  976. duration: 1800,
  977. message: '属性至少要有一个',
  978. type: 'warning'
  979. });
  980. return
  981. } else {
  982. this.sku.splice(index, 1);
  983. }
  984. },
  985. // 查询商品规格
  986. selectTrigger(val) {
  987. this.$http({
  988. url: this.$http.adornUrl('selfGoodsRule/find'),
  989. method: 'get',
  990. params: this.$http.adornParams({
  991. 'id': val
  992. })
  993. }).then(({
  994. data
  995. }) => {
  996. let returnData = data.data;
  997. this.ruleValue = returnData.ruleValue
  998. this.attrName = returnData.ruleName
  999. this.ruleshow = true
  1000. this.ruleId = returnData.id
  1001. this.create()
  1002. })
  1003. },
  1004. deleterule(index) {
  1005. this.ruleValue.splice(index, 1);
  1006. },
  1007. btnToclick() {
  1008. this.isshow = false
  1009. this.releobject.value = ''
  1010. this.releobject.detail = ''
  1011. },
  1012. speciTotwo() {
  1013. this.isshow = true
  1014. this.releobject.value = ''
  1015. this.releobject.detail = ''
  1016. },
  1017. speciTo() {
  1018. if (this.releobject.value == '') {
  1019. this.$message({
  1020. title: '提示',
  1021. type: 'error',
  1022. duration: 1800,
  1023. message: '请输入规格',
  1024. type: 'warning'
  1025. });
  1026. return
  1027. }
  1028. if (this.releobject.detail == '') {
  1029. this.$message({
  1030. title: '提示',
  1031. duration: 1800,
  1032. type: 'error',
  1033. message: '请输入规格值',
  1034. type: 'warning'
  1035. });
  1036. return
  1037. }
  1038. this.ruleValue.push({
  1039. value: this.releobject.value,
  1040. detail: this.releobject.detail
  1041. });
  1042. this.isshow = true
  1043. this.releobject.value = ''
  1044. this.releobject.detail = ''
  1045. },
  1046. handleClose(tag, j, item) {
  1047. var detailarr = item.detail.split(',')
  1048. detailarr.splice(j, 1);
  1049. if (detailarr.length < 1) {
  1050. this.$message({
  1051. title: '提示',
  1052. type: 'error',
  1053. duration: 1800,
  1054. message: '规格值至少要有一个',
  1055. type: 'warning'
  1056. });
  1057. return
  1058. } else {
  1059. item.detail = String(detailarr)
  1060. }
  1061. },
  1062. handleInputConfirm(index, item) {
  1063. let inputValue = this.inputValues[index];
  1064. if (inputValue) {
  1065. var detailarr = item.detail.split(',')
  1066. detailarr.push(inputValue)
  1067. for (var i = 0; i < detailarr.length; i++) {
  1068. for (var j = 0; j < detailarr.length; j++) {
  1069. if (detailarr[i] == detailarr[j] && i != j) {
  1070. detailarr.splice(j, 1);
  1071. }
  1072. }
  1073. }
  1074. item.detail = String(detailarr)
  1075. this.inputValues[index] = '';
  1076. }
  1077. this.inputVisible = false;
  1078. },
  1079. // 获取品牌
  1080. // brandSelect() {
  1081. // let page = this.page - 1
  1082. // this.tableDataLoading = true
  1083. // this.$http({
  1084. // url: this.$http.adornUrl('selfGoodsBrand/result'),
  1085. // method: 'get',
  1086. // params: this.$http.adornParams({})
  1087. // }).then(({
  1088. // data
  1089. // }) => {
  1090. // this.tableDataLoading = false
  1091. // let returnData = data.data;
  1092. // this.brandIds = returnData
  1093. // })
  1094. // },
  1095. // 立即生成
  1096. create() {
  1097. this.attr = []
  1098. this.attr.push({
  1099. attrName: this.attrName,
  1100. attrValue: this.ruleValue,
  1101. ruleId: this.ruleId
  1102. })
  1103. if (this.originalMoney == '') {
  1104. this.originalMoney = '0'
  1105. }
  1106. if (this.goodsMoney == '') {
  1107. this.goodsMoney = '0'
  1108. }
  1109. if (this.memberPrice == '') {
  1110. this.memberPrice = '0'
  1111. }
  1112. this.$http({
  1113. url: this.$http.adornUrl(
  1114. // `admin/goods/isFormatAttr?coverImg=${this.goodsCover}&originalPrice=${this.originalMoney}&price=${this.goodsMoney}`
  1115. `admin/goods/isFormatAttr?originalPrice=${this.originalMoney}&price=${this.goodsMoney}`
  1116. ),
  1117. method: 'post',
  1118. data: this.attr[0]
  1119. }).then(({
  1120. data
  1121. }) => {
  1122. let returnData = data.data;
  1123. this.headerData = returnData.header
  1124. this.valueData = returnData.value
  1125. this.propshow = true
  1126. this.propshow1 = false
  1127. this.sku = returnData.value
  1128. this.detailJson = returnData.value[0].detailJson.split(',')
  1129. })
  1130. },
  1131. // 删除详情图
  1132. clearXq(index) {
  1133. this.goodsParticularsPicture.splice(index, 1);
  1134. },
  1135. //上传成功
  1136. handleUploadSuccessXq(file, fileList) {
  1137. this.goodsParticularsPicture.push(file.data)
  1138. },
  1139. onprogress1(event, file, fileList) {
  1140. console.log('详情图上传进度', parseInt(event.percent))
  1141. this.percentage1 = parseInt(event.percent)
  1142. },
  1143. },
  1144. mounted() {
  1145. this.shopId = this.$route.query.shopId
  1146. console.log('shopId:', this.shopId)
  1147. // this.init()
  1148. this.dataSelect()
  1149. this.specifSelect()
  1150. this.goodsName = ''
  1151. this.type = ''
  1152. this.merchants = ''
  1153. this.goodsMoney = ''
  1154. this.packMoney = ''
  1155. this.goodsSynopsis = ''
  1156. this.memberPrice = ''
  1157. this.inventory = ''
  1158. this.originalMoney = ''
  1159. this.salesVolume = ''
  1160. this.sales = ''
  1161. this.goodsDescribe = ''
  1162. this.postagePrice = ''
  1163. this.status = ''
  1164. this.buyReason = ''
  1165. this.brandId = ''
  1166. // this.brandSelect()
  1167. },
  1168. }
  1169. </script>
  1170. <style scoped="scoped">
  1171. .main-cont {
  1172. max-width: 100%;
  1173. min-width: 80%;
  1174. padding-bottom: 5%;
  1175. background-color: #fff;
  1176. }
  1177. .tinymce-container {
  1178. position: relative;
  1179. line-height: normal;
  1180. }
  1181. .tinymce-container>>>.mce-fullscreen {
  1182. z-index: 10000;
  1183. }
  1184. .tinymce-textarea {
  1185. visibility: hidden;
  1186. z-index: -1;
  1187. }
  1188. .hide .el-upload--picture-card {
  1189. display: none;
  1190. }
  1191. .margin15 {
  1192. margin-right: 15px;
  1193. margin-top: 10px;
  1194. }
  1195. .ruleitem {
  1196. padding-left: 10px;
  1197. margin-top: 15px;
  1198. }
  1199. .ruleitem .ruleicon {
  1200. position: relative;
  1201. top: 3px;
  1202. left: 2px;
  1203. width: 1.2em;
  1204. height: 1.2em;
  1205. }
  1206. .el-tag+.el-tag {
  1207. margin-left: 10px;
  1208. }
  1209. .button-new-tag {
  1210. height: 32px;
  1211. line-height: 31px;
  1212. padding-top: 0;
  1213. padding-bottom: 0;
  1214. border-radius: 4px;
  1215. border-top-left-radius: 0;
  1216. border-bottom-left-radius: 0;
  1217. background-color: #f5f7fa;
  1218. position: relative;
  1219. left: -5px;
  1220. border-color: #dcdfe6;
  1221. border: 1px solid #dcdfe6;
  1222. }
  1223. .input-new-tag {
  1224. width: 90px;
  1225. margin-left: 10px;
  1226. vertical-align: bottom;
  1227. }
  1228. .el-input--small .el-input__inner {
  1229. border-top-right-radius: 0;
  1230. border-bottom-right-radius: 0;
  1231. }
  1232. .el-table--enable-row-transition .el-table__body td {
  1233. text-align: center;
  1234. }
  1235. .imgWrap .avatar-uploader .el-upload {
  1236. width: 60px;
  1237. }
  1238. .el-table .cell {
  1239. text-align: center !important;
  1240. }
  1241. .el-tag--medium {
  1242. margin-right: 10px;
  1243. }
  1244. .bqList {
  1245. padding: 4px 14px;
  1246. margin: 4px;
  1247. border: 1px solid #efefef;
  1248. font-size: 12px;
  1249. color: #999;
  1250. border-radius: 4px;
  1251. margin-right: 15px;
  1252. }
  1253. .delss {
  1254. display: none;
  1255. position: relative;
  1256. }
  1257. .delss .el-icon-delete {
  1258. position: absolute;
  1259. top: 0;
  1260. }
  1261. .bqList:hover .delss {
  1262. display: initial;
  1263. opacity: 0.5;
  1264. }
  1265. .tj {
  1266. padding: 6px !important;
  1267. margin: 4px;
  1268. font-size: 12px;
  1269. border: 1px solid #ccc;
  1270. border-radius: 4px;
  1271. }
  1272. .divhove {
  1273. position: absolute;
  1274. width: 100%;
  1275. height: 100%;
  1276. left: 0;
  1277. top: 0;
  1278. opacity: 0;
  1279. cursor: default;
  1280. text-align: center;
  1281. padding-top: 50%;
  1282. border-radius: 6px;
  1283. background-color: rgba(0, 0, 0, .5);
  1284. -webkit-transition: opacity .3s;
  1285. transition: opacity .3s;
  1286. }
  1287. .el-tag--medium {
  1288. margin-right: 10px;
  1289. }
  1290. .divhove:hover {
  1291. opacity: 0.8;
  1292. }
  1293. </style>