appManagement.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  1. <template>
  2. <div class="appManagement">
  3. <div class="ac_left">
  4. <!-- <recentUseCard/>
  5. <collectCard/> -->
  6. <saveCard title="最近使用" :data="recentUse"/>
  7. <saveCard title="收藏" :data="collect"/>
  8. </div>
  9. <div class="ac_right">
  10. <div class="ac_header">
  11. <div class="ac_h_top">
  12. <span>应用管理</span>
  13. <!-- <span class="ac_h_t_active">应用管理</span>
  14. <span @click="changeShowPage(1)">工作空间</span> -->
  15. <el-button
  16. type="primary"
  17. size="small"
  18. icon="el-icon-plus"
  19. style="position: absolute;right: 15px;"
  20. @click="addApp"
  21. >添加应用</el-button
  22. >
  23. </div>
  24. <!-- <div class="ac_h_banner">
  25. <img src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2Fae42534d-ee90-4bb1-8ef9-d344ee27b8241733733277828.jpg" alt="banner图">
  26. </div> -->
  27. <div class="ac_h_bottom">
  28. <div class="ac_h_b_typeList">
  29. <span
  30. :class="{ ac_h_b_typeList_active: showType === '' }"
  31. @click="changeType('')"
  32. >全部</span
  33. >
  34. <span
  35. v-for="item in typeList"
  36. :key="item.id"
  37. :class="{ ac_h_b_typeList_active: showType === item.id }"
  38. @click="changeType(item.id)"
  39. >{{ item.name }}</span
  40. >
  41. </div>
  42. <div class="ac_h_b_selectList">
  43. <el-input
  44. v-model="searchText"
  45. style="width: 200px;margin-right: 10px;"
  46. placeholder="请输入应用名称"
  47. @keyup.enter.native="getData"
  48. />
  49. <el-select
  50. v-model="selectJuri"
  51. placeholder="请选择"
  52. @change="changeSelectType"
  53. >
  54. <el-option
  55. v-for="item in selectList"
  56. :key="item.index"
  57. :label="item.label"
  58. :value="item.index"
  59. ></el-option>
  60. </el-select>
  61. <el-button
  62. type="primary"
  63. style="margin-left: 10px;"
  64. icon="el-icon-search"
  65. @click="getData"
  66. ></el-button>
  67. <el-button type="primary" @click="resetData">重置</el-button>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="ac_content">
  72. <div
  73. class="ac_c_item"
  74. v-for="(item, index) in dataList"
  75. :key="item.id"
  76. @click="openApp(item)"
  77. >
  78. <div class="ac_c_i_top">
  79. <div class="ac_c_i_t_left">
  80. <svg
  81. v-if="isImageOrSvg(typeof item.json =='object'?item.json.icon:'') === 0"
  82. t="1732605901531"
  83. class="icon"
  84. viewBox="0 0 1024 1024"
  85. version="1.1"
  86. xmlns="http://www.w3.org/2000/svg"
  87. p-id="4275"
  88. width="200"
  89. height="200"
  90. >
  91. <path
  92. d="M179.2 153.6a51.2 51.2 0 0 0-51.2 51.2v128a51.2 51.2 0 0 0 51.2 51.2h128a51.2 51.2 0 0 0 51.2-51.2V204.8a51.2 51.2 0 0 0-51.2-51.2H179.2z m0-102.4h128a153.6 153.6 0 0 1 153.6 153.6v128a153.6 153.6 0 0 1-153.6 153.6H179.2a153.6 153.6 0 0 1-153.6-153.6V204.8a153.6 153.6 0 0 1 153.6-153.6z m0 614.4a51.2 51.2 0 0 0-51.2 51.2v128a51.2 51.2 0 0 0 51.2 51.2h128a51.2 51.2 0 0 0 51.2-51.2V716.8a51.2 51.2 0 0 0-51.2-51.2H179.2z m0-102.4h128a153.6 153.6 0 0 1 153.6 153.6v128a153.6 153.6 0 0 1-153.6 153.6H179.2a153.6 153.6 0 0 1-153.6-153.6V716.8a153.6 153.6 0 0 1 153.6-153.6z m611.84-403.4048a51.2 51.2 0 0 0-72.3968 0L646.144 232.2432a51.2 51.2 0 0 0 0 72.3968l72.448 72.3968a51.2 51.2 0 0 0 72.3968 0l72.3968-72.3968a51.2 51.2 0 0 0 0-72.3968L791.04 159.744z m72.3968-72.3968l72.3968 72.3968a153.6 153.6 0 0 1 0 217.2416l-72.3968 72.3968a153.6 153.6 0 0 1-217.2416 0l-72.3968-72.3968a153.6 153.6 0 0 1 0-217.2416l72.3968-72.3968a153.6 153.6 0 0 1 217.2416 0zM699.7504 896a51.2 51.2 0 0 1 0 102.4A162.1504 162.1504 0 0 1 537.6 836.2496v-110.8992A162.1504 162.1504 0 0 1 699.7504 563.2h110.8992a162.1504 162.1504 0 0 1 162.1504 162.1504v8.448a51.2 51.2 0 0 1-102.4 0v-8.448c0-33.024-26.7264-59.7504-59.7504-59.7504h-110.8992c-33.024 0-59.7504 26.7264-59.7504 59.7504v110.8992c0 33.024 26.7264 59.7504 59.7504 59.7504z"
  93. fill="#2C6DD2"
  94. p-id="4276"
  95. ></path>
  96. <path
  97. d="M791.4496 160a51.2 51.2 0 0 0-72.3968 0l-72.448 72.3968a51.2 51.2 0 0 0 0 72.3968l72.448 72.3968a51.2 51.2 0 0 0 72.3968 0l72.3968-72.3968a51.2 51.2 0 0 0 0-72.3968l-72.3968-72.3968z"
  98. fill="#20C997"
  99. p-id="4277"
  100. ></path>
  101. </svg>
  102. <span
  103. v-if="isImageOrSvg(typeof item.json =='object'?item.json.icon:'') === 1"
  104. v-html="item.json.icon"
  105. ></span>
  106. <el-image
  107. v-if="isImageOrSvg(typeof item.json =='object'?item.json.icon:'') === 2"
  108. style="width: 100%; height: 100%"
  109. :src="item.json.icon"
  110. fit="cover"
  111. ></el-image>
  112. </div>
  113. <div class="ac_c_i_t_right">
  114. <div>{{ item.name }}</div>
  115. <span>{{ item.label }}</span>
  116. </div>
  117. <div class="ac_c_i_t_popover">
  118. <div
  119. class="ac_c_i_t_p_box"
  120. v-if="editAppCard === item.id"
  121. v-click-outside="handleBlur"
  122. >
  123. <div @click.stop="cancelCollectApp(item)" v-if="collect.map(i=>i.id).includes(item.id)">取消收藏</div>
  124. <div @click.stop="collectApp(item)" v-else>收藏</div>
  125. <div @click.stop="copyApp(item)" v-if="item.json && item.json.copy==='1'">复制</div>
  126. <div @click.stop="updateApp(item)" v-if="item.userid === userId">修改</div>
  127. <div @click.stop="delApp(item)" v-if="item.userid === userId">删除</div>
  128. </div>
  129. <svg
  130. t="1732786015570"
  131. @click.stop="updateCard(item.id)"
  132. class="icon"
  133. viewBox="0 0 1024 1024"
  134. version="1.1"
  135. xmlns="http://www.w3.org/2000/svg"
  136. p-id="9199"
  137. width="200"
  138. height="200"
  139. >
  140. <path
  141. d="M192 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-29.866667-68.266667-68.266667-68.266667zM512 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-29.866667-68.266667-68.266667-68.266667zM832 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-34.133333-68.266667-68.266667-68.266667z"
  142. fill="#111111"
  143. p-id="9200"
  144. ></path>
  145. </svg>
  146. </div>
  147. </div>
  148. <div class="ac_c_i_bottom">
  149. <div>{{ item.detail }}</div>
  150. <!-- <span @click="openApp(item.url)">{{ item.url }}</span> -->
  151. </div>
  152. </div>
  153. <div class="ac_c_empty" v-if="dataList.length === 0">
  154. <span>暂无数据...</span>
  155. </div>
  156. </div>
  157. </div>
  158. <addAppDialog
  159. ref="addAppDialogRef"
  160. :typeList="typeList"
  161. @success="addAppSuccess"
  162. />
  163. </div>
  164. </template>
  165. <script>
  166. const clickOutside = {
  167. bind(el, binding) {
  168. // 在元素上绑定一个点击事件监听器
  169. el.clickOutsideEvent = function(event) {
  170. // 检查点击事件是否发生在元素的内部
  171. if (!(el === event.target || el.contains(event.target))) {
  172. // 如果点击事件发生在元素的外部,则触发指令绑定的方法,将点击的event数据传过去
  173. binding.value(event);
  174. }
  175. };
  176. // 在文档上添加点击事件监听器
  177. document.addEventListener("click", el.clickOutsideEvent);
  178. },
  179. unbind(el) {
  180. // 在元素上解除点击事件监听器
  181. document.removeEventListener("click", el.clickOutsideEvent);
  182. }
  183. };
  184. import addAppDialog from "../dialog/addAppDialog.vue";
  185. import saveCard from "../dialog/saveCard.vue";
  186. // import collectCard from "./dialog/collectCard.vue";
  187. // import recentUseCard from "./dialog/recentUseCard.vue";
  188. export default {
  189. components: {
  190. addAppDialog,
  191. saveCard
  192. // collectCard,
  193. // recentUseCard
  194. },
  195. directives: {
  196. "click-outside": clickOutside // 注册自定义指令
  197. },
  198. data() {
  199. return {
  200. showType: "",
  201. searchText: "",
  202. selectJuri: 3,
  203. typeList: [],
  204. selectList: [
  205. { index: 1, label: "我的" },
  206. { index: 2, label: "组织" },
  207. { index: 3, label: "所有人" }
  208. ],
  209. userId: this.$route.query["userid"],
  210. org: this.$route.query["org"],
  211. oid: this.$route.query["oid"],
  212. getDataLoading: false,
  213. dataList: [],
  214. recentUse: [],
  215. collect: [],
  216. editAppCard: null
  217. };
  218. },
  219. computed: {
  220. isImageOrSvg() {
  221. return value => {
  222. let _result = 0; //啥也不是
  223. if (value) {
  224. const svgPattern = /<svg.*<\/svg>/;
  225. const imagePattern = /\.(jpeg|jpg|gif|png|svg|bmp|webp)$/i; // 图片链接的正则表达式
  226. const urlPattern = /^(http|https):\/\/[^ "]+$/; // 网络地址的正则表达式
  227. if (svgPattern.test(value)) {
  228. _result = 1;
  229. } else if (urlPattern.test(value) && imagePattern.test(value)) {
  230. _result = 2;
  231. }
  232. }
  233. return _result;
  234. };
  235. }
  236. },
  237. methods: {
  238. changeType(newIndex) {
  239. let flag = this.showType === newIndex;
  240. this.showType = newIndex;
  241. if (!flag) {
  242. this.getData();
  243. }
  244. },
  245. changeSelectType() {
  246. this.getData();
  247. },
  248. getData() {
  249. this.getDataLoading = true;
  250. let params = {
  251. uid: this.userId, //用户ID
  252. name: this.searchText, //应用名称搜索
  253. label: "", //应用的标签搜索
  254. type: this.showType, //应用的类型
  255. juri: this.selectJuri, //应用权限 1:我的 2:组织内 3:所有人
  256. stand: "cn" //cn站还是hk站
  257. };
  258. this.ajax
  259. .get(this.$store.state.api + "select_appStore", params)
  260. .then(res => {
  261. this.getDataLoading = false;
  262. let _data = res.data[0];
  263. if (_data.length > 0) {
  264. _data.forEach(i => {
  265. if (i.json) {
  266. i.json = JSON.parse(i.json);
  267. }
  268. });
  269. this.dataList = _data;
  270. } else {
  271. this.dataList = [];
  272. }
  273. })
  274. .catch(err => {
  275. this.getDataLoading = false;
  276. console.log(err);
  277. this.$message.error("获取应用失败");
  278. });
  279. },
  280. addApp() {
  281. this.$refs.addAppDialogRef.open({ type: 1 });
  282. },
  283. updateApp(data) {
  284. this.$refs.addAppDialogRef.open({
  285. type: 2,
  286. form: {
  287. id: data.id,
  288. name: data.name,
  289. label: data.label,
  290. detail: data.detail,
  291. url: data.url,
  292. type: data.type,
  293. juri: data.juri,
  294. stand: data.stand,
  295. json: data.json
  296. }
  297. });
  298. },
  299. // 收藏APP
  300. collectApp(item) {
  301. this.editAppCard = null;
  302. this.insertSave(item,0)
  303. },
  304. //复制app
  305. copyApp(item){
  306. this.$confirm(`确定复制《${item.name}》这个应用吗?`,"复制",{
  307. confirmButtonText:"确定",
  308. cancelButtonText:"取消",
  309. type:"warning"
  310. }).then(()=>{
  311. let params = [
  312. {
  313. name: `${item.name}_copy`, //app名称
  314. userid: this.userId, //创建的用户ID
  315. label: item.label, //app标签
  316. detail: item.detail, //app简介
  317. url: item.url, //app链接
  318. type: item.type, //app类型
  319. juri: "1", //app权限 1:我的 2:组织 3:所有人
  320. stand: "cn", //语言
  321. json: JSON.stringify(item.json) //其他信息
  322. }
  323. ];
  324. this.ajax
  325. .post(this.$store.state.api + "insert_appStore", params)
  326. .then(res => {
  327. if (res.data == 1) {
  328. this.$message.success("复制成功");
  329. this.getData();
  330. } else {
  331. this.$message.error("复制失败");
  332. }
  333. })
  334. .catch(err => {
  335. console.log(err);
  336. this.$message.error("复制失败");
  337. });
  338. }).catch(_=>{
  339. console.log("取消复制")
  340. })
  341. },
  342. // 取消收藏
  343. cancelCollectApp(item){
  344. this.editAppCard = null;
  345. let _data = this.collect.find(i=>i.id===item.id);
  346. if(_data){
  347. let params = [{
  348. sid:_data.sid
  349. }]
  350. this.ajax.post(this.$store.state.api+"delete_appStoreSave",params).then(res=>{
  351. if(res.data){
  352. this.$message.success("取消收藏成功")
  353. }
  354. this.getCollect();
  355. }).catch(e=>{
  356. console.log(e)
  357. this.$message.error("取消收藏失败")
  358. this.getCollect();
  359. })
  360. }else{
  361. this.$message.error("取消收藏失败");
  362. this.getCollect();
  363. }
  364. },
  365. updateCard(id) {
  366. if (this.editAppCard === id) return (this.editAppCard = null);
  367. this.editAppCard = id;
  368. },
  369. handleBlur() {
  370. this.updateCard(null);
  371. },
  372. addAppSuccess(data, type) {
  373. if (type === 1) {
  374. //添加
  375. let params = [
  376. {
  377. name: data.name, //app名称
  378. userid: this.userId, //创建的用户ID
  379. label: data.label, //app标签
  380. detail: data.detail, //app简介
  381. url: data.url, //app链接
  382. type: data.type, //app类型
  383. juri: data.juri, //app权限 1:我的 2:组织 3:所有人
  384. stand: "cn", //语言
  385. json: JSON.stringify(data.json) //其他信息
  386. }
  387. ];
  388. this.ajax
  389. .post(this.$store.state.api + "insert_appStore", params)
  390. .then(res => {
  391. if (res.data == 1) {
  392. this.$message.success("添加成功");
  393. this.$refs.addAppDialogRef.close(true);
  394. this.getData();
  395. } else {
  396. this.$message.error("添加失败");
  397. this.$refs.addAppDialogRef.loading = false;
  398. }
  399. })
  400. .catch(err => {
  401. console.log(err);
  402. this.$message.error("添加失败");
  403. });
  404. } else if (type === 2) {
  405. let params = [
  406. {
  407. aid: data.id,
  408. name: data.name, //app名称
  409. userid: this.userId, //创建的用户ID
  410. label: data.label, //app标签
  411. detail: data.detail, //app简介
  412. url: data.url, //app链接
  413. type: data.type, //app类型
  414. juri: data.juri, //app权限 1:我的 2:组织 3:所有人
  415. stand: "cn", //语言
  416. json: JSON.stringify(data.json) //其他信息
  417. }
  418. ];
  419. this.ajax
  420. .post(this.$store.state.api + "update_appStore", params)
  421. .then(res => {
  422. if (res.data == 1) {
  423. this.$message.success("修改成功");
  424. this.$refs.addAppDialogRef.close(true);
  425. this.getData();
  426. } else {
  427. this.$message.error("修改失败");
  428. this.$refs.addAppDialogRef.loading = false;
  429. }
  430. })
  431. .catch(err => {
  432. console.log(err);
  433. this.$message.error("修改失败");
  434. });
  435. }
  436. },
  437. getTypeList() {
  438. let params = {
  439. suserid: this.userId, //用户ID
  440. sorg: this.org,
  441. soid: this.oid,
  442. sstand: "cn"
  443. };
  444. this.ajax
  445. .get(this.$store.state.api + "select_appStoreType", params)
  446. .then(res => {
  447. let data = res.data[0];
  448. if (data.length > 0) {
  449. this.typeList = data;
  450. }
  451. })
  452. .catch(err => {
  453. console.log(err);
  454. this.$message.error("获取应用类型失败");
  455. });
  456. },
  457. openApp(item) {
  458. window.open(item.url, "_blank");
  459. if (!(this.recentUse.length > 0 && item.id === this.recentUse[0].id)) {
  460. this.insertSave(item,1);
  461. }
  462. },
  463. resetData() {
  464. this.searchText = "";
  465. this.selectJuri = 3;
  466. this.showType = "";
  467. this.getData();
  468. },
  469. getRecentUse(){
  470. let params = {
  471. uid:this.userId,
  472. type:1,
  473. limit:10,
  474. }
  475. this.ajax.get(this.$store.state.api+"select_appStoreSave",params).then(res=>{
  476. let data = res.data[0];
  477. if(data.length>0){
  478. data.forEach(i => {
  479. if (i.json) {
  480. i.json = JSON.parse(i.json);
  481. }
  482. });
  483. this.recentUse = data;
  484. }else{
  485. this.recentUse = [];
  486. }
  487. }).catch(err=>{
  488. console.log(err)
  489. console.log("获取最近使用失败")
  490. // this.$message.error("获取收藏应用失败")
  491. })
  492. },
  493. getCollect(){
  494. let params = {
  495. uid:this.userId,
  496. type:0,
  497. limit:0,
  498. }
  499. this.ajax.get(this.$store.state.api+"select_appStoreSave",params).then(res=>{
  500. let data = res.data[0];
  501. if(data.length>0){
  502. data.forEach(i => {
  503. if (i.json) {
  504. i.json = JSON.parse(i.json);
  505. }
  506. });
  507. this.collect = data;
  508. }else{
  509. this.collect = [];
  510. }
  511. }).catch(err=>{
  512. console.log(err)
  513. this.$message.error("获取收藏应用失败")
  514. })
  515. },
  516. insertSave(item,type){
  517. let params = [{
  518. uid:this.userId,
  519. type:type,
  520. aid:item.id,
  521. json:"",
  522. }]
  523. this.ajax.post(this.$store.state.api+"insert_appStoreSave",params).then(res=>{
  524. if(res.data){
  525. if(type===0){
  526. this.$message.success("收藏成功")
  527. this.getCollect();
  528. }else if(type===1){
  529. this.getRecentUse();
  530. }
  531. }
  532. }).catch(err=>{
  533. console.log(err)
  534. if(type===0)this.$message.error("收藏失败")
  535. })
  536. },
  537. delApp(item){
  538. this.$confirm(`确定要删除《${item.name}》这个应用吗,删除后无法找回!`, `确定删除应用`, {
  539. confirmButtonText: '确定',
  540. cancelButtonText: '取消',
  541. type: 'warning'
  542. }).then(() => {
  543. let params = [{
  544. uid: this.userId,
  545. aid: item.id
  546. }];
  547. this.ajax.post(this.$store.state.api + "delete_appStore", params).then(res => {
  548. if (res.data) {
  549. this.$message.success("删除成功");
  550. this.getData();
  551. } else {
  552. this.$message.error("删除失败");
  553. }
  554. }).catch(err => {
  555. console.log(err);
  556. this.$message.error("删除失败");
  557. });
  558. }).catch(() => {
  559. console.log("取消删除");
  560. });
  561. },
  562. changeShowPage(newPage){
  563. this.$emit("changeShowCard",newPage)
  564. }
  565. },
  566. mounted() {
  567. this.getTypeList();
  568. this.getData();
  569. this.getCollect();
  570. this.getRecentUse();
  571. }
  572. };
  573. </script>
  574. <style scoped>
  575. .appManagement {
  576. width: 100vw;
  577. height: 100vh;
  578. background-color: #f2f4f7;
  579. margin: 0;
  580. overflow: auto;
  581. box-sizing: border-box;
  582. padding: 20px;
  583. display: flex;
  584. justify-content: space-between;
  585. }
  586. .ac_left {
  587. width: 280px;
  588. min-width: 280px;
  589. margin-right: 20px;
  590. height: 100%;
  591. border-radius: 5px;
  592. background-color: #fff;
  593. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  594. box-sizing: border-box;
  595. padding: 10px;
  596. overflow: auto;
  597. }
  598. .ac_right {
  599. width: calc(100% - 280px);
  600. min-width: 800px;
  601. height: 100%;
  602. overflow-y: hidden;
  603. display: flex;
  604. flex-direction: column;
  605. }
  606. .ac_header {
  607. width: 100%;
  608. height: auto;
  609. border-radius: 5px;
  610. background-color: #fff;
  611. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  612. }
  613. .ac_h_top {
  614. width: 100%;
  615. height: 50px;
  616. display: flex;
  617. align-items: center;
  618. box-sizing: border-box;
  619. padding: 0 15px;
  620. border-bottom: 1px solid #eeeeee;
  621. position: relative;
  622. }
  623. .ac_h_top > span {
  624. font-size: 26px;
  625. position: relative;
  626. margin-right: 25px;
  627. cursor: pointer;
  628. }
  629. .ac_h_t_active::after{
  630. content: "";
  631. position: absolute;
  632. width: 100%;
  633. height: 3px;
  634. border-radius: 4px;
  635. background-color: #409EFF;
  636. left: 0;
  637. bottom: -5px;
  638. }
  639. .ac_h_banner{
  640. width: 100%;
  641. height: 200px;
  642. border-radius: 5px;
  643. overflow: hidden;
  644. box-sizing: border-box;
  645. padding: 10px;
  646. }
  647. .ac_h_banner>img{
  648. width: 100%;
  649. height: 100%;
  650. object-fit:cover;
  651. border-radius: 5px;
  652. }
  653. .ac_h_bottom {
  654. width: 100%;
  655. height: auto;
  656. padding: 10px 15px 10px 15px;
  657. box-sizing: border-box;
  658. display: flex;
  659. justify-content: space-between;
  660. align-items: center;
  661. }
  662. .ac_h_b_typeList {
  663. width: calc(100% - 400px);
  664. height: auto;
  665. display: flex;
  666. flex-wrap: wrap;
  667. box-sizing: border-box;
  668. }
  669. .ac_h_b_typeList > span {
  670. font-size: 18px;
  671. margin-right: 20px;
  672. margin-top: 10px;
  673. margin-bottom: 5px;
  674. cursor: pointer;
  675. }
  676. .ac_h_b_typeList_active {
  677. color: #007aff;
  678. }
  679. .ac_h_b_selectList {
  680. margin-left: 15px;
  681. margin-bottom: 10px;
  682. display: flex;
  683. align-items: center;
  684. }
  685. .ac_content {
  686. width: 100%;
  687. flex: 1;
  688. height: auto;
  689. margin-top: 20px;
  690. overflow: auto;
  691. }
  692. .ac_c_item {
  693. width: calc(100% / 5 - (15px * 4) / 5);
  694. height: 250px;
  695. background-color: #fff;
  696. border-radius: 10px;
  697. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  698. box-sizing: border-box;
  699. padding: 15px;
  700. margin-right: 15px;
  701. margin-bottom: 15px;
  702. float: left;
  703. cursor: pointer;
  704. }
  705. @media screen and (min-width: 1400px) {
  706. .ac_c_item {
  707. width: calc(100% / 5 - (15px * 4) / 5) !important;
  708. }
  709. .ac_c_item:nth-child(5n) {
  710. margin-right: 0px !important;
  711. /* background-color: red; */
  712. }
  713. }
  714. @media screen and (max-width: 1380px) {
  715. .ac_c_item {
  716. width: calc(100% / 4 - (15px * 3) / 4) !important;
  717. }
  718. .ac_c_item:nth-child(4n) {
  719. margin-right: 0px !important;
  720. }
  721. /* .ac_c_item:nth-child(5n) {
  722. margin-right: 0 !important;
  723. } */
  724. }
  725. @media screen and (max-width: 1080px) {
  726. .ac_c_item {
  727. width: calc(100% / 3 - (15px * 2) / 3) !important;
  728. }
  729. .ac_c_item:nth-child(5n) {
  730. margin-right: 15px !important;
  731. }
  732. .ac_c_item:nth-of-type(4n) {
  733. margin-right: 15px !important;
  734. }
  735. .ac_c_item:nth-child(3n) {
  736. margin-right: 0 !important;
  737. }
  738. }
  739. .ac_c_empty {
  740. width: 100%;
  741. height: 40%;
  742. display: flex;
  743. box-sizing: border-box;
  744. padding-top: 2%;
  745. justify-content: center;
  746. /* align-items: center; */
  747. }
  748. .ac_c_i_top {
  749. width: 100%;
  750. height: 50px;
  751. display: flex;
  752. position: relative;
  753. /* flex-direction: column; */
  754. /* justify-content: space-evenly; */
  755. /* background-color: red */
  756. }
  757. .ac_c_i_t_popover {
  758. width: 30px;
  759. height: 30px;
  760. position: absolute;
  761. right: 0;
  762. top: 0;
  763. }
  764. .ac_c_i_t_popover svg {
  765. width: 25px;
  766. height: 25px;
  767. cursor: pointer;
  768. }
  769. .ac_c_i_t_p_box {
  770. position: absolute;
  771. height: auto;
  772. top: 100%;
  773. right: 0;
  774. padding: 8px;
  775. border-radius: 8px 0 8px 8px;
  776. background-color: #fff;
  777. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  778. width: auto;
  779. }
  780. .ac_c_i_t_p_box > div {
  781. width: 80px;
  782. height: 30px;
  783. cursor: pointer;
  784. transition: 0.3s;
  785. font-weight: bold;
  786. font-size: .9em;
  787. border-radius: 5px;
  788. display: flex;
  789. justify-content: center;
  790. align-items: center;
  791. position: relative;
  792. box-sizing: border-box;
  793. }
  794. .ac_c_i_t_p_box > div:hover {
  795. background-color: #f2f4f7;
  796. }
  797. .ac_c_i_t_left {
  798. width: 50px;
  799. height: 50px;
  800. border-radius: 8px;
  801. margin-right: 10px;
  802. box-sizing: border-box;
  803. padding: 5px;
  804. }
  805. .ac_c_i_t_left > svg {
  806. width: 100%;
  807. height: 100%;
  808. }
  809. .ac_c_i_t_left >span{
  810. width: 100%;
  811. height: 100%;
  812. display: block;
  813. }
  814. .ac_c_i_t_left >span>>>svg{
  815. width: 100%;
  816. height: 100%;
  817. }
  818. .ac_c_i_t_right {
  819. width: calc(100% - 60px);
  820. height: 100%;
  821. display: flex;
  822. flex-direction: column;
  823. justify-content: space-evenly;
  824. }
  825. .ac_c_i_t_right > div {
  826. font-size: 22px;
  827. font-weight: bold;
  828. max-width: 100%;
  829. overflow: hidden;
  830. text-overflow: ellipsis;
  831. white-space: nowrap;
  832. }
  833. .ac_c_i_t_right > span {
  834. font-size: 1.1em;
  835. font-weight: bold;
  836. color: #8991a1;
  837. display: block;
  838. max-width: 100%;
  839. overflow: hidden;
  840. text-overflow: ellipsis;
  841. white-space: nowrap;
  842. }
  843. .ac_c_i_bottom {
  844. width: 100%;
  845. height: calc(100% - 60px);
  846. margin-top: 15px;
  847. }
  848. .ac_c_i_bottom > div {
  849. font-size: 1em;
  850. color: #8991a1;
  851. width: 100%;
  852. height: calc(100%);
  853. /* 第四行溢出显示... */
  854. display: -webkit-box;
  855. display: block;
  856. overflow: hidden;
  857. text-overflow: ellipsis;
  858. -webkit-line-clamp: 8;
  859. -webkit-box-orient: vertical;
  860. }
  861. .ac_c_i_bottom > span {
  862. margin-top: 5px;
  863. font-size: 1em;
  864. color: #409eff;
  865. overflow: hidden;
  866. display: block;
  867. text-overflow: ellipsis;
  868. white-space: nowrap;
  869. cursor: pointer;
  870. }
  871. </style>