index.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052
  1. <template>
  2. <div class="app-container">
  3. <el-row>
  4. <el-col :span="24">
  5. <div class="cell">
  6. <div class="cell-title">
  7. <div class="title-left">
  8. <div class="title">攻略管理</div>
  9. </div>
  10. </div>
  11. <div class="cell-body">
  12. <div class="controls">
  13. <el-form :inline="true" :model="formInline" class="demo-form-inline">
  14. <el-form-item label="">
  15. <el-input v-model="formInline.key" style="width: 280px;" prefix-icon="el-icon-search" clearable
  16. placeholder="请输入标题"></el-input>
  17. </el-form-item>
  18. <el-form-item>
  19. <el-button type="primary" class="btn-search" @click="btn_search">查询</el-button>
  20. </el-form-item>
  21. </el-form>
  22. <div>
  23. <el-button class="export" size="small" @click="add_strategy">
  24. <i class="el-icon el-icon-circle-plus-outline" style="font-size: 20px;"></i>
  25. <span style="font-size: 16px;">新增攻略</span>
  26. </el-button>
  27. <el-button class="export" size="small" @click="showSetPublisher">
  28. <i class="el-icon el-icon-setting" style="font-size: 20px;"></i>
  29. <span style="font-size: 16px;">发布人设置</span>
  30. </el-button>
  31. </div>
  32. </div>
  33. <el-table ref="multipleTable" :data="tableData" height="560" style="width: 100%" :cell-style="cell_style" v-loading="loading"
  34. :header-cell-style="header_cell_style">
  35. <el-table-column label="序号" align="center" width="66">
  36. <template slot-scope="scope">
  37. <span>{{ scope.row.xuhao }}</span>
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="标题" align="center" width="180">
  41. <template slot-scope="scope">
  42. <span>{{ scope.row.title }}</span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column label="描述" align="left">
  46. <template slot-scope="scope">
  47. <div style="height: 200px; overflow-y: auto;" class="scroll-container">
  48. <span v-html="scope.row.content"></span>
  49. </div>
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="视频/图片" align="center" width="260">
  53. <template slot-scope="scope">
  54. <span v-if="typeof scope.row.image !== 'undefined'">
  55. <viewer>
  56. <el-carousel v-if="typeof scope.row.image == 'string'" height="180px">
  57. <el-carousel-item v-for="item in 1" :key="item">
  58. <img :src="scope.row.image" style="height: 180px; object-fit: contain; cursor: pointer;" />
  59. </el-carousel-item>
  60. </el-carousel>
  61. <el-carousel v-else height="180px">
  62. <el-carousel-item v-for="item in scope.row.image" :key="item">
  63. <img :src="item" style="height: 180px; object-fit: contain; cursor: pointer;" />
  64. </el-carousel-item>
  65. </el-carousel>
  66. </viewer>
  67. </span>
  68. <span v-else-if="typeof scope.row.video !== 'undefined'">
  69. <video-player class="video-player vjs-custom-skin" @play="onPlayerPlay($event)" :playsinline="true"
  70. :options="scope.row.video"></video-player>
  71. </span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="选择地点" align="center" width="130">
  75. <template slot-scope="scope">
  76. <span>{{ scope.row.townName }}</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="发布时间" align="center" width="160">
  80. <template slot-scope="scope">
  81. <span>{{ scope.row.createDate }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="来源" align="center" width="88">
  85. <template slot-scope="scope">
  86. <span>{{ scope.row.publishWay }}</span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="发布人" align="center" width="88">
  90. <template slot-scope="scope">
  91. <span>{{ scope.row.userName }}</span>
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="操作" align="center" width="180">
  95. <template slot-scope="scope">
  96. <el-button v-if="scope.row.isTop == 0" @click="handleSetTop(scope.row.id, 1)" type="text"
  97. style="color: rgba(9, 101, 98, 1);" size="small">置顶</el-button>
  98. <el-button v-else @click="handleSetTop(scope.row.id, 0)" type="text" style="color: rgba(212, 48, 48, 1);"
  99. size="small">取消置顶</el-button>
  100. <el-button v-if="scope.row.publishWay !== '小程序'" @click="handleModifyClick(scope.row)" type="text"
  101. style="color: rgba(9, 101, 98, 1);" size="small">编辑</el-button>
  102. <el-button @click="handleDelClick(scope.row)" type="text" style="color: rgba(212, 48, 48, 1);" size="small">删除</el-button>
  103. </template>
  104. </el-table-column>
  105. </el-table>
  106. <div class="pagination-table">
  107. <el-pagination @current-change="currentPageChange" :current-page.sync="pagination.currentPage" :page-size="pagination.pageSize"
  108. layout="prev, pager, next, jumper" :total="pagination.total">
  109. </el-pagination>
  110. </div>
  111. </div>
  112. </div>
  113. </el-col>
  114. </el-row>
  115. <!-- 发布人设置 -->
  116. <el-dialog title="发布人设置" custom-class="configuration-window" :visible.sync="setPublisherVisible" :close-on-click-modal="false"
  117. :close-on-press-escape="false" @close="setPublisherVisible = false">
  118. <el-row style="display: none;">
  119. <el-col :span="24" style="display: flex; justify-content: space-between; padding: 0;">
  120. <div>
  121. <el-input v-model="publisherSearch.key" style="width: 180px; margin-right: 10px;" clearable placeholder="请输入用户名"></el-input>
  122. <el-button type="primary" class="configure-btn" @click="btn_search">查询</el-button>
  123. </div>
  124. <el-button class="configure-btn" @click="show_add_publisher_dialog = true">确定设置</el-button>
  125. </el-col>
  126. </el-row>
  127. <el-row>
  128. <el-col :span="24" style="padding: 0;margin: 10px 0;">
  129. <el-table :data="tableData_publisher" height="380" style="width: 100%" :cell-style="cell_style" v-loading="loading"
  130. :header-cell-style="header_cell_style">
  131. <el-table-column label="序号" align="center" width="55">
  132. <template slot-scope="scope">
  133. <span>{{ scope.row.xuhao }}</span>
  134. </template>
  135. </el-table-column>
  136. <el-table-column label="ID" align="center">
  137. <template slot-scope="scope">
  138. <span>{{ scope.row.id }}</span>
  139. </template>
  140. </el-table-column>
  141. <el-table-column label="账号名" align="center">
  142. <template slot-scope="scope">
  143. <span>{{ scope.row.name }}</span>
  144. </template>
  145. </el-table-column>
  146. <el-table-column label="操作" align="center">
  147. <template slot-scope="scope">
  148. <el-button v-if="scope.row.mark == 0" @click="bindingPuhlisherIds(scope.row.id, 'add')" type="text"
  149. style="color: rgba(9, 101, 98, 1);" size="small">绑定</el-button>
  150. <el-button v-else @click="bindingPuhlisherIds(scope.row.id, 'del')" type="text" style="color: rgba(212, 48, 48, 1);"
  151. size="small">取消绑定</el-button>
  152. </template>
  153. </el-table-column>
  154. </el-table>
  155. </el-col>
  156. </el-row>
  157. </el-dialog>
  158. <!-- 新增攻略 -->
  159. <el-dialog title="新增攻略" custom-class="add-dlg-class" :visible.sync="dialogAddStrategyVisible" :close-on-click-modal="false"
  160. :close-on-press-escape="false" @close="dialogAddStrategyVisible = false">
  161. <div style="height: 675px; padding-right: 10px; overflow-y: auto;" class="scroll-container">
  162. <el-form :model="formAddDialog" ref="addDialogForm" :rules="addDialogFormRules">
  163. <el-form-item label="标题" :required="true" :label-width="formLabelWidth" prop="title">
  164. <el-input v-model="formAddDialog.title" placeholder="请输入标题"></el-input>
  165. </el-form-item>
  166. <el-form-item label="发布人" :required="true" :label-width="formLabelWidth" prop="publisher">
  167. <el-select v-model="formAddDialog.publisher" filterable clearable placeholder="请选择发布人">
  168. <el-option v-for="item in options" :key="item.publisher" :label="item.label" :value="item.publisher">
  169. </el-option>
  170. </el-select>
  171. </el-form-item>
  172. <el-form-item label="内容" :required="true" :label-width="formLabelWidth" prop="content">
  173. <quill-editor v-model="formAddDialog.content" :options="editorOption"></quill-editor>
  174. </el-form-item>
  175. <el-form-item label="图片/视频" :required="true" :label-width="formLabelWidth" prop="imgs">
  176. <div class="add-strategy-img">
  177. <div v-for="(item, index) in formAddDialog.imgs">
  178. <div v-if="item.img == ''" class="add-strategy-img-box" @click="openImageUploadDialog(index, 'add')">
  179. <div class="add-strategy-img-plus"><i class="el-icon-plus"></i></div>
  180. <div class="add-strategy-img-txt">上传图片 {{index + 1}}</div>
  181. </div>
  182. <div v-else class="add-strategy-img-box">
  183. <viewer>
  184. <img :src="item.img" style="height: 120px; width: 120px; margin-bottom: -14px; cursor: pointer; border-radius: 5px;" />
  185. <div @click="del_local_display_img('formAddDialog.img', index)" class="add-strategy-img-clear">&times;</div>
  186. </viewer>
  187. </div>
  188. </div>
  189. <input type="file" ref="addImageUploadInput" style="display:none" accept=".jpg,.png"
  190. @change="uploadImageVideo($event, 'img', formAddDialog.imgIndex)" />
  191. <div v-if="formAddDialog.show_video == ''" class="add-strategy-img-box" style="border: 2px dashed #ff4949;"
  192. @click="openVideoUploadDialog('add')">
  193. <div class="add-strategy-img-plus" style="color: #ff4949; font-weight: bold;"><i class="el-icon-plus"></i></div>
  194. <div class="add-strategy-img-txt" style="color: #ff4949; font-weight: bold;">上传视频</div>
  195. </div>
  196. <div v-else class="add-strategy-img-box-video">
  197. <video-player class="video-player vjs-custom-skin" style="margin-top: 25px; overflow: hidden;" @play="onPlayerPlay($event)"
  198. :playsinline="true" :options="formAddDialog.show_video"></video-player>
  199. <div @click="del_local_display_img('formAddDialog.show_video', -1)" class="add-strategy-img-clear"
  200. style="color: #fff; background-color: #ff4949;">&times;</div>
  201. </div>
  202. <input type="file" ref="addVideoUploadInput" style="display:none" accept=".mp4" @change="uploadImageVideo($event, 'video', -1)" />
  203. </div>
  204. </el-form-item>
  205. <el-form-item label="选择地点" :required="true" :label-width="formLabelWidth" prop="rtownId">
  206. <el-select v-model="formAddDialog.rtownId" @change="handleAddAdressStrategy" placeholder="请选择地点">
  207. <el-option v-for="item in formAddDialog.rtownOptions" :key="item.id" :label="item.name" :value="item.id">
  208. </el-option>
  209. </el-select>
  210. </el-form-item>
  211. <el-form-item label="" :required="true" :label-width="formLabelWidth" prop="hotelIds">
  212. <div style="display: flex; flex-wrap: wrap; justify-content: space-between;">
  213. <div v-for="(hotel, index) in formAddDialog.hotelNames" :label="hotel.name" :key="hotel.id">
  214. <viewer>
  215. <div class="hotel-box" :class="{'bg-color': hotel.checked}">
  216. <img :src="hotel.coverImg" style="width: 114px; height: 70px; border-radius: 5px;">
  217. <div class="hotel-box-txt" @click="getHotelIds(index, hotel.id)">
  218. <div style="margin: 0 0 10px 0;" class="hotel-list">{{hotel.name}}</div>
  219. <div v-if="hotel.type == 1" class="hotel-list">银宿级</div>
  220. <div v-else-if="hotel.type == 2" class="hotel-list">金宿级</div>
  221. <div v-else-if="hotel.type == 3" class="hotel-list">白金级</div>
  222. <div v-else class="hotel-list">等级未知</div>
  223. </div>
  224. </div>
  225. </viewer>
  226. </div>
  227. </div>
  228. </el-form-item>
  229. <el-form-item label="是否置顶" :label-width="formLabelWidth">
  230. <el-switch v-model="formAddDialog.istop" active-color="#096562" inactive-color="#ff4949"></el-switch>
  231. </el-form-item>
  232. </el-form>
  233. </div>
  234. <div slot="footer" class="dialog-footer">
  235. <el-button class="add-info-cancel-btn" @click="dialogAddStrategyVisible = false">取 消</el-button>
  236. <el-button class="add-info-confirm-btn" @click="handleAddStrategy">确 认</el-button>
  237. </div>
  238. </el-dialog>
  239. <!-- 编辑攻略 -->
  240. <el-dialog title="编辑攻略" custom-class="add-dlg-class" :visible.sync="dialogModifyVisible" :close-on-click-modal="false" :close-on-press-escape="false"
  241. @close="dialogModifyVisible = false">
  242. <div style="height: 675px; padding-right: 10px; overflow-y: auto;" class="scroll-container">
  243. <el-form :model="formModifyDialog" ref="modifyDialogForm" :rules="modifyDialogFormRules">
  244. <el-form-item label="标题" :required="true" :label-width="formLabelWidth" prop="title">
  245. <el-input v-model="formModifyDialog.title" placeholder="请输入标题"></el-input>
  246. </el-form-item>
  247. <el-form-item label="发布人" :required="true" :label-width="formLabelWidth" prop="publisher">
  248. <el-select v-model="formModifyDialog.publisher" filterable placeholder="请选择发布人">
  249. <el-option v-for="item in options" :key="item.publisher" :label="item.label" :value="item.publisher">
  250. </el-option>
  251. </el-select>
  252. </el-form-item>
  253. <el-form-item label="内容" :required="true" :label-width="formLabelWidth" prop="content">
  254. <quill-editor v-model="formModifyDialog.content" :options="editorOption"></quill-editor>
  255. </el-form-item>
  256. <el-form-item label="图片/视频" :required="true" :label-width="formLabelWidth" prop="imgs">
  257. <div class="add-strategy-img">
  258. <div v-for="(item, index) in formModifyDialog.imgs">
  259. <div v-if="item.img == ''" class="add-strategy-img-box" @click="openImageUploadDialog(index, 'modify')">
  260. <div class="add-strategy-img-plus"><i class="el-icon-plus"></i></div>
  261. <div class="add-strategy-img-txt">上传图片 {{index + 1}}</div>
  262. </div>
  263. <div v-else class="add-strategy-img-box">
  264. <viewer>
  265. <img :src="item.img" style="height: 120px; width: 120px; margin-bottom: -14px; cursor: pointer; border-radius: 5px;" />
  266. <div @click="del_local_display_img('formModifyDialog.img', index)" class="add-strategy-img-clear">&times;</div>
  267. </viewer>
  268. </div>
  269. </div>
  270. <input type="file" ref="modifyImageUploadInput" style="display:none" accept=".jpg,.png"
  271. @change="uploadModifyImageVideo($event, 'img', formModifyDialog.imgIndex)" />
  272. <div v-if="formModifyDialog.show_video == ''" class="add-strategy-img-box" style="border: 2px dashed #ff4949;"
  273. @click="openVideoUploadDialog('modify')">
  274. <div class="add-strategy-img-plus" style="color: #ff4949; font-weight: bold;"><i class="el-icon-plus"></i></div>
  275. <div class="add-strategy-img-txt" style="color: #ff4949; font-weight: bold;">上传视频</div>
  276. </div>
  277. <div v-else class="add-strategy-img-box-video">
  278. <video-player class="video-player vjs-custom-skin" style="margin-top: 25px; overflow: hidden;" @play="onPlayerPlay($event)"
  279. :playsinline="true" :options="formModifyDialog.show_video"></video-player>
  280. <div @click="del_local_display_img('formModifyDialog.show_video', -1)" class="add-strategy-img-clear"
  281. style="color: #fff; background-color: #ff4949;">&times;</div>
  282. </div>
  283. <input type="file" ref="modifyVideoUploadInput" style="display:none" accept=".mp4"
  284. @change="uploadModifyImageVideo($event, 'video', -1)" />
  285. </div>
  286. </el-form-item>
  287. <el-form-item label="选择地点" :required="true" :label-width="formLabelWidth" prop="rtownId">
  288. <el-select v-model="formModifyDialog.rtownId" @change="handleModifyAdressStrategy('change')" placeholder="请选择地点">
  289. <el-option v-for="item in formModifyDialog.rtownOptions" :key="item.id" :label="item.name" :value="item.id">
  290. </el-option>
  291. </el-select>
  292. </el-form-item>
  293. <el-form-item label="" :required="true" :label-width="formLabelWidth" prop="hotelIds">
  294. <div style="display: flex; flex-wrap: wrap; justify-content: space-between;">
  295. <div v-for="(hotel, index) in formModifyDialog.hotelNames" :label="hotel.name" :key="hotel.id">
  296. <viewer>
  297. <div class="hotel-box" :class="{'bg-color': hotel.checked}">
  298. <img :src="hotel.coverImg" style="width: 114px; height: 70px; border-radius: 5px;">
  299. <div class="hotel-box-txt" @click="getModifyHotelIds(index, hotel.id)">
  300. <div style="margin: 0 0 10px 0;" class="hotel-list">{{hotel.name}}</div>
  301. <div v-if="hotel.type == 1" class="hotel-list">银宿级</div>
  302. <div v-else-if="hotel.type == 2" class="hotel-list">金宿级</div>
  303. <div v-else-if="hotel.type == 3" class="hotel-list">白金级</div>
  304. <div v-else class="hotel-list">等级未知</div>
  305. </div>
  306. </div>
  307. </viewer>
  308. </div>
  309. </div>
  310. </el-form-item>
  311. <el-form-item label="是否置顶" :label-width="formLabelWidth">
  312. <el-switch v-model="formModifyDialog.istop" active-color="#096562" inactive-color="#ff4949"></el-switch>
  313. </el-form-item>
  314. </el-form>
  315. </div>
  316. <div slot="footer" class="dialog-footer">
  317. <el-button class="add-info-cancel-btn" @click="dialogModifyVisible = false">取 消</el-button>
  318. <el-button class="add-info-confirm-btn" @click="handleModifyStrategy">确 认</el-button>
  319. </div>
  320. </el-dialog>
  321. <!-- 删除攻略确认对话框 -->
  322. <el-dialog custom-class="el-dialog-delete-account" :visible.sync="dialogDeleteVisible" :close-on-click-modal="false" :close-on-press-escape="false"
  323. :show-close="false">
  324. <div slot="" class="del-account-body">
  325. <img src="../../icons/serveAC/del_warning.png" alt="">
  326. <div class="del-account-body-txt">是否确定从列表中删除?</div>
  327. </div>
  328. <div slot="footer" class="dialog-footer">
  329. <el-button class="add-user-cancel-btn" @click="dialogDeleteVisible = false"> 否 </el-button>
  330. <el-button class="add-user-confirm-btn" @click="dialogDeleteStrategy"> 是 </el-button>
  331. </div>
  332. </el-dialog>
  333. </div>
  334. </template>
  335. <script>
  336. import {
  337. getTableData,
  338. setTop,
  339. getTown,
  340. getHotels,
  341. getPublisher,
  342. uploadFiles,
  343. insertStrategy,
  344. updateStrategy,
  345. delStrategy,
  346. bindingPublisher,
  347. publisherList
  348. } from '@/api/strategyMgr'
  349. import {
  350. isEmpty,
  351. cos
  352. } from '@/js/common'
  353. import {
  354. valid
  355. } from 'mockjs'
  356. import COS from 'cos-js-sdk-v5'
  357. import {
  358. config
  359. } from '@vue/test-utils'
  360. export default {
  361. data() {
  362. return {
  363. videoList: [],
  364. currentUserLevel: this.$store.state.user.level, // 当前用户的权限
  365. //currentUserCreateId: this.$store.state.user.create_id, // 当前用户的createId
  366. currentUserId: this.$store.state.user.user_id, // 当前用户的userId
  367. formLabelWidth: '100px',
  368. // 表格单元格样式
  369. cell_style: {
  370. color: '#1A202B',
  371. 'font-size': '14px',
  372. 'font-family': 'Microsoft YaHei-3970(82674968)'
  373. },
  374. // 表格头部样式
  375. header_cell_style: {
  376. background: '#E6ECFE',
  377. color: '#1A202B',
  378. 'font-size': '16px',
  379. 'font-family': 'Microsoft YaHei-3970(82674968)'
  380. },
  381. addDialogFormRules: { // 新增攻略验证规则
  382. title: [{
  383. required: true,
  384. message: '请输入标题',
  385. trigger: 'blur'
  386. }, {
  387. pattern: /^[\s\S]*[\u4e00-\u9fa5]{2,}[\s\S]*$/,
  388. message: '至少2个汉字,其它字符不限',
  389. trigger: 'blur'
  390. }],
  391. publisher: [{
  392. required: true,
  393. message: '请选择发布人',
  394. trigger: 'blur'
  395. }, {
  396. required: true,
  397. message: '请选择发布人',
  398. trigger: 'change'
  399. }],
  400. content: [{
  401. required: true,
  402. message: '请输入内容',
  403. trigger: 'blur'
  404. }, {
  405. pattern: /^[\s\S]*[\u4e00-\u9fa5]{3,}[\s\S]*$/,
  406. message: '至少3个汉字,其它字符不限',
  407. trigger: 'blur'
  408. }],
  409. imgs: [{
  410. required: true,
  411. message: '请选择图片或视频',
  412. trigger: 'blur'
  413. }, {
  414. validator: this.validateImgVideo,
  415. trigger: 'blur'
  416. }],
  417. rtownId: [{
  418. required: true,
  419. message: '请选择乡镇',
  420. trigger: 'blur'
  421. }],
  422. hotelIds: [{
  423. required: true,
  424. message: '请选择民宿',
  425. trigger: 'change'
  426. }]
  427. },
  428. // 富文本编辑器配置
  429. editorOption: {
  430. modules: {
  431. toolbar: [
  432. ['bold', 'italic', 'underline', 'strike'], // 加粗、斜体、下划线、删除线按钮
  433. [{
  434. 'list': 'ordered'
  435. }, {
  436. 'list': 'bullet'
  437. }], // 有序列表和无序列表按钮
  438. [{
  439. 'indent': '-1'
  440. }, {
  441. 'indent': '+1'
  442. }], // 减少缩进和增加缩进按钮
  443. [{
  444. 'size': ['small', false, 'large', 'huge']
  445. }], // 自定义下拉菜单,表示字体大小
  446. [{
  447. 'color': []
  448. }, {
  449. 'background': []
  450. }], // 下拉菜单,使用主题中的默认颜色和背景色
  451. [{
  452. 'align': []
  453. }], // 下拉菜单,选择对齐方式
  454. ['clean'] // 清除格式按钮,移除所有格式
  455. ]
  456. },
  457. placeholder: '请输入内容'
  458. },
  459. modifyDialogFormRules: { // 编辑周边验证规则
  460. title: [{
  461. required: true,
  462. message: '请输入标题',
  463. trigger: 'blur'
  464. }, {
  465. pattern: /^[\s\S]*[\u4e00-\u9fa5]{2,}[\s\S]*$/,
  466. message: '至少2个汉字,其它字符不限',
  467. trigger: 'blur'
  468. }],
  469. publisher: [{
  470. required: true,
  471. message: '请选择发布人',
  472. trigger: 'blur'
  473. }, {
  474. required: true,
  475. message: '请选择发布人',
  476. trigger: 'change'
  477. }],
  478. content: [{
  479. required: true,
  480. message: '请输入内容',
  481. trigger: 'blur'
  482. }, {
  483. pattern: /^[\s\S]*[\u4e00-\u9fa5]{3,}[\s\S]*$/,
  484. message: '至少3个汉字,其它字符不限',
  485. trigger: 'blur'
  486. }],
  487. imgs: [{
  488. required: true,
  489. message: '请选择图片或视频',
  490. trigger: 'blur'
  491. }, {
  492. validator: this.validateModifyImgVideo,
  493. trigger: 'blur'
  494. }],
  495. rtownId: [{
  496. required: true,
  497. message: '请选择乡镇',
  498. trigger: 'blur'
  499. }],
  500. hotelIds: [{
  501. required: true,
  502. message: '请选择民宿',
  503. trigger: 'change'
  504. }]
  505. },
  506. // 查询数据
  507. formInline: {
  508. key: ''
  509. },
  510. publisherSearch: {
  511. key: ''
  512. }, // 搜索用户名
  513. bindedPublisherIds: '', // 绑定的用户ids
  514. videoOptions: {
  515. playbackRates: [0.5, 0.8, 1.0, 1.25, 1.5, 1.75, 2.0], //播放速度
  516. autoplay: false, // 如果true,浏览器准备好时开始回放。
  517. muted: false, // 默认情况下将会消除任何音频。
  518. loop: false, // 导致视频一结束就重新开始。
  519. preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
  520. language: "zh-CN",
  521. aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
  522. fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
  523. sources: [{
  524. withCredentials: false,
  525. type: "video/mp4", // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
  526. src: '', // https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4
  527. }],
  528. controls: true,
  529. hls: true,
  530. poster: "", // 你的封面地址
  531. notSupportedMessage: "此视频暂无法播放,请稍后再试", // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
  532. controlBar: {
  533. progressControl: true,
  534. currentTimeDisplay: true,
  535. timeDivider: true,
  536. durationDisplay: true,
  537. remainingTimeDisplay: false,
  538. fullscreenToggle: true, // 全屏按钮
  539. },
  540. flash: {
  541. hls: {
  542. withCredentials: false
  543. }
  544. },
  545. html5: {
  546. hls: {
  547. withCredentials: false
  548. }
  549. }
  550. },
  551. addVideoUploadFileDisable: false, // 添加视频无效
  552. addImgsUploadFileDisable: false, // 添加图片无效
  553. modifyVideoUploadFileDisable: false, // 修改添加视频无效
  554. modifyImgsUploadFileDisable: false, // 修改添加图片无效
  555. options: [],
  556. formAddDialog: {
  557. title: '',
  558. publisher: '',
  559. content: '',
  560. rtownId: '',
  561. rtownOptions: [],
  562. hotelIds: [],
  563. hotelNames: [],
  564. showHotels: false,
  565. imgIndex: '',
  566. imgs: [{
  567. id: 1,
  568. img: ''
  569. }, {
  570. id: 2,
  571. img: ''
  572. }, {
  573. id: 3,
  574. img: ''
  575. }, {
  576. id: 4,
  577. img: ''
  578. }, {
  579. id: 5,
  580. img: ''
  581. }, {
  582. id: 6,
  583. img: ''
  584. }, {
  585. id: 7,
  586. img: ''
  587. }, {
  588. id: 8,
  589. img: ''
  590. }, {
  591. id: 9,
  592. img: ''
  593. }],
  594. show_video: '',
  595. post_video: '',
  596. istop: false
  597. },
  598. formModifyDialog: {
  599. id: '',
  600. title: '',
  601. publisher: '',
  602. content: '',
  603. rtownId: '',
  604. rtownOptions: [],
  605. hotelIds: [],
  606. hotelNames: [],
  607. showHotels: false,
  608. imgIndex: '',
  609. imgs: [{
  610. id: 1,
  611. img: ''
  612. }, {
  613. id: 2,
  614. img: ''
  615. }, {
  616. id: 3,
  617. img: ''
  618. }, {
  619. id: 4,
  620. img: ''
  621. }, {
  622. id: 5,
  623. img: ''
  624. }, {
  625. id: 6,
  626. img: ''
  627. }, {
  628. id: 7,
  629. img: ''
  630. }, {
  631. id: 8,
  632. img: ''
  633. }, {
  634. id: 9,
  635. img: ''
  636. }],
  637. show_video: '',
  638. post_video: '',
  639. istop: false
  640. },
  641. tableData: [], // 攻略分页列表
  642. tableData_publisher: [], // 发布人列表
  643. cond_data: {},
  644. // 分页参数
  645. pagination: {
  646. currentPage: 1,
  647. pageSize: 9,
  648. total: 0
  649. },
  650. loading: true,
  651. setPublisherVisible: false, // 发布人设置
  652. dialogAddStrategyVisible: false, // 新增攻略
  653. dialogModifyVisible: false, // 修改攻略
  654. dialogDeleteVisible: false, // 删除确认对话框
  655. delStrategyId: '', // 要删除的攻略id
  656. cosVal: {
  657. SecretId: "AKIDJSP9gz469yZv77tQjotsgHguvjIgtvkL",
  658. SecretKey: "b3MVRD1g8RYS9g195oMkvukQvDKZfbOz",
  659. SecurityToken: "1320402385",
  660. Bucket: "jinganminsu-1320402385",
  661. Region: "ap-nanjing",
  662. }
  663. }
  664. },
  665. created() {
  666. // 检测权限
  667. if (this.currentUserLevel !== 2) {
  668. this.$router.replace({
  669. path: '/data'
  670. })
  671. return
  672. }
  673. // 获取消费记录,表格数据
  674. this.get_table_data('list');
  675. // 绑定的发布人列表
  676. this.getPublisherOptions();
  677. this.getTown();
  678. this.videoList.push({
  679. playerOptions: {
  680. playbackRates: [0.5, 0.8, 1.0, 1.25, 1.5, 1.75, 2.0], //播放速度
  681. autoplay: false, // 如果true,浏览器准备好时开始回放。
  682. muted: false, // 默认情况下将会消除任何音频。
  683. loop: false, // 导致视频一结束就重新开始。
  684. preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
  685. language: "zh-CN",
  686. aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
  687. fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
  688. sources: [{
  689. withCredentials: false,
  690. type: "video/mp4", // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
  691. src: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4',
  692. }],
  693. controls: true,
  694. hls: true,
  695. poster: "", // 你的封面地址
  696. notSupportedMessage: "此视频暂无法播放,请稍后再试", // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
  697. controlBar: {
  698. progressControl: true,
  699. currentTimeDisplay: true,
  700. timeDivider: true,
  701. durationDisplay: true,
  702. remainingTimeDisplay: false,
  703. fullscreenToggle: true, // 全屏按钮
  704. },
  705. flash: {
  706. hls: {
  707. withCredentials: false
  708. }
  709. },
  710. html5: {
  711. hls: {
  712. withCredentials: false
  713. }
  714. }
  715. }
  716. })
  717. },
  718. watch: {
  719. dialogAddStrategyVisible(newVal, oldVal) {
  720. if (newVal == true) {
  721. this.$nextTick(() => {
  722. this.$refs.addDialogForm.resetFields(); // 重置表单
  723. for (let i = 0; i < 9; i++) {
  724. this.del_local_display_img('formAddDialog.img', i);
  725. }
  726. this.del_local_display_img('formAddDialog.show_video', -1);
  727. });
  728. }
  729. }
  730. },
  731. mounted() {
  732. document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
  733. document.addEventListener('fullscreenchange', this.handleFullScreenChange);
  734. },
  735. beforeDestroy() {
  736. document.removeEventListener('fullscreenchange', this.handleFullScreenChange);
  737. },
  738. methods: {
  739. // 绑定 或 解绑发布人
  740. bindingPuhlisherIds(id, param) {
  741. if (param == 'add') {
  742. if (this.bindedPublisherIds == '') {
  743. this.bindedPublisherIds = id;
  744. } else {
  745. this.bindedPublisherIds = this.bindedPublisherIds + ',' + id;
  746. }
  747. } else if (param == 'del') {
  748. if (this.bindedPublisherIds.includes(id + ',')) {
  749. this.bindedPublisherIds = this.bindedPublisherIds.replace(id + ',', '');
  750. } else if (this.bindedPublisherIds.includes(',' + id)) {
  751. this.bindedPublisherIds = this.bindedPublisherIds.replace(',' + id, '');
  752. } else {
  753. this.bindedPublisherIds = this.bindedPublisherIds.replace(id, '');
  754. //this.$message.warning('至少保留一个发布人');
  755. //return
  756. }
  757. }
  758. let data = {
  759. id: this.currentUserId,
  760. userId: this.bindedPublisherIds
  761. }
  762. let that = this;
  763. bindingPublisher(data).then((res) => {
  764. if (res.code === 200) {
  765. if (param == 'add') {
  766. that.$message.success('绑定成功')
  767. } else if (param == 'del') {
  768. that.$message.success('解绑成功')
  769. }
  770. // 发布人列表
  771. that.showSetPublisher()
  772. // 绑定的发布人列表
  773. this.getPublisherOptions();
  774. } else {
  775. that.$message.warning(res.message)
  776. }
  777. }).catch((err) => {
  778. // console.log(err);
  779. that.$message.error(err.message)
  780. });
  781. },
  782. // 发布人列表
  783. showSetPublisher() {
  784. let that = this;
  785. publisherList(that.currentUserId).then((res) => {
  786. // console.log(res.data.pageList);
  787. if (res.code === 200) {
  788. let tempData = res.data.pageList;
  789. that.tableData_publisher = [];
  790. if (typeof tempData !== 'undefined' && tempData !== '') {
  791. let ids = '';
  792. for (let i = 0; i < tempData.length; i++) {
  793. let tdata = {
  794. xuhao: i + 1,
  795. id: tempData[i].id,
  796. name: tempData[i].user_name,
  797. mark: tempData[i].mark
  798. };
  799. that.tableData_publisher.push(tdata);
  800. if (tempData[i].mark == 1) {
  801. ids = ids + tempData[i].id + ',';
  802. }
  803. }
  804. that.bindedPublisherIds = ids.substring(0, ids.length - 1);
  805. } else {
  806. that.tableData_publisher = [];
  807. that.$message.warning('没有符合条件的数据!')
  808. }
  809. } else {
  810. that.tableData_publisher = [];
  811. that.$message.warning('没有符合条件的数据!')
  812. }
  813. }).catch((err) => {
  814. // console.log(err);
  815. that.$message.error(err.message)
  816. });
  817. // 显示对话框窗口
  818. that.setPublisherVisible = true;
  819. },
  820. // 获取发布人
  821. getPublisherOptions() {
  822. var that = this;
  823. getPublisher(this.currentUserId).then((res) => {
  824. // console.log(res.data.pageList);
  825. if (res.code === 200) {
  826. let tempData = res.data.pageList;
  827. if (typeof tempData !== 'undefined' && tempData !== '') {
  828. that.options = []
  829. for (var i = 0; i < tempData.length; i++) {
  830. let tmp = {
  831. publisher: tempData[i].id,
  832. label: tempData[i].user_name
  833. }
  834. that.options.push(tmp)
  835. }
  836. that.options.sort((a, b) => a.label.localeCompare(b.label))
  837. } else {
  838. that.options = []
  839. that.$message.warning('没有符合条件的数据!')
  840. }
  841. } else {
  842. that.options = []
  843. that.$message.warning('没有符合条件的数据!')
  844. }
  845. }).catch((err) => {
  846. // console.log(err);
  847. that.$message.error(err.message)
  848. });
  849. },
  850. // 验证图片和视频必须选择一个
  851. validateImgVideo(rule, value, callback) {
  852. let imgsEmpty = true;
  853. for (let i = 0; i < this.formAddDialog.imgs.length; i++) {
  854. if (this.formAddDialog.imgs[i].img !== '') {
  855. imgsEmpty = false;
  856. }
  857. };
  858. if (!this.formAddDialog.show_video && imgsEmpty) {
  859. callback(new Error('图片/视频需要选择一项'));
  860. } else {
  861. callback();
  862. }
  863. },
  864. validateModifyImgVideo(rule, value, callback) {
  865. let imgsEmpty = true;
  866. for (let i = 0; i < this.formModifyDialog.imgs.length; i++) {
  867. if (this.formModifyDialog.imgs[i].img !== '') {
  868. imgsEmpty = false;
  869. }
  870. };
  871. if (!this.formModifyDialog.show_video && imgsEmpty) {
  872. callback(new Error('图片/视频需要选择一项'));
  873. } else {
  874. callback();
  875. }
  876. },
  877. handleSetTop(id, istop) {
  878. if (typeof id == 'undefined' || id == '') {
  879. this.$message.error('id值无效!');
  880. return;
  881. }
  882. var that = this;
  883. setTop(id, istop).then((res) => {
  884. if (res.code === 200) {
  885. that.get_table_data('list')
  886. if (istop == 1) {
  887. that.$message.success('置顶成功!')
  888. } else {
  889. that.$message.success('取消置顶成功!')
  890. }
  891. } else {
  892. that.$message.warning(res.message)
  893. }
  894. }).catch((err) => {
  895. // console.log(err);
  896. that.$message.error(err.message)
  897. });
  898. },
  899. // 全屏
  900. handleFullScreenChange() {
  901. if (!document.fullscreenElement) {
  902. // 退出全屏逻辑
  903. this.playering.pause()
  904. }
  905. },
  906. // 定义点击播放按钮,自动全屏化的方法
  907. full(e) {
  908. // 做兼容处理
  909. if (e.requestFullscreen) {
  910. e.requestFullscreen()
  911. } else if (e.mozRequestFullScreen) {
  912. e.mozRequestFullScreen()
  913. } else if (e.msRequestFullscreen) {
  914. e.msRequestFullscreen()
  915. } else if (e.oRequestFullscreen) {
  916. e.oRequestFullscreen()
  917. } else if (e.webkitRequestFullscreen) {
  918. e.webkitRequestFullScreen()
  919. } else {
  920. // var docHtml = document.documentElement;
  921. // var docBody = document.body;
  922. var videobox = document.getElementsByClassName('video-player')
  923. var cssText = 'width:100%;height:100%;overflow:hidden;'
  924. // docHtml.style.cssText = cssText;
  925. // docBody.style.cssText = cssText;
  926. videobox.style.cssText = cssText + ';' + 'margin:0px;padding:0px;'
  927. document.IsFullScreen = true
  928. }
  929. },
  930. /**
  931. * 获取攻略记录,表格数据
  932. */
  933. get_table_data(param) {
  934. this.loading = true
  935. this.get_condtion();
  936. let data = this.cond_data;
  937. if (param == 'search') {
  938. data.page = 1
  939. this.pagination.currentPage = 1
  940. }
  941. var that = this;
  942. // console.log(data);
  943. getTableData(data).then((res) => {
  944. // console.log(res.data.pageList);
  945. if (res.code === 200) {
  946. let tempData = res.data.pageList;
  947. if (typeof tempData !== 'undefined' && tempData !== '') {
  948. that.pagination.total = res.data.total
  949. that.tableData = []
  950. for (var i = 0; i < tempData.length; i++) {
  951. tempData[i].xuhao = (that.pagination.currentPage - 1) * that.pagination.pageSize + i + 1
  952. tempData[i].createDate = tempData[i].createDate.substring(0, tempData[i].createDate.length - 2)
  953. if (typeof tempData[i].video !== 'undefined') {
  954. let tmpOption = JSON.parse(JSON.stringify(that.videoOptions))
  955. tmpOption.sources[0].src = tempData[i].video
  956. tempData[i].video = tmpOption
  957. }
  958. that.tableData.push(tempData[i])
  959. }
  960. } else {
  961. that.tableData = []
  962. that.$message.warning('没有符合条件的数据!')
  963. }
  964. } else {
  965. that.tableData = []
  966. that.$message.warning('没有符合条件的数据!')
  967. }
  968. }).catch((err) => {
  969. // console.log(err);
  970. that.$message.error(err.message)
  971. });
  972. that.loading = false;
  973. },
  974. getTown() {
  975. var that = this;
  976. getTown().then((res) => {
  977. if (res.code === 200) {
  978. that.formAddDialog.rtownOptions = res.data
  979. that.formModifyDialog.rtownOptions = res.data
  980. } else {
  981. that.$message.warning(res.message)
  982. }
  983. }).catch((err) => {
  984. // console.log(err);
  985. that.$message.error(err.message)
  986. });
  987. },
  988. // 定义点击播放按钮,调用全屏化的方法
  989. onPlayerPlay(player) {
  990. // console.log('player play===>>>', player)
  991. this.playering = player
  992. this.full(player)
  993. },
  994. // 添加/修改 对话框单击上传图片
  995. openImageUploadDialog(index, param) {
  996. if (param == 'add') {
  997. if (this.addImgsUploadFileDisable == true) {
  998. this.$message.warning('图片 和 视频只能选其一');
  999. return;
  1000. }
  1001. this.formAddDialog.imgIndex = index;
  1002. this.$refs.addImageUploadInput.click();
  1003. } else if (param == 'modify') {
  1004. if (this.modifyImgsUploadFileDisable == true) {
  1005. this.$message.warning('图片 和 视频只能选其一');
  1006. return;
  1007. }
  1008. this.formModifyDialog.imgIndex = index;
  1009. this.$refs.modifyImageUploadInput.click();
  1010. }
  1011. },
  1012. // 添加/修改 对话框单击上传视频
  1013. openVideoUploadDialog(param) {
  1014. if (param == 'add') {
  1015. if (this.addVideoUploadFileDisable == true) {
  1016. this.$message.warning('图片 和 视频只能选其一');
  1017. return;
  1018. }
  1019. this.$refs.addVideoUploadInput.click();
  1020. } else if (param == 'modify') {
  1021. if (this.modifyVideoUploadFileDisable == true) {
  1022. this.$message.warning('图片 和 视频只能选其一');
  1023. return;
  1024. }
  1025. this.$refs.modifyVideoUploadInput.click();
  1026. }
  1027. },
  1028. // 修改对话框单击上传详情图
  1029. openImageDetailUploadDialog_modify() {
  1030. this.$refs.modifyImageDetailUploadInput.click();
  1031. },
  1032. // 攻略新增上传文件
  1033. uploadImageVideo(event, imgOrVideo, index) {
  1034. // 点击取消,长度为0
  1035. if (event.target.files.length == 0)
  1036. return;
  1037. const file = event.target.files[0];
  1038. const key = `/uploads/gonglue/${new Date().getTime()}`; // 设置上传到 COS 后的文件名
  1039. var that = this
  1040. const cos = new COS(that.cosVal);
  1041. cos.putObject({
  1042. Bucket: "jinganminsu-1320402385",
  1043. Region: "ap-nanjing",
  1044. Key: key,
  1045. Body: file,
  1046. },
  1047. function(err, data) {
  1048. if (err) {
  1049. // console.error(err);
  1050. that.$message.error(err);
  1051. if (imgOrVideo == 'img') {
  1052. that.$set(that.formAddDialog.imgs[index], 'img', '')
  1053. } else {
  1054. that.$set(that.formAddDialog, 'video', '')
  1055. }
  1056. return;
  1057. } else {
  1058. // console.log(data);
  1059. if (!isEmpty(`${data.Location}`)) {
  1060. if (imgOrVideo == 'img') {
  1061. that.$set(that.formAddDialog.imgs[index], 'img', `https://${data.Location}`)
  1062. } else {
  1063. var tmpOption = that.videoOptions
  1064. tmpOption.sources[0].src = `https://${data.Location}`
  1065. that.$set(that.formAddDialog, 'show_video', tmpOption)
  1066. that.$set(that.formAddDialog, 'post_video', `https://${data.Location}`)
  1067. }
  1068. } else {
  1069. if (imgOrVideo == 'img') {
  1070. that.$set(that.formAddDialog.imgs[index], 'img', '')
  1071. } else {
  1072. that.$set(that.formAddDialog, 'show_video', '')
  1073. }
  1074. }
  1075. }
  1076. event.target.value = null;
  1077. that.onlyOneFileClass('add');
  1078. }
  1079. );
  1080. },
  1081. // 添加攻略时,只能添加图片或视频中的一种,不能两个同时上传
  1082. onlyOneFileClass(param) {
  1083. if (param == 'add') {
  1084. let imgsEmpty = true;
  1085. let tmpImgs = this.formAddDialog.imgs;
  1086. for (let i = 0; i < tmpImgs.length; i++) {
  1087. if (tmpImgs[i].img !== '') {
  1088. imgsEmpty = false;
  1089. }
  1090. };
  1091. if (!imgsEmpty) {
  1092. this.addVideoUploadFileDisable = true;
  1093. } else {
  1094. this.addVideoUploadFileDisable = false;
  1095. }
  1096. if (this.formAddDialog.show_video) {
  1097. this.addImgsUploadFileDisable = true;
  1098. } else {
  1099. this.addImgsUploadFileDisable = false;
  1100. }
  1101. } else {
  1102. let imgsEmpty = true;
  1103. let tmpImgs = this.formModifyDialog.imgs;
  1104. for (let i = 0; i < tmpImgs.length; i++) {
  1105. if (tmpImgs[i].img !== '') {
  1106. imgsEmpty = false;
  1107. }
  1108. };
  1109. if (!imgsEmpty) {
  1110. this.modifyVideoUploadFileDisable = true;
  1111. } else {
  1112. this.modifyVideoUploadFileDisable = false;
  1113. }
  1114. if (this.formModifyDialog.show_video) {
  1115. this.modifyImgsUploadFileDisable = true;
  1116. } else {
  1117. this.modifyImgsUploadFileDisable = false;
  1118. }
  1119. }
  1120. },
  1121. // 攻略修改上传文件
  1122. uploadModifyImageVideo(event, imgOrVideo, index) {
  1123. // 点击取消,长度为0
  1124. if (event.target.files.length == 0)
  1125. return;
  1126. const file = event.target.files[0];
  1127. const key = `/uploads/gonglue/${new Date().getTime()}`; // 设置上传到 COS 后的文件名
  1128. var that = this
  1129. const cos = new COS(this.cosVal);
  1130. cos.putObject({
  1131. Bucket: "jinganminsu-1320402385",
  1132. Region: "ap-nanjing",
  1133. Key: key,
  1134. Body: file,
  1135. },
  1136. function(err, data) {
  1137. if (err) {
  1138. // console.error(err);
  1139. that.$message.error(err);
  1140. if (imgOrVideo == 'img') {
  1141. that.$set(that.formModifyDialog.imgs[index], 'img', '')
  1142. } else {
  1143. that.$set(that.formModifyDialog, 'show_video', '')
  1144. }
  1145. return;
  1146. } else {
  1147. // console.log(data);
  1148. if (!isEmpty(`${data.Location}`)) {
  1149. if (imgOrVideo == 'img') {
  1150. that.$set(that.formModifyDialog.imgs[index], 'img', `https://${data.Location}`)
  1151. } else {
  1152. var tmpOption = this.videoOptions
  1153. tmpOption.sources[0].src = `https://${data.Location}`
  1154. that.$set(that.formModifyDialog, 'show_video', tmpOption)
  1155. that.$set(that.formModifyDialog, 'post_video', `https://${data.Location}`)
  1156. }
  1157. } else {
  1158. if (imgOrVideo == 'img') {
  1159. that.$set(that.formModifyDialog.imgs[index], 'img', '')
  1160. } else {
  1161. that.$set(that.formModifyDialog, 'show_video', '')
  1162. }
  1163. }
  1164. }
  1165. event.target.value = null;
  1166. that.onlyOneFileClass('modify');
  1167. }
  1168. );
  1169. },
  1170. // 删除本地显示的图片或视频
  1171. del_local_display_img(param, index) {
  1172. if (param === 'formAddDialog.img') {
  1173. this.$set(this.formAddDialog.imgs[index], 'img', '');
  1174. } else if (param === 'formAddDialog.show_video') {
  1175. this.$set(this.formAddDialog, 'show_video', '');
  1176. } else if (param === 'formModifyDialog.img') {
  1177. this.$set(this.formModifyDialog.imgs[index], 'img', '');
  1178. } else if (param === 'formModifyDialog.show_video') {
  1179. this.$set(this.formModifyDialog, 'show_video', '');
  1180. this.$set(this.formModifyDialog, 'post_video', '');
  1181. }
  1182. this.onlyOneFileClass('add');
  1183. },
  1184. // 获取民宿ids
  1185. getHotelIds(index, id) {
  1186. this.formAddDialog.hotelNames[index].checked = !this.formAddDialog.hotelNames[index].checked;
  1187. if (this.formAddDialog.hotelNames[index].checked == true) {
  1188. this.formAddDialog.hotelIds.push(id);
  1189. } else {
  1190. let newArr = this.formAddDialog.hotelIds.filter(item => item !== id);
  1191. this.formAddDialog.hotelIds = newArr;
  1192. }
  1193. },
  1194. // 获取修改民宿ids
  1195. getModifyHotelIds(index, id) {
  1196. this.formModifyDialog.hotelNames[index].checked = !this.formModifyDialog.hotelNames[index].checked;
  1197. if (this.formModifyDialog.hotelNames[index].checked == true) {
  1198. this.formModifyDialog.hotelIds.push(id);
  1199. } else {
  1200. let newArr = this.formModifyDialog.hotelIds.filter(item => item !== id);
  1201. this.formModifyDialog.hotelIds = newArr;
  1202. }
  1203. },
  1204. // 添加地点,选择乡镇后显示民宿
  1205. handleAddAdressStrategy() {
  1206. var that = this;
  1207. if (this.formAddDialog.rtownId !== '') {
  1208. getHotels(this.formAddDialog.rtownId).then((res) => {
  1209. // console.log(res);
  1210. if (res.code == 200) {
  1211. that.formAddDialog.showHotels = true;
  1212. for (let i = 0; i < res.data.pageList.length; i++) {
  1213. res.data.pageList[i].checked = false;
  1214. }
  1215. that.formAddDialog.hotelNames = res.data.pageList;
  1216. } else {
  1217. that.$message.error(res.message)
  1218. }
  1219. })
  1220. }
  1221. },
  1222. // 编辑地点,选择乡镇后显示民宿
  1223. handleModifyAdressStrategy(param) {
  1224. var that = this;
  1225. if (that.formModifyDialog.rtownId !== '') {
  1226. getHotels(that.formModifyDialog.rtownId).then((res) => {
  1227. // console.log(res);
  1228. if (res.code == 200) {
  1229. let tmpdata = res.data.pageList;
  1230. that.formModifyDialog.showHotels = true;
  1231. if (param == 'change') {
  1232. that.$set(that.formModifyDialog, 'hotelIds', [])
  1233. for (let i = 0; i < tmpdata.length; i++) {
  1234. tmpdata[i].checked = false;
  1235. }
  1236. } else {
  1237. for (let i = 0; i < tmpdata.length; i++) {
  1238. let mhotelIds = that.formModifyDialog.hotelIds;
  1239. let tf = false;
  1240. for (let j = 0; j < mhotelIds.length; j++) {
  1241. if (tmpdata[i].id == mhotelIds[j]) {
  1242. tf = true;
  1243. }
  1244. }
  1245. tmpdata[i].checked = tf;
  1246. }
  1247. }
  1248. that.formModifyDialog.hotelNames = tmpdata;
  1249. } else {
  1250. that.$message.error(res.message)
  1251. }
  1252. })
  1253. }
  1254. },
  1255. // 添加攻略
  1256. handleAddStrategy() {
  1257. var that = this;
  1258. var v = true;
  1259. this.$refs.addDialogForm.validate(valid => {
  1260. if (valid == false) {
  1261. v = false;
  1262. }
  1263. });
  1264. if (v == false || that.formAddDialog.rtownId == '' || that.formAddDialog.hotelIds.length == 0) {
  1265. return;
  1266. }
  1267. that.formAddDialog.create_id = this.formAddDialog.publisher;
  1268. var data = that.formAddDialog;
  1269. insertStrategy(data).then((res) => {
  1270. // console.log(res);
  1271. if (res.code == 200) {
  1272. that.get_table_data('list')
  1273. that.dialogAddStrategyVisible = false
  1274. that.$message.success('攻略添加成功!')
  1275. that.resetFormAddDialog();
  1276. } else {
  1277. that.$message.error(res.message)
  1278. }
  1279. })
  1280. },
  1281. // 重置添加表单
  1282. resetFormAddDialog() {
  1283. this.formAddDialog = {
  1284. title: '',
  1285. publisher: '',
  1286. content: '',
  1287. rtownId: '',
  1288. rtownOptions: this.formAddDialog.rtownOptions,
  1289. hotelIds: [],
  1290. hotelNames: [],
  1291. showHotels: false,
  1292. imgIndex: '',
  1293. imgs: [{
  1294. id: 1,
  1295. img: ''
  1296. }, {
  1297. id: 2,
  1298. img: ''
  1299. }, {
  1300. id: 3,
  1301. img: ''
  1302. }, {
  1303. id: 4,
  1304. img: ''
  1305. }, {
  1306. id: 5,
  1307. img: ''
  1308. }, {
  1309. id: 6,
  1310. img: ''
  1311. }, {
  1312. id: 7,
  1313. img: ''
  1314. }, {
  1315. id: 8,
  1316. img: ''
  1317. }, {
  1318. id: 9,
  1319. img: ''
  1320. }],
  1321. show_video: '',
  1322. post_video: '',
  1323. create_id: '',
  1324. istop: false
  1325. }
  1326. },
  1327. // 编辑攻略
  1328. handleModifyStrategy() {
  1329. var that = this;
  1330. var v = true;
  1331. this.$refs.modifyDialogForm.validate(valid => {
  1332. if (valid == false) {
  1333. v = false;
  1334. }
  1335. });
  1336. if (v == false || that.formModifyDialog.rtownId == '' || that.formModifyDialog.hotelIds.length == 0) {
  1337. return;
  1338. }
  1339. that.formModifyDialog.create_id = this.formModifyDialog.publisher;
  1340. var data = that.formModifyDialog;
  1341. updateStrategy(data).then((res) => {
  1342. // console.log(res);
  1343. if (res.code == 200) {
  1344. that.get_table_data('list')
  1345. that.dialogModifyVisible = false
  1346. that.$message.success('攻略修改成功!')
  1347. that.resetFormModifyDialog();
  1348. } else {
  1349. that.$message.error(res.message)
  1350. }
  1351. });
  1352. },
  1353. // 重置修改表单变量
  1354. resetFormModifyDialog() {
  1355. this.formModifyDialog = {
  1356. id: '',
  1357. title: '',
  1358. publisher: '',
  1359. content: '',
  1360. rtownId: '',
  1361. rtownOptions: this.formModifyDialog.rtownOptions,
  1362. hotelIds: [],
  1363. hotelNames: [],
  1364. showHotels: false,
  1365. imgIndex: '',
  1366. imgs: [{
  1367. id: 1,
  1368. img: ''
  1369. }, {
  1370. id: 2,
  1371. img: ''
  1372. }, {
  1373. id: 3,
  1374. img: ''
  1375. }, {
  1376. id: 4,
  1377. img: ''
  1378. }, {
  1379. id: 5,
  1380. img: ''
  1381. }, {
  1382. id: 6,
  1383. img: ''
  1384. }, {
  1385. id: 7,
  1386. img: ''
  1387. }, {
  1388. id: 8,
  1389. img: ''
  1390. }, {
  1391. id: 9,
  1392. img: ''
  1393. }],
  1394. show_video: '',
  1395. post_video: '',
  1396. istop: false
  1397. }
  1398. },
  1399. /**
  1400. * 新增攻略
  1401. */
  1402. add_strategy() {
  1403. this.dialogAddStrategyVisible = true;
  1404. this.resetFormAddDialog();
  1405. },
  1406. /**
  1407. * 打开编辑攻略
  1408. * @param {Object} row
  1409. */
  1410. handleModifyClick(row) {
  1411. //console.log(row);
  1412. this.resetFormModifyDialog();
  1413. this.$set(this.formModifyDialog, 'id', row.id)
  1414. this.$set(this.formModifyDialog, 'title', row.title)
  1415. this.$set(this.formModifyDialog, 'publisher', row.userId)
  1416. this.$set(this.formModifyDialog, 'rtownId', row.townId)
  1417. let strArray = row.hotelId.split(',');
  1418. let numArray = strArray.map(Number);
  1419. this.$set(this.formModifyDialog, 'hotelIds', numArray)
  1420. this.handleModifyAdressStrategy('none');
  1421. this.$set(this.formModifyDialog, 'content', row.content)
  1422. if (typeof row.image !== 'undefined') {
  1423. let imgs = row.image;
  1424. for (let i = 0; i < imgs.length; i++) {
  1425. if (imgs[i] !== '') {
  1426. this.$set(this.formModifyDialog.imgs[i], 'img', imgs[i])
  1427. }
  1428. }
  1429. }
  1430. if (row.isTop == 1) {
  1431. this.$set(this.formModifyDialog, 'istop', true)
  1432. } else {
  1433. this.$set(this.formModifyDialog, 'istop', false)
  1434. }
  1435. if (typeof row.video !== 'undefined') {
  1436. var tmpOption = JSON.parse(JSON.stringify(row.video));
  1437. this.$set(this.formModifyDialog, 'show_video', tmpOption)
  1438. this.$set(this.formModifyDialog, 'post_video', row.video.sources[0].src)
  1439. }
  1440. this.onlyOneFileClass('modify');
  1441. this.dialogModifyVisible = true
  1442. },
  1443. /**
  1444. * 显示删除攻略
  1445. */
  1446. handleDelClick(row) {
  1447. this.delStrategyId = row.id;
  1448. this.dialogDeleteVisible = true;
  1449. },
  1450. /**
  1451. * 删除攻略记录
  1452. */
  1453. dialogDeleteStrategy() {
  1454. var that = this;
  1455. delStrategy(that.delStrategyId).then((res) => {
  1456. // console.log(res);
  1457. if (res.code == 200) {
  1458. that.get_table_data('list');
  1459. that.dialogDeleteVisible = false;
  1460. that.$message.success('攻略删除成功!');
  1461. } else {
  1462. that.$message.error(res.message);
  1463. }
  1464. });
  1465. },
  1466. /**
  1467. * 查询条件
  1468. */
  1469. get_condtion() {
  1470. let data = {
  1471. page: this.pagination.currentPage,
  1472. rows: this.pagination.pageSize
  1473. }
  1474. if (this.formInline.key !== '') {
  1475. data.key = this.formInline.key
  1476. }
  1477. this.cond_data = data;
  1478. },
  1479. /**
  1480. * 搜索
  1481. */
  1482. btn_search() {
  1483. this.get_table_data('search')
  1484. },
  1485. /**
  1486. * currentPage 改变时会触发
  1487. * @param {Object} val
  1488. */
  1489. currentPageChange(val) {
  1490. this.pagination.currentPage = val
  1491. this.get_table_data('pages')
  1492. }
  1493. }
  1494. }
  1495. </script>
  1496. <style lang="scss" scoped>
  1497. .app-container {
  1498. background-color: #EFF2F7;
  1499. padding: 10px;
  1500. .el-row {
  1501. .el-col {
  1502. padding: 10px;
  1503. .cell {
  1504. padding: 30px;
  1505. border-radius: 10px;
  1506. background-color: #FFFFFF;
  1507. box-shadow: 0px 3px 21px 0px rgba(60, 108, 254, 0.16);
  1508. .cell-title {
  1509. display: flex;
  1510. justify-content: space-between;
  1511. align-items: center;
  1512. margin-bottom: 30px;
  1513. padding-bottom: 30px;
  1514. border-bottom: 1px solid #CCCCCC;
  1515. .title-left {
  1516. display: flex;
  1517. align-items: center;
  1518. .title {
  1519. font-size: 22px;
  1520. font-family: Microsoft YaHei-3970(82674968);
  1521. font-weight: bold;
  1522. color: #1A202B;
  1523. }
  1524. .title-detail {
  1525. margin-left: 50px;
  1526. font-size: 18px;
  1527. font-family: Microsoft YaHei-3970(82674968);
  1528. color: #1A202B;
  1529. }
  1530. }
  1531. .title-right {
  1532. display: flex;
  1533. justify-content: space-between;
  1534. align-items: center;
  1535. .el-button {
  1536. width: 110px;
  1537. height: 46px;
  1538. background: #2B4CFE;
  1539. font-size: 18px;
  1540. color: #FFFFFF;
  1541. font-family: Microsoft YaHei-3970(82674968);
  1542. border-radius: 5px;
  1543. }
  1544. .el-button--warning {
  1545. background: #F88A64;
  1546. }
  1547. }
  1548. }
  1549. .cell-body {
  1550. .controls {
  1551. display: flex;
  1552. justify-content: space-between;
  1553. align-items: center;
  1554. .demo-form-inline {
  1555. display: inline-flex;
  1556. flex-wrap: wrap;
  1557. align-items: center;
  1558. justify-content: flex-start;
  1559. .btn-search {
  1560. background: rgba(9, 101, 98, 1);
  1561. font-size: 14px;
  1562. color: #FFFFFF;
  1563. font-family: Microsoft YaHei-3970(82674968);
  1564. border-radius: 5px;
  1565. border: none;
  1566. }
  1567. }
  1568. .export {
  1569. background: rgba(9, 101, 98, 1);
  1570. font-size: 14px;
  1571. color: #FFFFFF;
  1572. font-family: Microsoft YaHei-3970(82674968);
  1573. border-radius: 5px;
  1574. margin-bottom: 22px;
  1575. border: none;
  1576. }
  1577. }
  1578. .pagination-table {
  1579. display: flex;
  1580. justify-content: flex-end;
  1581. align-items: center;
  1582. height: 30px;
  1583. margin-top: 20px;
  1584. .txt-notice {
  1585. span {
  1586. font-size: 28px;
  1587. font-weight: 500;
  1588. font-family: '微软雅黑';
  1589. }
  1590. }
  1591. ::v-deep .el-pagination {
  1592. display: flex;
  1593. justify-content: flex-end;
  1594. align-items: center;
  1595. }
  1596. ::v-deep .el-pagination ul {
  1597. display: flex;
  1598. }
  1599. ::v-deep .el-pagination button,
  1600. ::v-deep .el-pagination li {
  1601. display: flex;
  1602. justify-content: center;
  1603. align-items: center;
  1604. width: 50px;
  1605. height: 36px;
  1606. border: 1px solid #626262;
  1607. border-radius: 3px;
  1608. font-size: 14px;
  1609. margin: 0 5px;
  1610. }
  1611. ::v-deep .el-pagination span {
  1612. margin-left: 10px;
  1613. }
  1614. ::v-deep .el-pagination .el-pagination__jump {
  1615. font-size: 16px;
  1616. }
  1617. ::v-deep .el-pagination .el-pagination__editor {
  1618. width: 50px;
  1619. height: 36px;
  1620. margin: 0 5px;
  1621. }
  1622. ::v-deep .el-pagination .el-input__inner {
  1623. width: 50px;
  1624. height: 36px;
  1625. border: 1px solid #626262;
  1626. margin: -4px 0 0 0;
  1627. }
  1628. }
  1629. }
  1630. }
  1631. }
  1632. }
  1633. ::v-deep .el-dialog {
  1634. margin: 0 !important;
  1635. width: 600px;
  1636. height: 560px;
  1637. background: #FFFFFF;
  1638. box-shadow: 0px 0px 13px 0px rgba(0, 0, 0, 0.29);
  1639. border-radius: 6px;
  1640. position: absolute;
  1641. top: 50%;
  1642. left: 50%;
  1643. transform: translate(-50%, -50%);
  1644. .el-dialog__header {
  1645. display: flex;
  1646. align-items: center;
  1647. width: 100%;
  1648. height: 58px;
  1649. padding: 30px;
  1650. border-radius: 6px 6px 0px 0px;
  1651. font-weight: bold;
  1652. border-bottom: 1px solid rgba(230, 230, 230, 1);
  1653. }
  1654. .el-dialog__body {
  1655. padding-bottom: 0;
  1656. .el-form-item__label,
  1657. .el-form-item__content {
  1658. font-size: 16px;
  1659. font-family: Microsoft YaHei-3970(82674968);
  1660. color: #53575A;
  1661. }
  1662. }
  1663. // 删除对话框的样式
  1664. .del-account-body {
  1665. display: flex;
  1666. flex-direction: column;
  1667. justify-content: center;
  1668. align-items: center;
  1669. height: 180px;
  1670. img {
  1671. width: 72px;
  1672. }
  1673. .del-account-body-txt {
  1674. height: 58px;
  1675. line-height: 58px;
  1676. font-size: 18px;
  1677. font-family: Microsoft YaHei-3970(82674968);
  1678. color: #333333;
  1679. }
  1680. }
  1681. .el-dialog__footer {
  1682. padding-bottom: 0 !important;
  1683. text-align: center;
  1684. .el-button.el-button--default {
  1685. width: 75px;
  1686. height: 40px;
  1687. border: 1px solid #2B4CFE;
  1688. border-radius: 6px;
  1689. font-size: 16px;
  1690. font-family: Microsoft YaHei-3970(82674968);
  1691. color: #2B4CFE;
  1692. }
  1693. .el-button.el-button--primary {
  1694. width: 75px;
  1695. height: 40px;
  1696. background: #2B4CFE;
  1697. border-radius: 6px;
  1698. font-size: 16px;
  1699. font-family: Microsoft YaHei-3970(82674968);
  1700. color: #FFFFFF;
  1701. margin-left: 60px;
  1702. }
  1703. }
  1704. }
  1705. }
  1706. </style>
  1707. <style>
  1708. .perimeter-class {
  1709. width: 900px !important;
  1710. height: 760px !important;
  1711. }
  1712. .el-date-editor--daterange.el-input__inner {
  1713. width: 280px !important;
  1714. }
  1715. .demo-table-expand {
  1716. font-size: 0;
  1717. }
  1718. .demo-table-expand label {
  1719. width: 180px;
  1720. color: #99a9bf;
  1721. }
  1722. .demo-table-expand .el-form-item {
  1723. margin-right: 0;
  1724. margin-bottom: 0;
  1725. width: 33%;
  1726. }
  1727. .show-imgs {
  1728. display: flex;
  1729. }
  1730. .imgs {
  1731. display: flex;
  1732. flex-direction: row;
  1733. margin-left: 20px;
  1734. }
  1735. .lbl-cls {
  1736. display: inline-block;
  1737. width: 100px;
  1738. text-align: right;
  1739. padding-right: 10px;
  1740. color: #bbb;
  1741. }
  1742. .export {
  1743. background: rgba(9, 101, 98, 1) !important;
  1744. font-size: 14px !important;
  1745. color: #FFFFFF !important;
  1746. font-family: Microsoft YaHei-3970(82674968);
  1747. border-radius: 5px !important;
  1748. margin-bottom: 22px !important;
  1749. border: none !important;
  1750. }
  1751. .add-class {
  1752. height: 450px !important;
  1753. width: 800px !important;
  1754. }
  1755. .dialog-footer {
  1756. display: flex;
  1757. justify-content: flex-end;
  1758. }
  1759. .add-info-cancel-btn {
  1760. color: rgba(9, 101, 98, 1) !important;
  1761. border: 1px solid rgba(9, 101, 98, 1) !important;
  1762. }
  1763. .add-info-confirm-btn {
  1764. border: none !important;
  1765. background: rgba(9, 101, 98, 1) !important;
  1766. color: #fff !important;
  1767. border-radius: 5px !important;
  1768. margin-left: 28px !important;
  1769. }
  1770. .el-form-item>label {
  1771. color: rgba(128, 128, 128, 1) !important;
  1772. }
  1773. .custom-input {
  1774. width: 7rem !important;
  1775. }
  1776. .custom-input input {
  1777. width: 7rem !important;
  1778. }
  1779. .el-radio {
  1780. margin-right: 10px;
  1781. }
  1782. .el-form-item {
  1783. margin-bottom: 16px !important;
  1784. }
  1785. .add-dlg-class {
  1786. width: 830px !important;
  1787. height: 850px !important;
  1788. }
  1789. .el-carousel__indicators {
  1790. display: none !important;
  1791. }
  1792. .el-tabs__item {
  1793. width: 100px !important;
  1794. text-align: center !important;
  1795. font-size: 20px !important;
  1796. }
  1797. .el-tabs__item.is-active,
  1798. .el-tabs__item:hover {
  1799. color: rgba(9, 101, 98, 1) !important;
  1800. }
  1801. .el-tabs__active-bar {
  1802. color: rgba(9, 101, 98, 1) !important;
  1803. background-color: rgba(9, 101, 98, 1) !important;
  1804. }
  1805. .el-dialog-delete-account {
  1806. height: 300px !important;
  1807. width: 500px !important;
  1808. }
  1809. .el-dialog-delete-account .el-dialog__header {
  1810. display: none !important;
  1811. }
  1812. .add-user-cancel-btn {
  1813. color: rgba(9, 101, 98, 1) !important;
  1814. border: 1px solid rgba(9, 101, 98, 1) !important;
  1815. }
  1816. .add-user-confirm-btn {
  1817. border: none !important;
  1818. background: rgba(9, 101, 98, 1) !important;
  1819. color: #fff !important;
  1820. border-radius: 5px !important;
  1821. margin-left: 28px !important;
  1822. }
  1823. .ql-container {
  1824. height: 150px;
  1825. }
  1826. .add-strategy-img {
  1827. display: flex;
  1828. justify-content: space-between;
  1829. flex-flow: row wrap;
  1830. }
  1831. .add-strategy-img-box {
  1832. position: relative;
  1833. margin: 0 0 10px 0;
  1834. width: 128px;
  1835. height: 128px;
  1836. border: dashed 1px #096562;
  1837. display: flex;
  1838. flex-direction: column;
  1839. align-items: center;
  1840. justify-content: center;
  1841. border-radius: 5px;
  1842. cursor: pointer;
  1843. }
  1844. .add-strategy-img-box-video {
  1845. position: relative;
  1846. margin: 0 0 10px 0;
  1847. width: 128px;
  1848. height: 128px;
  1849. border: dashed 1px #096562;
  1850. border-radius: 5px;
  1851. cursor: pointer;
  1852. border: 2px dashed #ff4949;
  1853. }
  1854. .add-strategy-img-plus {
  1855. color: #096562;
  1856. font-size: 30px;
  1857. height: 30px;
  1858. line-height: 30px;
  1859. }
  1860. .add-strategy-img-txt {
  1861. color: #096562;
  1862. }
  1863. .add-strategy-img-clear {
  1864. position: absolute;
  1865. top: 5px;
  1866. right: 5px;
  1867. width: 22px;
  1868. height: 22px;
  1869. background: rgba(9, 108, 98, 1.0);
  1870. border-radius: 50%;
  1871. font-size: 22px;
  1872. color: #fff;
  1873. cursor: pointer;
  1874. display: flex;
  1875. justify-content: center;
  1876. align-items: center;
  1877. }
  1878. .scroll-container::-webkit-scrollbar {
  1879. width: 1px;
  1880. /* 根据需要调整滚动条的宽度 */
  1881. }
  1882. .scroll-container::-webkit-scrollbar-track {
  1883. background-color: #ccc;
  1884. /* 设置滚动条轨道的颜色 */
  1885. }
  1886. .scroll-container::-webkit-scrollbar-thumb {
  1887. background-color: rgba(9, 101, 98, 1);
  1888. /* 设置滚动条滑块的颜色 */
  1889. }
  1890. .hotel-box {
  1891. display: flex;
  1892. align-items: center;
  1893. margin: 5px 0;
  1894. padding: 5px;
  1895. cursor: pointer;
  1896. border-radius: 5px;
  1897. border: 1px solid #096562;
  1898. }
  1899. .hotel-box-txt {
  1900. display: flex;
  1901. flex-direction: column;
  1902. justify-content: space-around;
  1903. align-items: flex-start;
  1904. font-size: 16px;
  1905. padding: 10px;
  1906. }
  1907. .hotel-list {
  1908. width: 186px;
  1909. text-align: left;
  1910. line-height: 1.2em;
  1911. }
  1912. .bg-color {
  1913. color: #FFFFFF;
  1914. background-color: #096562;
  1915. }
  1916. .configure-btn-position {
  1917. display: flex;
  1918. justify-content: flex-end;
  1919. }
  1920. .configure-btn {
  1921. border: none !important;
  1922. background: rgba(9, 101, 98, 1) !important;
  1923. color: #fff !important;
  1924. border-radius: 5px !important;
  1925. }
  1926. .action-btns {
  1927. display: flex;
  1928. justify-content: space-around;
  1929. }
  1930. .bg-btn {
  1931. color: rgba(9, 101, 98, 1);
  1932. }
  1933. .add-ms-class {
  1934. width: 400px !important;
  1935. height: 280px !important;
  1936. }
  1937. .add-ms-class .el-input__inner {
  1938. width: 220px !important;
  1939. }
  1940. </style>