appManagement.vue 21 KB

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