scene.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146
  1. <template>
  2. <div class="scene-layout">
  3. <div class="d-header">
  4. <ul class="tab-list" v-if="!deviceLogin">
  5. <li @click="tabActive = item.id" :class="{active:tabActive === item.id}" v-for="(item,i) in tabList" :key="i">
  6. {{item.name}}({{i===0?allTotal:xiezuoNum}})
  7. </li>
  8. </ul>
  9. <ul class="tab-list" v-else>
  10. <li class="active" v-for="(item,i) in [tabList[0]]" :key="i">
  11. {{item.name}}({{allTotal}})
  12. </li>
  13. </ul>
  14. <div class="rig-con">
  15. <div class="btns" v-if="tabActive===1&&!isImgType">
  16. <span class="button" @click="multCop">{{ $t('manage.sceneAdmin.collaborative') }}</span>
  17. <span class="button default" @click="multDel">{{ $t('common.delete') }}</span>
  18. </div>
  19. <div class="main-list">
  20. <i @click="changeType(true)" class="iconfont icon-main_grid" :title="langScenes.pictle" :class="{active:isImgType}"></i>
  21. <i @click="changeType(false)" class="iconfont icon-main_list" :title="langScenes.listtle" :class="{active:!isImgType}"></i>
  22. </div>
  23. </div>
  24. <div class="search-w">
  25. <div class="date-w">
  26. <span class="label">拍摄时间</span>
  27. <vueDate v-model="startTime" placeholder="开始时间" :isDateDisabled="isAfter" :weekdays="weekdays" :months="months"></vueDate>
  28. <span>-</span>
  29. <vueDate v-model="endTime" placeholder="结束时间" :isDateDisabled="isAfter" :weekdays="weekdays" :months="months"></vueDate>
  30. </div>
  31. <div class="tab-search">
  32. <input
  33. v-model="searchKey"
  34. @keyup.enter="gotoSearch(searchKey)"
  35. type="text"
  36. :placeholder="langScenes.placeholder.searchID"
  37. />
  38. <!-- <i class="iconfont icon-sousuo" @click="gotoSearch(searchKey)"></i> -->
  39. </div>
  40. <div class="search-btn" @click="gotoSearch(searchKey)">查询</div>
  41. </div>
  42. </div>
  43. <template v-if="total">
  44. <ul v-if="isImgType" ref="ulMenu">
  45. <template>
  46. <li v-for="(item,index) in myscene.list" :key="index">
  47. <div @click="((item.status === 1||item.status===-2)&&item.payStatus !== -2) && goto(item.webSite)" class="a-tap">
  48. <div class="share-btn" v-if="((item.status === 1||item.status===-2)&&item.payStatus !== -2)" @click.stop="handleShare(item)"></div>
  49. <div class="cooperation" v-if="item.cooperationUserName&&!deviceLogin"><i class="iconfont icon-case_teamwork"></i><span>{{langScenes.user}}: {{item.cooperationUserName}}</span></div>
  50. <div class="card-img" :style="{backgroundImage: `url(${getSceneImg(item)})`}"></div>
  51. <div class="loading-hover" v-if="item.status === 0">
  52. <div class="loading-icon">
  53. <span class="refreshing-loader"></span>
  54. <p>{{langScenes.share.calcule}}</p>
  55. </div>
  56. </div>
  57. <div @click.stop class="loading-hover" v-if="item.payStatus === -2">
  58. <div class="loading-icon" style="width:100%">
  59. <p style="font-weight:bold;" v-html="langScenes.limit.insufficient"></p>
  60. </div>
  61. <p class="huifu" @click.stop="rechargeTip(item)">{{langScenes.limit.recharge}}>></p>
  62. </div>
  63. </div>
  64. <div class="name" >
  65. <div class="title">{{item.sceneName}}</div>
  66. <div class="oper">
  67. <template v-if="tabActive===1">
  68. <div @click="handleMenu(index)">
  69. <span class="spot"></span>
  70. </div>
  71. <ul :style="{minWidth: language==='en'?'150px': '90px'}">
  72. <li v-if="item.status === 1||item.status===-2 && item.payStatus !== -2" @click="gotoEdit(item)">{{langScenes.edit}}</li>
  73. <li @click="handleCooperation(item)" v-if="(item.status === 1||item.status===-2)&&!deviceLogin && item.payStatus !== -2">{{langScenes.fenpei}}</li>
  74. <li v-if="item.status !== 0" @click="del(item)">{{langScenes.delete}}</li>
  75. </ul>
  76. </template>
  77. <template v-if="tabActive===2">
  78. <div
  79. class="b_default"
  80. v-if="item.status === 1||item.status===-2"
  81. @click="gotoEdit(item)">
  82. <span>{{langScenes.edit}}</span>
  83. </div>
  84. </template>
  85. </div>
  86. </div>
  87. <div>
  88. <span>{{langScenes.shooting}}</span>
  89. <span>{{item.createTime}}</span>
  90. </div>
  91. <div>
  92. <span>{{langScenes.id}}</span>
  93. <span>{{!deviceLogin?(item.snCode||item.childName):(cameradetail.snCode||cameradetail.childName)}}</span>
  94. </div>
  95. </li>
  96. </template>
  97. </ul>
  98. <tableList v-else @selection-change="data=>{selectedArr=data}" :header='tabHeader' :showLine='true' :selection='true' :data='myscene.list' class="table-list" >
  99. <div slot-scope="{data}" slot="header">
  100. {{language==='en'?data.en:data.name}}
  101. </div>
  102. <div slot-scope="{data,canclick,type,item}" slot="item" style="width:100%">
  103. <template v-if="canclick">
  104. <span class="edit table-btn" v-if="item.status === 1||item.status===-2 && item.payStatus !== -2" @click="gotoEdit(item)">{{langScenes.edit}}</span>
  105. <span class="edit table-btn" @click="handleCooperation(item)" v-if="(item.status === 1||item.status===-2 && item.payStatus !== -2)&&!deviceLogin&&tabActive===1" >{{ $t('manage.sceneAdmin.collaborative') }}</span>
  106. <span class="edit table-btn" v-if="item.payStatus === -2" @click="rechargeTip(item)">{{langScenes.limit.recharge}}</span>
  107. <span class="edit table-btn delete-btn" v-if="item.status !== 0 && item.status !== 1&&item.status !== -2 || item.payStatus === -2" @click="deleteOneScene(item)">{{ $t('common.delete') }}</span>
  108. </template>
  109. <div style="position:relative;" v-else-if="type === 'image'" >
  110. <div :title="item.name" @click="((item.status === 1||item.status===-2)&&item.payStatus !== -2) && goto(item.webSite)" style="height:40px;" class="card-img" :style="{backgroundImage: `url(${getSceneImg(item)})`, cursor: item.status !== 1 && item.status!==-2 ? 'initial' : 'pointer'}"></div>
  111. <div class="loading-hover" v-if="item.status === 0 || item.payStatus === -2">
  112. <div class="loading-icon" style="width:100%">
  113. <p style="margin-top:0;font-size:12px;">{{item.payStatus === -2 ? $t('manage.sceneAdmin.archived') : langScenes.share.calcule}}</p>
  114. </div>
  115. </div>
  116. </div>
  117. <span v-else-if="type === 'typefix'">{{ langScenes.typeObj[data] }}</span>
  118. <span v-else>{{data||'-'}}</span>
  119. </div>
  120. </tableList>
  121. </template>
  122. <div class="scene-nothing" v-else>
  123. <img :src="`${$cdn}images/nothing.png`" />
  124. <div>{{langScenes.noScenes}}</div>
  125. </div>
  126. <div class="paging" v-if="total">
  127. <Paging @clickHandle="pageChange" :current="currentPage" :total="total" :equable="pageSize" />
  128. </div>
  129. <div class="share-hover" v-show="showShare">
  130. <div class="share-con">
  131. <div class="t-header">
  132. <span>{{langScenes.share.share}}</span>
  133. <i @click="showShare = false" class="iconfont icon-cuowu"></i>
  134. </div>
  135. <div class="t-con">
  136. <p class="t-label">{{langScenes.share.website}}</p>
  137. <input type="text" v-model="url">
  138. <div class="copy-con">
  139. <div class="btn-copy" @click="copyTextToClipboard(url)" >{{langScenes.share.copy1}}</div>
  140. <div class="btn-copy" @click="copyTextToClipboard(num)" >{{langScenes.share.copy2}}</div>
  141. </div>
  142. <div class="t-label">{{langScenes.share.shareto}}</div>
  143. <div class="img-share" v-for="(item,i) in imgs" :key="i">
  144. <div v-if="item.id === 0" class="trangle"></div>
  145. <img v-if="item.id === 0 && num" class="qrcode" :src="`/sceneQRcode/${num}.png?rnd=${rnd}`" alt="">
  146. <img class="share-logo" :src="item.img" @click="toShare(item)" :alt="langScenes.share.share">
  147. </div>
  148. <p class="t-label">{{langScenes.share.qianru}}</p>
  149. <p class="sub-title">{{langScenes.share.size}}</p>
  150. <div class="window-con">
  151. {{langScenes.share.width}}<input type="text" style="margin-right:10px;" v-model="lwidth" oninput="value=Math.max(Math.min(Number(value.replace(/[^\d]/g,'')),10000),1)">
  152. {{langScenes.share.height}}<input type="text" v-model="lheight" oninput="value=Math.max(Math.min(Number(value.replace(/[^\d]/g,'')),10000),1)">
  153. </div>
  154. <p class="p-sub">{{langScenes.share.defaultSize}}</p>
  155. <!-- <div class="produce-btn">{{`&lt;/&gt; 生成嵌入式代码`}}</div> -->
  156. <div class="code-con" >
  157. <div>{{'&lt;iframe'}}</div>
  158. <p>width=</p>
  159. <div>"{{lwidth}}"</div>
  160. <p>height=</p>
  161. <div>"{{lheight}}"</div>
  162. <p>src=</p>
  163. <div>"{{url}}"</div>
  164. <p>allowfullscreen="true" frameborder=</p>
  165. <div>"0"</div>
  166. <div>{{'&gt;&lt;/iframe>'}}</div>
  167. </div>
  168. <div class="btn-copy" @click="copyTextToClipboard(htmlCode)" style="margin-bottom:6px;">{{langScenes.share.copy}}</div>
  169. <div class="btm-dec">{{langScenes.share.sub}}<br/>{{langScenes.share.sub2}}</div>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. </template>
  175. <script>
  176. import { mapState } from 'vuex'
  177. import tableList from '@/components/table'
  178. import {scene} from './iscene'
  179. import Paging from '@/components/Paging'
  180. import vueDate from '@/components/common/vueDate/vueDatePick'
  181. export default {
  182. components: { Paging, tableList, vueDate },
  183. data () {
  184. let imgs = [
  185. {
  186. img: this.$cdn + 'images/s-wechat.png',
  187. id: 0
  188. },
  189. {
  190. img: this.$cdn + 'images/s-weibo.png',
  191. id: 1
  192. },
  193. {
  194. img: this.$cdn + 'images/s-qq.png',
  195. id: 2
  196. }
  197. ]
  198. let isImgType = localStorage.getItem('isImgType') === '' ? true : (localStorage.getItem('isImgType') === 'true')
  199. return {
  200. tabHeader: scene,
  201. xiezuoNum: 0,
  202. pageSize: 12,
  203. lock: false,
  204. currentPage: 1,
  205. searchKey: '',
  206. selectedArr: [],
  207. total: 0,
  208. allTotal: 0,
  209. showShare: false,
  210. imgs,
  211. num: '',
  212. rnd: Math.random(),
  213. isImgType: isImgType,
  214. lwidth: 853,
  215. lheight: 480,
  216. url: 'https://www.4dkankan.com/showProPC.html?m=KcMeJlOr8',
  217. item: '',
  218. ulActive: '',
  219. tabActive: 1,
  220. tabList: [
  221. {
  222. name: this.$t('manage.sceneAdmin.myScene'),
  223. id: 1
  224. }, {
  225. name: this.$t('manage.sceneAdmin.collaborativeScene'),
  226. id: 2
  227. }
  228. ],
  229. startTime: '',
  230. endTime: '',
  231. weekdays: ['一', '二', '三', '四', '五', '六', '日'],
  232. months: ['1月', '2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
  233. }
  234. },
  235. watch: {
  236. currentPage () {
  237. this.getList()
  238. },
  239. '$route.query.cameraid': {
  240. immediate: true,
  241. handler: function (newVal) {
  242. if (newVal) {
  243. this.searchKey = newVal
  244. this.getList(newVal)
  245. }
  246. }
  247. },
  248. tabActive (newVal) {
  249. this.currentPage === 1 ? this.getList() : this.currentPage = 1
  250. }
  251. },
  252. computed: {
  253. ...mapState({
  254. token: state => state.user.token,
  255. language: state => state.language.current,
  256. langScenes: state => state.language.home.manage.myScenes,
  257. langToast: state => state.language.home.toast,
  258. deviceLogin: state => state.user.deviceLogin,
  259. cameradetail: state => {
  260. let type = Object.prototype.toString.call(state.user.cameradetail)
  261. if (type === '[object Object]') {
  262. return state.user.cameradetail
  263. }
  264. let condition =
  265. state.user.cameradetail &&
  266. state.user.cameradetail !== 'null' &&
  267. type !== '[object Array]'
  268. return condition ? JSON.parse(state.user.cameradetail) : ''
  269. },
  270. myscene: state => {
  271. let type = Object.prototype.toString.call(state.user.myscene)
  272. if (type === '[object Object]') {
  273. return state.user.myscene
  274. }
  275. let condition =
  276. state.user.myscene &&
  277. state.user.myscene !== 'null' &&
  278. type !== '[object Array]'
  279. return condition ? JSON.parse(state.user.myscene) : {}
  280. }
  281. }),
  282. htmlCode () {
  283. return `<iframe src="${this.url}" width="${this.lwidth}" height="${this.lheight}" allowfullscreen="true" frameborder="0"></iframe>`
  284. }
  285. },
  286. mounted () {
  287. document.addEventListener('click', (e) => {
  288. if (this.$refs.ulMenu) {
  289. if (!this.$refs.ulMenu.contains(e.target)) {
  290. this.ulActive = ''
  291. }
  292. }
  293. })
  294. if (this.deviceLogin) {
  295. this.$bus.$off('mycid')
  296. this.$bus.$on('mycid', item => {
  297. setTimeout(() => {
  298. this.getList()
  299. })
  300. })
  301. } else {
  302. this.getCooTotal()
  303. this.getList()
  304. }
  305. },
  306. methods: {
  307. changeType (status) {
  308. this.isImgType = status
  309. localStorage.setItem('isImgType', status)
  310. },
  311. checkSelect () {
  312. let pass = this.selectedArr.length <= 0
  313. if (pass) {
  314. return this.$toast.show('warn', `${this.language === 'en' ? 'Please select at least one.' : '请至少勾选一项'}`)
  315. }
  316. return true
  317. },
  318. multCop () {
  319. if (this.checkSelect()) {
  320. let nums = this.selectedArr.map(item => {
  321. return item.num
  322. })
  323. this.$toast.showCooperation({
  324. ids: nums.join(','),
  325. type: 'scene'
  326. }, () => {
  327. this.getList()
  328. })
  329. }
  330. },
  331. multDel () {
  332. if (this.checkSelect()) {
  333. let nums = this.selectedArr.map(item => {
  334. return item.num
  335. })
  336. this.del(nums.join(','), true)
  337. }
  338. },
  339. deleteOneScene (row) {
  340. this.del(row.num, true)
  341. },
  342. async handleCooperation (item) {
  343. this.$toast.showCooperation({
  344. num: item.num,
  345. cooName: item.cooperationUserName,
  346. type: 'scene',
  347. getListData: {
  348. cameraId: item.cameraId
  349. }
  350. }, () => {
  351. this.getList()
  352. })
  353. },
  354. handleMenu (index) {
  355. this.ulActive = index === this.ulActive ? '' : index
  356. },
  357. rechargeTip (item) {
  358. this.$toast.showConfirm('warn', this.langToast['28'], () => {
  359. let routeData = this.$router.resolve({name: 'introduce', params: {id: item.childName}})
  360. window.open(routeData.href, '_blank')
  361. }, '', this.langScenes.limit.expand)
  362. },
  363. recharge (item) {
  364. },
  365. toShare (item) {
  366. var n, t, i, r, u, f, sceneName
  367. n = screen
  368. t = document
  369. i = encodeURIComponent
  370. u = t.location.href
  371. sceneName = `${this.item.sceneName} 三维场景漫游 #由四维看看Pro拍摄#`
  372. if (item.id === 1) {
  373. r = 'http://v.t.sina.com.cn/share/share.php?'
  374. f = ['url=', i(this.url), '&title=', i(sceneName)].join('')
  375. } else if (item.id === 2) {
  376. // http:// connect.qq.com/widget/shareqq/index.html?url=;title=
  377. r = 'http://connect.qq.com/widget/shareqq/index.html?'
  378. f = ['url=',
  379. i(this.url),
  380. '&title=',
  381. i(sceneName)
  382. ].join('')
  383. } else {
  384. return
  385. }
  386. window.open([r, f].join(''), '', ['toolbar=0,status=0,resizable=1,width=620,height=450,left=', ((n.width) / 2) - 310, ',top=', ((n.height) / 2) - 225].join('')) || (u.href = [r, f].join(''))
  387. },
  388. handleShare (item) {
  389. this.url = item.webSite.replace('http://', 'https://')
  390. this.num = item.num
  391. this.rnd = Math.random()
  392. this.item = item
  393. this.showShare = true
  394. },
  395. goto (url) {
  396. let temp = url.replace('show.html', 'showPC.html')
  397. window.open(temp.replace('http://', 'https://') + (this.language === 'en' ? '&lang=en' : ''), '_blank')
  398. },
  399. getSceneImg (item) {
  400. switch (item.status) {
  401. case -1:
  402. let to = this.language === 'en' ? this.$cdn + 'images/scene_error-en.png' : this.$cdn + 'images/scene_error.png'
  403. return to
  404. default:
  405. return item.thumb + '?v=' + item.version + '?rnd=' + this.rnd
  406. }
  407. },
  408. gotoEdit (item) {
  409. let url = item.webSite
  410. let page = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.html'))
  411. let pStr = 'edit'
  412. if (item.buildType) {
  413. switch (item.buildType.toLowerCase()) {
  414. case 'v1':
  415. pStr = 'edit'
  416. break
  417. case 'v2':
  418. pStr = 'editProPC'
  419. break
  420. case 'v3':
  421. pStr = 'epc'
  422. break
  423. default:
  424. pStr = 'edit'
  425. break
  426. }
  427. }
  428. url = pStr ? url.replace(page, pStr) : url
  429. window.open(url.replace('http://', 'https://') + (this.language === 'en' ? '&lang=en' : ''), '_blank')
  430. },
  431. async del (item, multi = false) {
  432. this.$toast.showConfirm('warn', this.langScenes.delwarn, async () => {
  433. let params = {
  434. sceneNum: multi ? item : item.num
  435. }
  436. let res = await this.$http({
  437. method: 'post',
  438. data: params,
  439. headers: {
  440. token: this.token
  441. },
  442. url: '/user/scene/delete'
  443. })
  444. let data = res.data
  445. if (data.code === 0) {
  446. return this.$toast.show('warn', this.langScenes.share.delsuccess, () => {
  447. this.getList()
  448. })
  449. }
  450. return this.$toast.show('error', `${this.langScenes.share.delfail}${this.langToast[data.code]}`)
  451. })
  452. },
  453. pageChange (data) {
  454. this.currentPage = data
  455. },
  456. gotoSearch (searchKey) {
  457. if (this.currentPage > 1) {
  458. this.currentPage = 1
  459. } else {
  460. this.getList(searchKey)
  461. }
  462. },
  463. async getCooTotal () {
  464. let res = await this.$http({
  465. method: 'post',
  466. data: {
  467. pageNum: this.currentPage,
  468. pageSize: this.pageSize,
  469. cameraId: null,
  470. searchKey: this.searchKey,
  471. cameraType: null
  472. },
  473. headers: {
  474. token: this.token
  475. },
  476. url: '/user/scene/cooperation/cooperationSceneList'
  477. })
  478. this.xiezuoNum = res.data.data.total
  479. },
  480. async getList (searchKey = null) {
  481. this.searchKey = searchKey || this.searchKey
  482. let { id: cameraId = null, type: cameraType = null } = this.cameradetail
  483. window.scrollTo(0, 0)
  484. let params = {
  485. pageNum: this.currentPage,
  486. pageSize: this.pageSize,
  487. cameraId,
  488. searchKey: this.searchKey.trim(),
  489. cameraType
  490. }
  491. if (this.tabActive === 2) {
  492. await this.$store.dispatch('getCooperationScene', params)
  493. } else {
  494. cameraId
  495. ? await this.$store.dispatch('getScanScene', params)
  496. : await this.$store.dispatch('getUserScene', params)
  497. }
  498. this.pageSize = this.myscene.pageSize
  499. this.total = this.myscene.total || 0
  500. if (this.tabActive === 1) {
  501. this.lock = true
  502. this.allTotal = this.total
  503. } else {
  504. this.xiezuoNum = this.total
  505. }
  506. },
  507. copyTextToClipboard (text) {
  508. var textArea = document.createElement('textarea')
  509. textArea.style.position = 'fixed'
  510. textArea.style.top = 0
  511. textArea.style.left = 0
  512. textArea.style.width = '2em'
  513. textArea.style.height = '2em'
  514. textArea.style.padding = 0
  515. textArea.style.border = 'none'
  516. textArea.style.outline = 'none'
  517. textArea.style.boxShadow = 'none'
  518. textArea.style.background = 'transparent'
  519. textArea.value = text
  520. document.body.appendChild(textArea)
  521. textArea.select()
  522. try {
  523. document.execCommand('copy') ? this.$toast.show('success', this.langScenes.share.copysuccess) : this.$toast.show('warn', this.langScenes.share.copyfail)
  524. } catch (err) {
  525. this.$toast.show('error', this.langScenes.share.copyfail)
  526. }
  527. document.body.removeChild(textArea)
  528. }
  529. }
  530. }
  531. </script>
  532. <style lang="scss" scoped>
  533. $theme-color: #1fe4dc;
  534. $font-color: #2d2d2d;
  535. .huifu{
  536. position: absolute;
  537. bottom: 10px;
  538. right: 10px;
  539. color: #1fe4dc;
  540. display: inline-block;
  541. border-bottom: 1px solid #1fe4dc;
  542. padding-bottom: 2px;
  543. cursor: pointer;
  544. }
  545. .scene-layout {
  546. width: 100%;
  547. margin-top: 30px;
  548. .d-header{
  549. margin-left: 40px;
  550. height: 30px;
  551. .tab-list{
  552. display: inline-block;
  553. li{
  554. display: inline-block;
  555. margin-right: 40px;
  556. cursor: pointer;
  557. font-size: 14px;
  558. line-height: 1.5;
  559. }
  560. .active{
  561. color: $theme-color;
  562. border-bottom: 1px solid $theme-color;
  563. }
  564. }
  565. .rig-con{
  566. margin-right: 40px;
  567. float: right;
  568. display: flex;
  569. align-items: center;
  570. .btns{
  571. margin-right: 20px;
  572. .button{
  573. line-height: 30px;
  574. height: 30px;
  575. min-width: 80px;
  576. padding: 0 10px;
  577. text-align: center;
  578. vertical-align: middle;
  579. font-size: 14px;
  580. color: #202020;
  581. cursor: pointer;
  582. }
  583. .default{
  584. background: #E4E4E4;
  585. margin-left: 10px;
  586. }
  587. }
  588. .main-list{
  589. display: inline-block;
  590. margin-left: 20px;
  591. .iconfont{
  592. cursor: pointer;
  593. font-size: 20px;
  594. margin-left: 5px;
  595. }
  596. .active{
  597. color: #1fe4dc;
  598. }
  599. }
  600. }
  601. .search-w {
  602. position: absolute;
  603. top: 0;
  604. right: 40px;
  605. top: 38px;
  606. display: flex;
  607. font-size: 12px;
  608. }
  609. .tab-search{
  610. position: relative;
  611. width: 230px;
  612. border: 1px solid #ccc;
  613. display: flex;
  614. .iconfont{
  615. width: 28px;
  616. height: 28px;
  617. padding: 6px;
  618. cursor: pointer;
  619. background: #e4e4e4;
  620. }
  621. input{
  622. width: 100%;
  623. font-size: 14px;
  624. appearance: none;
  625. padding-left: 10px;
  626. line-height: 28px;
  627. height: 28px;
  628. border: 0;
  629. }
  630. }
  631. }
  632. > ul {
  633. padding: 30px 0 0 40px;
  634. > li {
  635. width: 270px;
  636. display: inline-block;
  637. position: relative;
  638. margin-right: 25px;
  639. margin-bottom: 35px;
  640. color: #a0a0a0;
  641. max-width: 330px;
  642. font-size: 14px;
  643. .a-tap {
  644. cursor: pointer;
  645. width: 100%;
  646. height: 160px;
  647. display: inline-block;
  648. position: relative;
  649. img {
  650. width: 100%;
  651. height: 100%;
  652. }
  653. }
  654. .card-img {
  655. width: 100%;
  656. height: 100%;
  657. cursor: pointer;
  658. background-position: center;
  659. background-size: auto 100%;
  660. background-repeat: no-repeat;
  661. }
  662. .share-btn {
  663. position: absolute;
  664. right: 10px;
  665. top: 10px;
  666. width: 35px;
  667. height: 35px;
  668. background-image: url(https://4dscene.4dage.com/new4dkk/images/share-btn.png);
  669. background-color: rgba(0, 0, 0, 0.3);
  670. background-position: center;
  671. background-repeat: no-repeat;
  672. background-size: cover;
  673. border-radius: 50%;
  674. }
  675. .cooperation{
  676. background:rgba(0,0,0,0.5);
  677. position: absolute;
  678. bottom: 0;
  679. width: 100%;
  680. height: 30px;
  681. text-align: center;
  682. line-height: 30px;
  683. color: #FFFFFF;
  684. >span{
  685. display: inline-block;
  686. margin-left: 6px;
  687. }
  688. }
  689. .name {
  690. display: flex;
  691. justify-content: space-between;
  692. align-items: center;
  693. line-height: 22px;
  694. margin-top: 8px;
  695. .title {
  696. font-weight: bold;
  697. overflow: hidden;
  698. text-overflow: ellipsis;
  699. white-space: nowrap;
  700. color: #000;
  701. flex: 1;
  702. }
  703. .oper {
  704. flex: 1;
  705. text-align: right;
  706. cursor: pointer;
  707. position: relative;
  708. &:hover{
  709. >ul{
  710. display: block;
  711. }
  712. }
  713. >div {
  714. display: inline-block;
  715. width: 20%;
  716. .spot{
  717. width: 4px;
  718. height: 4px;
  719. display: inline-block;
  720. background-color: #202020;
  721. border-radius: 50%;
  722. position: relative;
  723. margin-right: 10px;
  724. &::after,&::before{
  725. content: '';
  726. position: absolute;
  727. width: 4px;
  728. height: 4px;
  729. display: inline-block;
  730. background-color: #202020;
  731. border-radius: 50%;
  732. left: -8px;
  733. top: 50%;
  734. transform: translateY(-50%);
  735. }
  736. &::before{
  737. right: -8px;
  738. left: unset;
  739. }
  740. }
  741. }
  742. >ul{
  743. display: none;
  744. position: absolute;
  745. top: 22px;
  746. z-index: 9;
  747. left: 58%;
  748. background: #F7F7F7;
  749. min-width: 90px;
  750. box-shadow:0px 1px 6px rgba(0,0,0,0.16);
  751. >li{
  752. text-align: left;
  753. width: 100%;
  754. line-height: 2.5;
  755. padding: 0 10px;
  756. color: #202020;
  757. &:hover{
  758. background-color: #EBEBEB;
  759. }
  760. }
  761. }
  762. .b_default{
  763. display: inline-block;
  764. background: #fff;
  765. color: #000;
  766. border: 1px solid #777;
  767. border-radius: 2px;
  768. font-size: 12px;
  769. width: 52px;
  770. height: 22px;
  771. line-height: 22px;
  772. text-align: center;
  773. vertical-align: middle;
  774. margin-left: 4px;
  775. -webkit-box-sizing: border-box;
  776. box-sizing: border-box;
  777. cursor: pointer;
  778. position: relative;
  779. >span{
  780. position: absolute;
  781. top: 50%;
  782. left: 50%;
  783. -webkit-transform: translate(-50%,-50%);
  784. transform: translate(-50%,-50%);
  785. width: 100%;
  786. }
  787. }
  788. }
  789. }
  790. }
  791. }
  792. .table-list{
  793. width: calc(100% - 80px);
  794. margin: 30px auto;
  795. font-size: 14px;
  796. .card-img {
  797. width: 100%;
  798. height: 100%;
  799. cursor: pointer;
  800. background-position: center;
  801. background-size: auto 100%;
  802. background-repeat: no-repeat;
  803. }
  804. .table-btn {
  805. display: inline-block;
  806. &:hover {
  807. text-decoration: underline;
  808. }
  809. }
  810. .delete-btn {
  811. color: #f56c6c;
  812. }
  813. }
  814. .scene-nothing {
  815. // width: 75%;
  816. padding: 42px 0 210px 0;
  817. text-align: center;
  818. img {
  819. padding-bottom: 22px;
  820. }
  821. div {
  822. font-size: 16px;
  823. color: #969696;
  824. }
  825. }
  826. .paging {
  827. // border-left: #e5e5e5 1px solid;
  828. height: 100%;
  829. margin-bottom: 40px;
  830. & /deep/ .layout {
  831. text-align: left;
  832. margin-top: 0;
  833. margin-left: 30px;
  834. }
  835. & /deep/ .layout a:not(:last-child) {
  836. margin: 10px 8px;
  837. font-size: 16px;
  838. display: inline-block;
  839. font-weight: 500;
  840. cursor: pointer;
  841. user-select: none;
  842. color: #999;
  843. position: relative;
  844. transition: color 0.3s;
  845. }
  846. & /deep/ .layout a:last-child {
  847. position: relative;
  848. top: -5px;
  849. display: -ms-inline-flexbox;
  850. display: inline-flex;
  851. -ms-flex-align: center;
  852. align-items: center;
  853. height: 22px;
  854. padding: 0 9.6px;
  855. padding: 0 0.6rem;
  856. }
  857. & /deep/ .layout a:last-child::before,
  858. & /deep/ .layout a:last-child::after {
  859. content: "";
  860. display: inline-block;
  861. will-change: transform;
  862. transition: transform 0.3s;
  863. }
  864. & /deep/ .layout a:not(:last-child).active::after,
  865. & /deep/ .layout a:not(:last-child).active,
  866. & /deep/ .layout a:not(:last-child):hover,
  867. & /deep/ .layout a:not(:last-child):hover::after {
  868. color: #111111;
  869. transform: scaleX(1);
  870. }
  871. & /deep/ .layout a:not(:last-child)::after {
  872. content: "";
  873. height: 3px;
  874. width: 140%;
  875. background-color: #111;
  876. display: block;
  877. margin-left: -20%;
  878. margin-top: 3px;
  879. transform-origin: 50% 50%;
  880. transform: scaleX(0);
  881. will-change: transform;
  882. transition: transform 0.3s;
  883. }
  884. }
  885. .share-hover {
  886. position: fixed;
  887. top: 0;
  888. left: 0;
  889. width: 100%;
  890. height: 100%;
  891. margin: 0;
  892. z-index: 88888888;
  893. transition: all 0.2s linear;
  894. background: rgba(0, 0, 0, 0.3);
  895. .share-con {
  896. position: absolute;
  897. top: 50%;
  898. left: 50%;
  899. width: 515px;
  900. transform: translate(-50%, -50%);
  901. background: #fff;
  902. border-radius: 6px;
  903. box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  904. overflow: hidden;
  905. line-height: 1;
  906. .t-header {
  907. display: flex;
  908. justify-content: space-between;
  909. align-items: center;
  910. color: #969696;
  911. height: 54px;
  912. padding: 0 30px;
  913. .iconfont{
  914. cursor: pointer;
  915. }
  916. }
  917. .t-con{
  918. padding: 30px;
  919. background: #e7e7e7;
  920. .t-label{
  921. font-size: 16px;
  922. color: #2d2d2d;
  923. font-weight: bold;
  924. }
  925. .img-share{
  926. display: inline-block;
  927. margin: 14px 16px 24px 4px;
  928. position: relative;
  929. .trangle{
  930. position: absolute;
  931. display: none;
  932. top: 44px;
  933. left: 14px;
  934. width: 0;
  935. height: 0;
  936. border: 10px solid transparent;
  937. border-bottom-color: #fff;
  938. z-index: 99;
  939. }
  940. .qrcode{
  941. position: absolute;
  942. display: none;
  943. top: 63px;
  944. left: -36px;
  945. width: 120px;
  946. box-shadow: 0 8px 10px rgba(0, 0, 0, 0.3);
  947. }
  948. &:hover{
  949. .qrcode,.trangle{
  950. display: inline-block;
  951. }
  952. }
  953. }
  954. .share-logo{
  955. cursor: pointer;
  956. }
  957. input{
  958. width: 100%;
  959. border: 0;
  960. line-height: 48px;
  961. height: 48px;
  962. padding: 0 20px;
  963. margin: 14px 0 10px;
  964. }
  965. .window-con{
  966. display: inline-block;
  967. input{
  968. width: 60px;
  969. border-radius: 4px;
  970. padding: 0;
  971. margin: 0;
  972. text-align: center;
  973. line-height: 32px;
  974. height: 32px;
  975. }
  976. }
  977. .copy-con{
  978. display: flex;
  979. justify-content: space-between;
  980. align-items: center;
  981. .btn-copy{
  982. width: 49%;
  983. }
  984. }
  985. .btn-copy{
  986. text-align: center;
  987. background: #ddd;
  988. font-size: 14px;
  989. color: #2d2d2d;
  990. line-height: 26px;
  991. height: 26px;
  992. margin-bottom: 24px;
  993. cursor: pointer;
  994. font-weight: bold;
  995. &:hover{
  996. background: #c8c8c8;
  997. }
  998. }
  999. .sub-title{
  1000. color: #2d2d2d;
  1001. font-size: 16px;
  1002. margin: 14px 0 10px;
  1003. }
  1004. .p-sub{
  1005. font-size: 14px;
  1006. margin: 14px 0 10px;
  1007. }
  1008. .produce-btn{
  1009. text-align: center;
  1010. height: 48px;
  1011. line-height: 48px;
  1012. background: #5e5e5e;
  1013. border-radius: 4px;
  1014. color: #fff;
  1015. }
  1016. .code-con{
  1017. height: 50px;
  1018. width: 100%;
  1019. line-height: 1.5;
  1020. overflow: auto;
  1021. word-break: break-all;
  1022. margin: 10px 0;
  1023. cursor: pointer;
  1024. position: relative;
  1025. div,p{
  1026. word-break: break-all;
  1027. display: inline-block;
  1028. }
  1029. div{
  1030. color: #b35e14;
  1031. }
  1032. }
  1033. .btm-dec{
  1034. font-size: 14px;
  1035. line-height: 1.5;
  1036. letter-spacing: -0.5px;
  1037. }
  1038. }
  1039. }
  1040. }
  1041. }
  1042. @media screen and (min-width: 2000px) {
  1043. .scene-layout {
  1044. width: 75%;
  1045. }
  1046. }
  1047. @media screen and (max-width: 1400px){
  1048. .scene-layout {
  1049. width: 100%;
  1050. > ul {
  1051. > li {
  1052. width: 265px;
  1053. margin-right: 35px;
  1054. .a-tap {
  1055. height: 142px;
  1056. }
  1057. }
  1058. }
  1059. }
  1060. }
  1061. @media screen and (max-width: 1300px) {
  1062. .scene-layout {
  1063. width: 100%;
  1064. > ul {
  1065. > li {
  1066. width: 240px;
  1067. margin-right: 10px;
  1068. .a-tap {
  1069. height: 142px;
  1070. }
  1071. }
  1072. }
  1073. }
  1074. }
  1075. </style>
  1076. <style lang="less">
  1077. .scene-layout {
  1078. .search-w {
  1079. input {
  1080. line-height: 28px;
  1081. border: 1px solid #ccc;
  1082. }
  1083. .date-w {
  1084. margin-right: 20px;
  1085. .label {
  1086. margin-right: 10px;
  1087. font-size: 14px;
  1088. }
  1089. }
  1090. .vdpWithInput {
  1091. input {
  1092. width: 140px;
  1093. padding: 0 10px;
  1094. }
  1095. }
  1096. .search-btn {
  1097. padding: 0 20px;
  1098. line-height: 28px;
  1099. background: #1fe4dc;
  1100. margin-left: 20px;
  1101. cursor: pointer;
  1102. // font-weight: bold;
  1103. }
  1104. }
  1105. }
  1106. </style>