appManagement.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667
  1. <template>
  2. <div class="appManagement">
  3. <div class="ac_left">
  4. <saveCard
  5. title="最近使用"
  6. :data="recentUse"
  7. :type="1"
  8. @saveClick="openApp"
  9. />
  10. <saveCard title="收藏" :data="collect" :type="0" @saveClick="openApp" />
  11. </div>
  12. <div class="ac_right">
  13. <div class="ac_header">
  14. <!-- <div class="ac_h_top">
  15. <span class="ac_h_t_active">
  16. <svg
  17. width="20"
  18. height="20"
  19. viewBox="0 0 20 20"
  20. xmlns="http://www.w3.org/2000/svg"
  21. >
  22. <path
  23. d="M14.0625 2.1875C11.9914 2.1875 10.3125 3.86643 10.3125 5.9375C10.3125 8.00857 11.9914 9.6875 14.0625 9.6875C16.1336 9.6875 17.8125 8.00857 17.8125 5.9375C17.8125 3.86643 16.1336 2.1875 14.0625 2.1875ZM11.5625 5.9375C11.5625 4.55679 12.6818 3.4375 14.0625 3.4375C15.4432 3.4375 16.5625 4.55679 16.5625 5.9375C16.5625 7.31821 15.4432 8.4375 14.0625 8.4375C12.6818 8.4375 11.5625 7.31821 11.5625 5.9375Z"
  24. />
  25. <path
  26. d="M2.5 3.75C2.5 3.05964 3.05964 2.5 3.75 2.5H8.125C8.81536 2.5 9.375 3.05964 9.375 3.75V8.125C9.375 8.81536 8.81536 9.375 8.125 9.375H3.75C3.05964 9.375 2.5 8.81536 2.5 8.125V3.75ZM3.75 3.75V8.125H8.125V3.75H3.75Z"
  27. />
  28. <path
  29. d="M2.5 11.875C2.5 11.1846 3.05964 10.625 3.75 10.625H8.125C8.81536 10.625 9.375 11.1846 9.375 11.875V16.25C9.375 16.9404 8.81536 17.5 8.125 17.5H3.75C3.05964 17.5 2.5 16.9404 2.5 16.25V11.875ZM3.75 11.875V16.25H8.125V11.875H3.75Z"
  30. />
  31. <path
  32. d="M10.625 11.875C10.625 11.1846 11.1846 10.625 11.875 10.625H16.25C16.9404 10.625 17.5 11.1846 17.5 11.875V16.25C17.5 16.9404 16.9404 17.5 16.25 17.5H11.875C11.1846 17.5 10.625 16.9404 10.625 16.25V11.875ZM11.875 16.25H16.25V11.875H11.875V16.25Z"
  33. />
  34. </svg>
  35. 应用管理</span
  36. >
  37. <span @click="changeShowPage(1)">
  38. <svg
  39. width="20"
  40. height="20"
  41. viewBox="0 0 20 20"
  42. xmlns="http://www.w3.org/2000/svg"
  43. >
  44. <rect width="20" height="20" fill="white" />
  45. <path
  46. fill-rule="evenodd"
  47. clip-rule="evenodd"
  48. d="M9.70072 1.32632C9.88727 1.22456 10.1127 1.22456 10.2993 1.32632L17.1743 5.07632C17.3751 5.18584 17.5 5.39628 17.5 5.625V14.375C17.5 14.6037 17.3751 14.8142 17.1743 14.9237L10.2993 18.6737C10.1127 18.7754 9.88727 18.7754 9.70072 18.6737L2.82572 14.9237C2.62493 14.8142 2.5 14.6037 2.5 14.375V5.625C2.5 5.39628 2.62493 5.18584 2.82572 5.07632L9.70072 1.32632ZM3.75 6.79282V14.004L9.375 17.0722V14.1039L6.55344 12.4109C6.36519 12.298 6.25 12.0945 6.25 11.875V8.45949L3.75 6.79282ZM7.5 8.47887V10.7711L9.375 9.64613V7.35387L7.5 8.47887ZM10.625 7.35387V9.64613L12.5 10.7711V8.47887L10.625 7.35387ZM13.75 8.45949V11.875C13.75 12.0945 13.6348 12.298 13.4466 12.4109L10.625 14.1039V17.0722L16.25 14.004V6.79282L13.75 8.45949ZM15.668 5.67854L10 2.58693L4.33205 5.67854L6.8926 7.38557L9.67844 5.71407C9.87637 5.59531 10.1236 5.59531 10.3216 5.71407L13.1074 7.38557L15.668 5.67854ZM10 13.0211L11.9102 11.875L10 10.7289L8.08978 11.875L10 13.0211Z"
  49. />
  50. </svg>
  51. 工作空间</span
  52. >
  53. </div> -->
  54. <el-button
  55. type="primary"
  56. size="small"
  57. icon="el-icon-plus"
  58. v-show="false"
  59. style="position: absolute;right: 15px;"
  60. @click="addApp"
  61. >添加应用</el-button
  62. >
  63. <div class="ac_h_banner" v-if="bannerObj">
  64. <img :src="bannerObj.poster" alt="banner图" />
  65. </div>
  66. <div class="ac_h_bottom">
  67. <div class="ac_h_b_typeList">
  68. <span
  69. :class="{ ac_h_b_typeList_active: showType === '' }"
  70. @click="changeType('')"
  71. >全部</span
  72. >
  73. <span
  74. v-for="item in typeList"
  75. :key="item.id"
  76. :class="{ ac_h_b_typeList_active: showType === item.id }"
  77. @click="changeType(item.id)"
  78. >{{ item.name }}</span
  79. >
  80. </div>
  81. <div class="ac_h_b_selectList">
  82. <el-select
  83. v-model="selectJuri"
  84. placeholder="请选择显示范围"
  85. @change="changeSelectType"
  86. style="width: 150px;margin-right: 10px;"
  87. >
  88. <el-option
  89. v-for="item in selectList"
  90. :key="item.index"
  91. :label="item.label"
  92. :value="item.index"
  93. ></el-option>
  94. </el-select>
  95. <el-select
  96. v-model="selectLabel"
  97. placeholder="请选择类型"
  98. @change="changeSelectType"
  99. style="width: 120px;margin-right: 10px;"
  100. >
  101. <el-option
  102. v-for="item in labelSelect"
  103. :key="item.value"
  104. :label="item.label"
  105. :value="item.value"
  106. ></el-option>
  107. </el-select>
  108. <el-input
  109. v-model="searchText"
  110. style="width: 200px;"
  111. placeholder="请输入应用名称"
  112. @keyup.enter.native="getData"
  113. clearable
  114. />
  115. <el-button
  116. type="primary"
  117. style="margin-left: 10px;"
  118. icon="el-icon-search"
  119. @click="getData"
  120. ></el-button>
  121. <el-button type="primary" @click="selectApp()">发布应用</el-button>
  122. </div>
  123. </div>
  124. </div>
  125. <div class="ac_content">
  126. <div class="ac_c_item" v-for="(item, index) in dataList" :key="item.id">
  127. <div class="ac_c_i_top" @click="openApp(item)">
  128. <div class="ac_c_i_t_left">
  129. <img v-if="item.json.icon" :src="item.json.icon" />
  130. <svg
  131. v-else
  132. t="1732605901531"
  133. class="icon"
  134. viewBox="0 0 1024 1024"
  135. version="1.1"
  136. xmlns="http://www.w3.org/2000/svg"
  137. p-id="4275"
  138. width="200"
  139. height="200"
  140. >
  141. <path
  142. 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"
  143. fill="#2C6DD2"
  144. p-id="4276"
  145. ></path>
  146. <path
  147. 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"
  148. fill="#20C997"
  149. p-id="4277"
  150. ></path>
  151. </svg>
  152. </div>
  153. <div class="ac_c_i_t_right">
  154. <div class="ac_c_i_t_r_top">
  155. <el-tooltip
  156. class="item"
  157. effect="light"
  158. :content="item.name"
  159. placement="top"
  160. >
  161. <span>{{ item.name }}</span>
  162. </el-tooltip>
  163. <div class="ac_c_i_t_popover" v-if="showMenu(item)">
  164. <div
  165. class="ac_c_i_t_p_box"
  166. v-if="editAppCard === item.id"
  167. v-click-outside="handleBlur"
  168. >
  169. <div
  170. @click.stop="copyApp(item)"
  171. v-if="item.json && item.json.copy === '1'"
  172. >
  173. 复制
  174. </div>
  175. <div
  176. @click.stop="updateApp(item)"
  177. v-if="item.userid === userId"
  178. >
  179. 修改
  180. </div>
  181. <div
  182. @click.stop="delApp(item)"
  183. v-if="item.userid === userId"
  184. >
  185. 删除
  186. </div>
  187. </div>
  188. <svg
  189. t="1732786015570"
  190. @click.stop="updateCard(item.id)"
  191. class="icon"
  192. viewBox="0 0 1024 1024"
  193. version="1.1"
  194. xmlns="http://www.w3.org/2000/svg"
  195. p-id="9199"
  196. width="200"
  197. height="200"
  198. >
  199. <path
  200. 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"
  201. fill="#111111"
  202. p-id="9200"
  203. ></path>
  204. </svg>
  205. </div>
  206. </div>
  207. <div class="ac_c_i_t_r_center">
  208. <span>@{{ item.username }}</span>
  209. <div v-if="item.label === 'workflow'">
  210. <img
  211. src="../../../../assets/icon/appStore/workflow.svg"
  212. alt=""
  213. />
  214. 工作流
  215. </div>
  216. <div v-if="item.label === 'agent'">
  217. <img
  218. src="../../../../assets/icon/appStore/agent.svg"
  219. alt=""
  220. />
  221. 智能体
  222. </div>
  223. </div>
  224. <div class="ac_c_i_t_r_bottom">
  225. {{ item.detail }}
  226. </div>
  227. </div>
  228. </div>
  229. <div class="ac_c_i_bottom">
  230. <div class="ac_c_i_b_left">
  231. <el-tooltip
  232. class="item"
  233. effect="light"
  234. content="被复制数"
  235. placement="top"
  236. >
  237. <div>
  238. <img src="../../../../assets/icon/appStore/user_copy.svg" />
  239. <span>{{ item.copyCount }}</span>
  240. </div>
  241. </el-tooltip>
  242. <el-tooltip
  243. class="item"
  244. effect="light"
  245. :content="item.likeId ? '取消点赞' : '点赞'"
  246. placement="top"
  247. >
  248. <div>
  249. <img
  250. :src="
  251. require('../../../../assets/icon/appStore/praise_default.svg')
  252. "
  253. v-if="!item.likeId"
  254. style="cursor: pointer;"
  255. @click="praiseFn(item, 0)"
  256. />
  257. <img
  258. :src="
  259. require('../../../../assets/icon/appStore/praise_active.svg')
  260. "
  261. v-else
  262. style="cursor: pointer;"
  263. @click="praiseFn(item, 1)"
  264. />
  265. <span>{{ item.likeCount }}</span>
  266. </div>
  267. </el-tooltip>
  268. <el-tooltip
  269. class="item"
  270. effect="light"
  271. :content="item.collectId ? '取消收藏' : '收藏'"
  272. placement="top"
  273. >
  274. <div>
  275. <img
  276. src="../../../../assets/icon/appStore/collect_default.svg"
  277. v-if="!item.collectId"
  278. style="cursor: pointer;"
  279. @click="collectFn(item, 0)"
  280. />
  281. <img
  282. src="../../../../assets/icon/appStore/collect_active.svg"
  283. v-else
  284. style="cursor: pointer;"
  285. @click="collectFn(item, 1)"
  286. />
  287. <span>{{ item.collectCount }}</span>
  288. </div>
  289. </el-tooltip>
  290. </div>
  291. <div class="ac_c_i_b_right" v-if="item.json.status">
  292. <span class="ac_c_i_b_r_type2" v-if="item.json.status === '1'"
  293. >测试</span
  294. >
  295. <span class="ac_c_i_b_r_type1" v-if="item.json.status === '2'"
  296. >稳定</span
  297. >
  298. </div>
  299. </div>
  300. </div>
  301. <!-- <div
  302. class="ac_c_item"
  303. v-for="(item, index) in dataList"
  304. :key="item.id"
  305. @click="openApp(item)"
  306. >
  307. <div class="ac_c_i_top">
  308. <div class="ac_c_i_t_left">
  309. <svg
  310. v-if="
  311. isImageOrSvg(
  312. typeof item.json == 'object' ? item.json.icon : ''
  313. ) === 0
  314. "
  315. t="1732605901531"
  316. class="icon"
  317. viewBox="0 0 1024 1024"
  318. version="1.1"
  319. xmlns="http://www.w3.org/2000/svg"
  320. p-id="4275"
  321. width="200"
  322. height="200"
  323. >
  324. <path
  325. 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"
  326. fill="#2C6DD2"
  327. p-id="4276"
  328. ></path>
  329. <path
  330. 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"
  331. fill="#20C997"
  332. p-id="4277"
  333. ></path>
  334. </svg>
  335. <span
  336. v-if="
  337. isImageOrSvg(
  338. typeof item.json == 'object' ? item.json.icon : ''
  339. ) === 1
  340. "
  341. v-html="item.json.icon"
  342. ></span>
  343. <el-image
  344. v-if="
  345. isImageOrSvg(
  346. typeof item.json == 'object' ? item.json.icon : ''
  347. ) === 2
  348. "
  349. style="width: 100%; height: 100%"
  350. :src="item.json.icon"
  351. fit="cover"
  352. ></el-image>
  353. </div>
  354. <div class="ac_c_i_t_right">
  355. <div>{{ item.name }}</div>
  356. <span>{{ item.label}}</span>
  357. </div>
  358. <div class="ac_c_i_t_popover">
  359. <div
  360. class="ac_c_i_t_p_box"
  361. v-if="editAppCard === item.id"
  362. v-click-outside="handleBlur"
  363. >
  364. <div
  365. @click.stop="cancelCollectApp(item)"
  366. v-if="collect.map(i => i.id).includes(item.id)"
  367. >
  368. 取消收藏
  369. </div>
  370. <div @click.stop="collectApp(item)" v-else>收藏</div>
  371. <div
  372. @click.stop="copyApp(item)"
  373. v-if="item.json && item.json.copy === '1'"
  374. >
  375. 复制
  376. </div>
  377. <div
  378. @click.stop="updateApp(item)"
  379. v-if="item.userid === userId"
  380. >
  381. 修改
  382. </div>
  383. <div @click.stop="delApp(item)" v-if="item.userid === userId">
  384. 删除
  385. </div>
  386. </div>
  387. <svg
  388. t="1732786015570"
  389. @click.stop="updateCard(item.id)"
  390. class="icon"
  391. viewBox="0 0 1024 1024"
  392. version="1.1"
  393. xmlns="http://www.w3.org/2000/svg"
  394. p-id="9199"
  395. width="200"
  396. height="200"
  397. >
  398. <path
  399. 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"
  400. fill="#111111"
  401. p-id="9200"
  402. ></path>
  403. </svg>
  404. </div>
  405. </div>
  406. <div class="ac_c_i_bottom">
  407. <div>{{ item.detail }}</div>
  408. </div>
  409. </div> -->
  410. <div class="ac_c_empty" v-if="dataList.length === 0">
  411. <span>暂无数据...</span>
  412. </div>
  413. </div>
  414. </div>
  415. <addAppDialog
  416. ref="addAppDialogRef"
  417. :typeList="typeList"
  418. @success="addAppSuccess"
  419. />
  420. <selectAppDialog ref="selectAppDialogRef" @success="selectAppSuccess" />
  421. <releaseAppDialog
  422. ref="releaseAppDialogRef"
  423. :typeList="typeList"
  424. @success="releaseAppSuccess"
  425. />
  426. </div>
  427. </template>
  428. <script>
  429. const clickOutside = {
  430. bind(el, binding) {
  431. // 在元素上绑定一个点击事件监听器
  432. el.clickOutsideEvent = function(event) {
  433. // 检查点击事件是否发生在元素的内部
  434. if (!(el === event.target || el.contains(event.target))) {
  435. // 如果点击事件发生在元素的外部,则触发指令绑定的方法,将点击的event数据传过去
  436. binding.value(event);
  437. }
  438. };
  439. // 在文档上添加点击事件监听器
  440. document.addEventListener("click", el.clickOutsideEvent);
  441. },
  442. unbind(el) {
  443. // 在元素上解除点击事件监听器
  444. document.removeEventListener("click", el.clickOutsideEvent);
  445. }
  446. };
  447. import addAppDialog from "../dialog/addAppDialog.vue";
  448. import saveCard from "../components/saveCard.vue";
  449. import selectAppDialog from "../dialog/selectAppDialog.vue";
  450. import releaseAppDialog from "../dialog/releaseAppDialog.vue";
  451. // import collectCard from "./dialog/collectCard.vue";
  452. // import recentUseCard from "./dialog/recentUseCard.vue";
  453. export default {
  454. components: {
  455. addAppDialog,
  456. saveCard,
  457. selectAppDialog,
  458. releaseAppDialog
  459. // collectCard,
  460. // recentUseCard
  461. },
  462. directives: {
  463. "click-outside": clickOutside // 注册自定义指令
  464. },
  465. data() {
  466. return {
  467. showType: "",
  468. searchText: "",
  469. selectJuri: 3,
  470. selectLabel: "",
  471. typeList: [],
  472. selectList: [
  473. { index: 3, label: "所有组织" },
  474. { index: 2, label: "组织内" },
  475. { index: 1, label: "我的" },
  476. // { index: 98,label:"已发布"},
  477. // { index: 99,label:"未发布"},
  478. ],
  479. labelSelect: [
  480. { value: "", label: "全部类型" },
  481. { value: "agent", label: "智能体" },
  482. { value: "workflow", label: "工作流" }
  483. ],
  484. userId: this.$route.query["userid"],
  485. org: this.$route.query["org"],
  486. oid: this.$route.query["oid"],
  487. getDataLoading: false,
  488. dataList: [],
  489. recentUse: [],
  490. collect: [],
  491. editAppCard: null,
  492. bannerObj: null
  493. };
  494. },
  495. computed: {
  496. isImageOrSvg() {
  497. return value => {
  498. let _result = 0; //啥也不是
  499. if (value) {
  500. const svgPattern = /<svg.*<\/svg>/;
  501. const imagePattern = /\.(jpeg|jpg|gif|png|svg|bmp|webp)$/i; // 图片链接的正则表达式
  502. const urlPattern = /^(http|https):\/\/[^ "]+$/; // 网络地址的正则表达式
  503. if (svgPattern.test(value)) {
  504. _result = 1;
  505. } else if (urlPattern.test(value) && imagePattern.test(value)) {
  506. _result = 2;
  507. }
  508. }
  509. return _result;
  510. };
  511. },
  512. showMenu() {
  513. return data => {
  514. let _result = false;
  515. if (data && this.userId) {
  516. if (
  517. data.userid === this.userId ||
  518. (data.json && data.json.copy === "1")
  519. ) {
  520. _result = true;
  521. }
  522. }
  523. return _result;
  524. };
  525. }
  526. },
  527. methods: {
  528. changeType(newIndex) {
  529. let flag = this.showType === newIndex;
  530. this.showType = newIndex;
  531. if (!flag) {
  532. this.getData();
  533. }
  534. },
  535. changeSelectType() {
  536. this.getData();
  537. },
  538. getData() {
  539. this.getDataLoading = true;
  540. let params = {
  541. uid: this.userId, //用户ID
  542. name: this.searchText, //应用名称搜索
  543. label: this.selectLabel, //应用的标签搜索
  544. type: this.showType, //应用的类型
  545. juri: this.selectJuri, //应用权限 1:我的 2:组织内 3:所有人
  546. stand: "cn" //cn站还是hk站
  547. };
  548. this.ajax
  549. .get(this.$store.state.api + "select_appStore", params)
  550. .then(res => {
  551. this.getDataLoading = false;
  552. let _data = res.data[0];
  553. if (_data.length > 0) {
  554. _data.forEach(i => {
  555. if (i.json) {
  556. i.json = JSON.parse(i.json);
  557. }
  558. });
  559. this.dataList = _data;
  560. } else {
  561. this.dataList = [];
  562. }
  563. })
  564. .catch(err => {
  565. this.getDataLoading = false;
  566. console.log(err);
  567. this.$message.error("获取应用失败");
  568. });
  569. },
  570. addApp() {
  571. this.$refs.addAppDialogRef.open({ type: 1 });
  572. },
  573. selectApp() {
  574. this.$refs.selectAppDialogRef.open();
  575. },
  576. selectAppSuccess(data) {
  577. if (data) {
  578. this.$refs.selectAppDialogRef.close();
  579. this.$refs.releaseAppDialogRef.open({
  580. form: {
  581. id: data.id,
  582. name: data.name,
  583. label: data.label,
  584. detail: data.detail,
  585. url: data.url,
  586. type: data.type,
  587. juri: data.juri,
  588. stand: data.stand,
  589. json: data.json
  590. }
  591. });
  592. }
  593. },
  594. updateApp(data) {
  595. this.$refs.addAppDialogRef.open({
  596. type: 2,
  597. form: {
  598. id: data.id,
  599. name: data.name,
  600. label: data.label,
  601. detail: data.detail,
  602. url: data.url,
  603. type: data.type,
  604. juri: data.juri,
  605. stand: data.stand,
  606. json: data.json
  607. }
  608. });
  609. },
  610. // 收藏APP
  611. // collectApp(item) {
  612. // this.editAppCard = null;
  613. // this.insertSave(item, 0);
  614. // },
  615. //复制app
  616. copyApp(item) {
  617. this.$confirm(`确定复制《${item.name}》这个应用至我的列表吗?`, "复制", {
  618. confirmButtonText: "确定",
  619. cancelButtonText: "取消",
  620. type: "warning"
  621. })
  622. .then(() => {
  623. let params = [
  624. {
  625. name: `${item.name}_copy`, //app名称
  626. userid: this.userId, //创建的用户ID
  627. label: item.label, //app标签
  628. detail: item.detail, //app简介
  629. url: item.url, //app链接
  630. type: item.type, //app类型
  631. juri: "1", //app权限 1:我的 2:组织 3:所有人
  632. stand: "cn", //语言
  633. json: JSON.stringify(item.json) //其他信息
  634. }
  635. ];
  636. this.ajax
  637. .post(this.$store.state.api + "insert_appStore", params)
  638. .then(res => {
  639. if (res.data == 1) {
  640. this.$message.success("复制成功,已添加至我的列表。");
  641. this.getData();
  642. this.insertSave(item, 3);
  643. } else {
  644. this.$message.error("复制失败");
  645. }
  646. })
  647. .catch(err => {
  648. console.log(err);
  649. this.$message.error("复制失败");
  650. });
  651. })
  652. .catch(_ => {
  653. console.log("取消复制");
  654. });
  655. },
  656. // 取消收藏
  657. cancelCollectApp(item) {
  658. this.editAppCard = null;
  659. let _data = this.collect.find(i => i.id === item.id);
  660. if (_data) {
  661. let params = [
  662. {
  663. sid: _data.sid
  664. }
  665. ];
  666. this.ajax
  667. .post(this.$store.state.api + "delete_appStoreSave", params)
  668. .then(res => {
  669. if (res.data) {
  670. this.$message.success("取消收藏成功");
  671. }
  672. this.getCollect();
  673. })
  674. .catch(e => {
  675. console.log(e);
  676. this.$message.error("取消收藏失败");
  677. this.getCollect();
  678. });
  679. } else {
  680. this.$message.error("取消收藏失败");
  681. this.getCollect();
  682. }
  683. },
  684. updateCard(id) {
  685. if (this.editAppCard === id) return (this.editAppCard = null);
  686. this.editAppCard = id;
  687. },
  688. handleBlur() {
  689. this.updateCard(null);
  690. },
  691. addAppSuccess(data, type) {
  692. if (type === 1) {
  693. //添加
  694. let params = [
  695. {
  696. name: data.name, //app名称
  697. userid: this.userId, //创建的用户ID
  698. label: data.label, //app标签
  699. detail: data.detail, //app简介
  700. url: data.url, //app链接
  701. type: data.type, //app类型
  702. juri: data.juri, //app权限 1:我的 2:组织 3:所有人
  703. stand: "cn", //语言
  704. json: JSON.stringify(data.json) //其他信息
  705. }
  706. ];
  707. this.ajax
  708. .post(this.$store.state.api + "insert_appStore", params)
  709. .then(res => {
  710. if (res.data == 1) {
  711. this.$message.success("添加成功");
  712. this.$refs.addAppDialogRef.close(true);
  713. this.getData();
  714. } else {
  715. this.$message.error("添加失败");
  716. this.$refs.addAppDialogRef.loading = false;
  717. }
  718. })
  719. .catch(err => {
  720. console.log(err);
  721. this.$message.error("添加失败");
  722. });
  723. } else if (type === 2) {
  724. let params = [
  725. {
  726. aid: data.id,
  727. name: data.name, //app名称
  728. userid: this.userId, //创建的用户ID
  729. label: data.label, //app标签
  730. detail: data.detail, //app简介
  731. url: data.url, //app链接
  732. type: data.type, //app类型
  733. juri: data.juri, //app权限 1:我的 2:组织 3:所有人
  734. stand: "cn", //语言
  735. json: JSON.stringify(data.json) //其他信息
  736. }
  737. ];
  738. this.ajax
  739. .post(this.$store.state.api + "update_appStore", params)
  740. .then(res => {
  741. if (res.data == 1) {
  742. this.$message.success("修改成功");
  743. this.$refs.addAppDialogRef.close(true);
  744. this.getData();
  745. } else {
  746. this.$message.error("修改失败");
  747. this.$refs.addAppDialogRef.loading = false;
  748. }
  749. })
  750. .catch(err => {
  751. console.log(err);
  752. this.$message.error("修改失败");
  753. });
  754. }
  755. },
  756. releaseAppSuccess(data) {
  757. this.$refs.releaseAppDialogRef.loading = true;
  758. let params = [
  759. {
  760. aid: data.id,
  761. name: data.name, //app名称
  762. userid: this.userId, //创建的用户ID
  763. label: data.label, //app标签
  764. detail: data.detail, //app简介
  765. url: data.url, //app链接
  766. type: data.type, //app类型
  767. juri: data.juri, //app权限 1:我的 2:组织 3:所有人
  768. stand: "cn", //语言
  769. json: JSON.stringify(data.json) //其他信息
  770. }
  771. ];
  772. this.ajax
  773. .post(this.$store.state.api + "update_appStore", params)
  774. .then(res => {
  775. if (res.data == 1) {
  776. this.$message.success("发布成功");
  777. this.$refs.releaseAppDialogRef.close(true);
  778. this.getData();
  779. } else {
  780. this.$message.error("发布失败");
  781. this.$refs.releaseAppDialogRef.loading = false;
  782. }
  783. })
  784. .catch(err => {
  785. console.log(err);
  786. this.$message.error("修改失败");
  787. });
  788. },
  789. getTypeList() {
  790. let params = {
  791. suserid: this.userId, //用户ID
  792. sorg: this.org,
  793. soid: this.oid,
  794. sstand: "cn"
  795. };
  796. this.ajax
  797. .get(this.$store.state.api + "select_appStoreType", params)
  798. .then(res => {
  799. let data = res.data[0];
  800. if (data.length > 0) {
  801. this.typeList = data;
  802. }
  803. })
  804. .catch(err => {
  805. console.log(err);
  806. this.$message.error("获取应用类型失败");
  807. });
  808. },
  809. openApp(item, type = 0) {
  810. window.open(item.url, "_blank");
  811. if (
  812. !(this.recentUse.length > 0 && item.id === this.recentUse[0].id) &&
  813. type === 0
  814. ) {
  815. this.insertSave(item, 1);
  816. }
  817. },
  818. resetData() {
  819. this.searchText = "";
  820. this.selectJuri = 3;
  821. this.showType = "";
  822. this.getData();
  823. },
  824. getRecentUse() {
  825. let params = {
  826. uid: this.userId,
  827. type: 1,
  828. limit: 10
  829. };
  830. this.ajax
  831. .get(this.$store.state.api + "select_appStoreSave", params)
  832. .then(res => {
  833. let data = res.data[0];
  834. if (data.length > 0) {
  835. data.forEach(i => {
  836. if (i.json) {
  837. i.json = JSON.parse(i.json);
  838. }
  839. });
  840. this.recentUse = data;
  841. } else {
  842. this.recentUse = [];
  843. }
  844. })
  845. .catch(err => {
  846. console.log(err);
  847. console.log("获取最近使用失败");
  848. // this.$message.error("获取收藏应用失败")
  849. });
  850. },
  851. getCollect() {
  852. let params = {
  853. uid: this.userId,
  854. type: 0,
  855. limit: 0
  856. };
  857. this.ajax
  858. .get(this.$store.state.api + "select_appStoreSave", params)
  859. .then(res => {
  860. let data = res.data[0];
  861. if (data.length > 0) {
  862. data.forEach(i => {
  863. if (i.json) {
  864. i.json = JSON.parse(i.json);
  865. }
  866. });
  867. this.collect = data;
  868. } else {
  869. this.collect = [];
  870. }
  871. })
  872. .catch(err => {
  873. console.log(err);
  874. this.$message.error("获取收藏应用失败");
  875. });
  876. },
  877. insertSave(item, type) {
  878. return new Promise(resolve => {
  879. let params = [
  880. {
  881. uid: this.userId,
  882. type: type,
  883. aid: item.id,
  884. json: ""
  885. }
  886. ];
  887. this.ajax
  888. .post(this.$store.state.api + "insert_appStoreSave", params)
  889. .then(res => {
  890. if (res.data) {
  891. if (type === 1) {
  892. resolve(1);
  893. }
  894. }
  895. })
  896. .catch(err => {
  897. resolve(0);
  898. console.log(err);
  899. });
  900. });
  901. },
  902. delApp(item) {
  903. this.$confirm(`确定要删除《${item.name}》这个应用吗!`, `确定删除应用`, {
  904. confirmButtonText: "确定",
  905. cancelButtonText: "取消",
  906. type: "warning"
  907. })
  908. .then(() => {
  909. let params = [
  910. {
  911. uid: this.userId,
  912. aid: item.id
  913. }
  914. ];
  915. this.ajax
  916. .post(this.$store.state.api + "delete_appStore", params)
  917. .then(res => {
  918. if (res.data) {
  919. this.$message.success("删除成功");
  920. this.getData();
  921. } else {
  922. this.$message.error("删除失败");
  923. }
  924. if(this.collect.findIndex(i=>i.id == item.id)!=-1){
  925. this.getCollect()
  926. }
  927. })
  928. .catch(err => {
  929. console.log(err);
  930. this.$message.error("删除失败");
  931. });
  932. })
  933. .catch(() => {
  934. console.log("取消删除");
  935. });
  936. },
  937. changeShowPage(newPage) {
  938. this.$emit("changeShowCard", newPage);
  939. },
  940. getBanner() {
  941. let params = {
  942. uid: this.userId,
  943. oid: this.oid,
  944. org: this.org,
  945. type: 4
  946. };
  947. this.ajax
  948. .get(this.$store.state.api + "select_bannerByoidORorg", params)
  949. .then(res => {
  950. let _data = res.data[0];
  951. if (_data[0]) {
  952. this.bannerObj = _data[0];
  953. } else {
  954. this.bannerObj = null;
  955. }
  956. })
  957. .catch(e => {
  958. console.log("获取banner图失败");
  959. console.log(e);
  960. });
  961. },
  962. praiseFn(item, type = 0) {
  963. //点赞
  964. if (type === 0) {
  965. //点赞
  966. let params = [
  967. {
  968. uid: this.userId,
  969. type: 2,
  970. aid: item.id,
  971. json: ""
  972. }
  973. ];
  974. this.ajax
  975. .post(this.$store.state.api + "insert_appStoreSave", params)
  976. .then(res => {
  977. if (res.data) {
  978. let _likeId = res.data[0][0].id;
  979. this.dataList.find(i => i.id === item.id).likeCount += 1;
  980. this.dataList.find(i => i.id === item.id).likeId = _likeId;
  981. this.$message.success("点赞成功");
  982. }
  983. })
  984. .catch(e => {
  985. this.$message.error("点赞失败");
  986. });
  987. } else if (type === 1) {
  988. //取消点赞
  989. console.log("取消点赞👉:", item);
  990. let params = [
  991. {
  992. sid: item.likeId
  993. }
  994. ];
  995. this.ajax
  996. .post(this.$store.state.api + "delete_appStoreSave", params)
  997. .then(res => {
  998. if (res.data) {
  999. this.dataList.find(i => i.id === item.id).likeCount -= 1;
  1000. this.dataList.find(i => i.id === item.id).likeId = "";
  1001. this.$message.success("取消点赞成功");
  1002. }
  1003. })
  1004. .catch(e => {
  1005. console.log(e);
  1006. this.$message.error("取消点赞失败");
  1007. });
  1008. }
  1009. },
  1010. collectFn(item, type = 0) {
  1011. //收藏
  1012. if (type === 0) {
  1013. //收藏
  1014. console.log("收藏👉:", item);
  1015. let params = [
  1016. {
  1017. uid: this.userId,
  1018. type: 0,
  1019. aid: item.id,
  1020. json: ""
  1021. }
  1022. ];
  1023. this.ajax
  1024. .post(this.$store.state.api + "insert_appStoreSave", params)
  1025. .then(res => {
  1026. if (res.data) {
  1027. let _colletId = res.data[0][0].id;
  1028. this.dataList.find(i => i.id === item.id).collectCount += 1;
  1029. this.dataList.find(i => i.id === item.id).collectId = _colletId;
  1030. this.$message.success("收藏成功");
  1031. }
  1032. this.getCollect();
  1033. })
  1034. .catch(e => {
  1035. console.log(e);
  1036. this.getCollect();
  1037. this.$message.error("收藏失败");
  1038. });
  1039. } else if (type === 1) {
  1040. //取消收藏
  1041. console.log("取消收藏👉:", item);
  1042. let params = [
  1043. {
  1044. sid: item.collectId
  1045. }
  1046. ];
  1047. this.ajax
  1048. .post(this.$store.state.api + "delete_appStoreSave", params)
  1049. .then(res => {
  1050. if (res.data) {
  1051. this.dataList.find(i => i.id === item.id).collectCount -= 1;
  1052. this.dataList.find(i => i.id === item.id).collectId = "";
  1053. this.$message.success("取消收藏成功");
  1054. }
  1055. this.getCollect();
  1056. })
  1057. .catch(e => {
  1058. console.log(e);
  1059. this.$message.error("取消收藏失败");
  1060. this.getCollect();
  1061. });
  1062. }
  1063. }
  1064. },
  1065. mounted() {
  1066. this.getTypeList();
  1067. this.getData();
  1068. this.getCollect();
  1069. this.getRecentUse();
  1070. this.getBanner();
  1071. }
  1072. };
  1073. </script>
  1074. <style scoped>
  1075. .appManagement {
  1076. width: 100vw;
  1077. height: 100vh;
  1078. background-color: #f2f4f7;
  1079. margin: 0;
  1080. overflow: auto;
  1081. box-sizing: border-box;
  1082. padding: 20px;
  1083. display: flex;
  1084. justify-content: space-between;
  1085. }
  1086. .ac_left {
  1087. /* width: 280px;
  1088. min-width: 280px; */
  1089. width: clamp(150px, 12vw, 280px);
  1090. min-width: 150px;
  1091. margin-right: 20px;
  1092. height: 100%;
  1093. border-radius: 5px;
  1094. background-color: #fff;
  1095. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  1096. box-sizing: border-box;
  1097. padding: 10px;
  1098. overflow: auto;
  1099. }
  1100. .ac_right {
  1101. flex: 1;
  1102. min-width: 800px;
  1103. height: 100%;
  1104. overflow-y: hidden;
  1105. display: flex;
  1106. flex-direction: column;
  1107. }
  1108. .ac_header {
  1109. width: 100%;
  1110. height: auto;
  1111. border-radius: 5px;
  1112. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  1113. background-color: #fff;
  1114. }
  1115. .ac_h_top {
  1116. width: 100%;
  1117. height: 50px;
  1118. display: flex;
  1119. align-items: center;
  1120. box-sizing: border-box;
  1121. padding: 0 15px;
  1122. border-bottom: 1px solid #eeeeee;
  1123. position: relative;
  1124. justify-content: center;
  1125. }
  1126. .ac_h_top > span {
  1127. font-size: 22px;
  1128. position: relative;
  1129. margin-right: 25px;
  1130. cursor: pointer;
  1131. display: flex;
  1132. align-items: center;
  1133. }
  1134. .ac_h_top > span > svg {
  1135. width: 22px;
  1136. height: 22px;
  1137. fill: #1a1a1a;
  1138. margin-right: 10px;
  1139. }
  1140. .ac_h_t_active {
  1141. color: #0354d7;
  1142. }
  1143. .ac_h_t_active > svg {
  1144. fill: #0354d7 !important;
  1145. }
  1146. /* .ac_h_t_active::after {
  1147. content: "";
  1148. position: absolute;
  1149. width: 100%;
  1150. height: 3px;
  1151. border-radius: 4px;
  1152. background-color: #409eff;
  1153. left: 0;
  1154. bottom: -5px;
  1155. } */
  1156. .ac_h_banner {
  1157. width: 100%;
  1158. height: clamp(100px, 20vh, 300px);
  1159. border-radius: 5px;
  1160. overflow: hidden;
  1161. box-sizing: border-box;
  1162. padding: 10px;
  1163. }
  1164. .ac_h_banner > img {
  1165. width: 100%;
  1166. height: 100%;
  1167. object-fit: cover;
  1168. border-radius: 5px;
  1169. }
  1170. .ac_h_bottom {
  1171. width: 100%;
  1172. height: auto;
  1173. padding: 10px 15px 10px 15px;
  1174. box-sizing: border-box;
  1175. display: flex;
  1176. justify-content: space-between;
  1177. align-items: center;
  1178. }
  1179. .ac_h_b_typeList {
  1180. width: calc(100% - 400px);
  1181. height: auto;
  1182. display: flex;
  1183. flex-wrap: wrap;
  1184. box-sizing: border-box;
  1185. }
  1186. .ac_h_b_typeList > span {
  1187. font-size: 18px;
  1188. margin-right: 20px;
  1189. margin-top: 10px;
  1190. margin-bottom: 5px;
  1191. cursor: pointer;
  1192. }
  1193. .ac_h_b_typeList_active {
  1194. color: #007aff;
  1195. }
  1196. .ac_h_b_selectList {
  1197. margin-left: 15px;
  1198. margin-bottom: 10px;
  1199. display: flex;
  1200. align-items: center;
  1201. }
  1202. .ac_content {
  1203. width: 100%;
  1204. flex: 1;
  1205. height: auto;
  1206. margin-top: 10px;
  1207. overflow: auto;
  1208. min-height: 200px;
  1209. }
  1210. .ac_c_item {
  1211. width: calc(100% / 4 - (15px * 4) / 4);
  1212. height: 250px;
  1213. background-color: #fff;
  1214. border-radius: 10px;
  1215. /* box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); */
  1216. box-sizing: border-box;
  1217. padding: 15px;
  1218. margin-right: 15px;
  1219. margin-bottom: 15px;
  1220. float: left;
  1221. border: solid 1px #e7e7e7;
  1222. transition: .2s;
  1223. /* cursor: pointer; */
  1224. }
  1225. .ac_c_item:hover {
  1226. box-shadow: 0px 8px 10px -5px #00000014;
  1227. box-shadow: 0px 16px 24px 2px #0000000a;
  1228. box-shadow: 0px 6px 30px 5px #0000000d;
  1229. }
  1230. @media screen and (min-width: 1400px) {
  1231. .ac_c_item {
  1232. width: calc(100% / 4 - (15px * 3) / 4) !important;
  1233. }
  1234. .ac_c_item:nth-child(4n) {
  1235. margin-right: 0px !important;
  1236. /* background-color: red; */
  1237. }
  1238. }
  1239. @media screen and (max-width: 1380px) {
  1240. .ac_c_item {
  1241. width: calc(100% / 4 - (15px * 3) / 4) !important;
  1242. }
  1243. .ac_c_item:nth-child(4n) {
  1244. margin-right: 0px !important;
  1245. }
  1246. /* .ac_c_item:nth-child(5n) {
  1247. margin-right: 0 !important;
  1248. } */
  1249. }
  1250. @media screen and (max-width: 1080px) {
  1251. .ac_c_item {
  1252. width: calc(100% / 3 - (15px * 2) / 3) !important;
  1253. }
  1254. .ac_c_item:nth-child(5n) {
  1255. margin-right: 15px !important;
  1256. }
  1257. .ac_c_item:nth-of-type(4n) {
  1258. margin-right: 15px !important;
  1259. }
  1260. .ac_c_item:nth-child(3n) {
  1261. margin-right: 0 !important;
  1262. }
  1263. }
  1264. .ac_c_empty {
  1265. width: 100%;
  1266. height: 40%;
  1267. display: flex;
  1268. box-sizing: border-box;
  1269. padding-top: 2%;
  1270. justify-content: center;
  1271. /* align-items: center; */
  1272. }
  1273. .ac_c_i_top {
  1274. width: 100%;
  1275. display: flex;
  1276. height: calc(100% - 40px);
  1277. cursor: pointer;
  1278. }
  1279. .ac_c_i_t_left {
  1280. width: 100px;
  1281. min-width: 100px;
  1282. height: 100%;
  1283. box-sizing: border-box;
  1284. display: flex;
  1285. align-items: flex-start;
  1286. box-sizing: border-box;
  1287. padding: 10px;
  1288. }
  1289. .ac_c_i_t_left > svg {
  1290. width: 100%;
  1291. height: auto;
  1292. }
  1293. .ac_c_i_t_left > img {
  1294. width: 100%;
  1295. object-fit: cover;
  1296. height: 80px;
  1297. }
  1298. .ac_c_i_t_right {
  1299. flex: 1;
  1300. width: calc(100% - 100px);
  1301. height: 100%;
  1302. display: flex;
  1303. flex-direction: column;
  1304. }
  1305. .ac_c_i_t_right > div {
  1306. width: 100%;
  1307. }
  1308. .ac_c_i_t_r_top {
  1309. height: 40px;
  1310. display: flex;
  1311. align-items: flex-end;
  1312. position: relative;
  1313. font-size: 1.3em;
  1314. font-weight: bold;
  1315. box-sizing: border-box;
  1316. padding-bottom: 2px;
  1317. }
  1318. .ac_c_i_t_r_top > span {
  1319. display: block;
  1320. max-width: 100%;
  1321. white-space: nowrap;
  1322. overflow: hidden;
  1323. text-overflow: ellipsis;
  1324. }
  1325. .ac_c_i_t_popover {
  1326. width: 30px;
  1327. height: 30px;
  1328. position: absolute;
  1329. right: 0;
  1330. top: 0;
  1331. z-index: 3;
  1332. }
  1333. .ac_c_i_t_popover svg {
  1334. width: 25px;
  1335. height: 25px;
  1336. cursor: pointer;
  1337. }
  1338. .ac_c_i_t_p_box {
  1339. position: absolute;
  1340. height: auto;
  1341. top: 100%;
  1342. right: 0;
  1343. padding: 8px;
  1344. border-radius: 8px 0 8px 8px;
  1345. background-color: #fff;
  1346. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  1347. width: auto;
  1348. }
  1349. .ac_c_i_t_p_box > div {
  1350. width: 80px;
  1351. height: 30px;
  1352. cursor: pointer;
  1353. transition: 0.3s;
  1354. font-size: 0.7em;
  1355. border-radius: 5px;
  1356. font-weight: 100;
  1357. display: flex;
  1358. justify-content: center;
  1359. align-items: center;
  1360. position: relative;
  1361. box-sizing: border-box;
  1362. }
  1363. .ac_c_i_t_p_box > div:hover {
  1364. background-color: #f2f4f7;
  1365. }
  1366. .ac_c_i_t_r_center {
  1367. height: 30px;
  1368. display: flex;
  1369. justify-content: space-between;
  1370. align-items: center;
  1371. }
  1372. .ac_c_i_t_r_center > span {
  1373. display: block;
  1374. max-width: calc(100% - 80px);
  1375. white-space: nowrap;
  1376. overflow: hidden;
  1377. text-overflow: ellipsis;
  1378. }
  1379. .ac_c_i_t_r_center > div {
  1380. width: 75px;
  1381. height: 85%;
  1382. display: flex;
  1383. align-items: center;
  1384. justify-content: center;
  1385. font-size: 0.8em;
  1386. background-color: #f3f3f3;
  1387. color: #00000066;
  1388. border-radius: 3px;
  1389. }
  1390. .ac_c_i_t_r_center > div > img {
  1391. width: 16px;
  1392. height: 16px;
  1393. margin-right: 4px;
  1394. }
  1395. .ac_c_i_t_r_bottom {
  1396. max-width: 100%;
  1397. max-height: calc(100% - 30px - 40px - 20px);
  1398. margin-top: 10px;
  1399. margin-bottom: 10px;
  1400. color: #00000099;
  1401. display: -webkit-box;
  1402. -webkit-box-orient: vertical;
  1403. -webkit-line-clamp: 5;
  1404. overflow: hidden;
  1405. text-overflow: ellipsis;
  1406. }
  1407. .ac_c_i_bottom {
  1408. width: 100%;
  1409. height: 40px;
  1410. padding-top: 10px;
  1411. box-sizing: border-box;
  1412. border-top: solid 2px #e7e7e7;
  1413. display: flex;
  1414. align-items: center;
  1415. justify-content: space-between;
  1416. }
  1417. .ac_c_i_b_left {
  1418. width: 130px;
  1419. display: flex;
  1420. align-items: center;
  1421. justify-content: space-between;
  1422. overflow: auto;
  1423. height: 100%;
  1424. }
  1425. .ac_c_i_b_left > div {
  1426. /* margin-right: 20px; */
  1427. display: flex;
  1428. align-items: center;
  1429. }
  1430. .ac_c_i_b_left > div > img {
  1431. width: 22px;
  1432. height: 22px;
  1433. }
  1434. .ac_c_i_b_left > div > span {
  1435. margin-left: 5px;
  1436. color: #00000099;
  1437. cursor: default;
  1438. }
  1439. .ac_c_i_b_right {
  1440. display: flex;
  1441. align-items: center;
  1442. width: 70px;
  1443. height: 100%;
  1444. justify-content: flex-end;
  1445. }
  1446. .ac_c_i_b_right > span {
  1447. width: 60px;
  1448. height: 100%;
  1449. border-radius: 4px;
  1450. display: flex;
  1451. justify-content: center;
  1452. align-items: center;
  1453. }
  1454. .ac_c_i_b_r_type1 {
  1455. background-color: #17c469;
  1456. color: #fff;
  1457. }
  1458. .ac_c_i_b_r_type2 {
  1459. background-color: #ffcf33;
  1460. color: #000;
  1461. }
  1462. /* .ac_c_i_top {
  1463. width: 100%;
  1464. height: 50px;
  1465. display: flex;
  1466. position: relative;
  1467. }
  1468. .ac_c_i_t_popover {
  1469. width: 30px;
  1470. height: 30px;
  1471. position: absolute;
  1472. right: 0;
  1473. top: 0;
  1474. }
  1475. .ac_c_i_t_popover svg {
  1476. width: 25px;
  1477. height: 25px;
  1478. cursor: pointer;
  1479. }
  1480. .ac_c_i_t_p_box {
  1481. position: absolute;
  1482. height: auto;
  1483. top: 100%;
  1484. right: 0;
  1485. padding: 8px;
  1486. border-radius: 8px 0 8px 8px;
  1487. background-color: #fff;
  1488. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  1489. width: auto;
  1490. }
  1491. .ac_c_i_t_p_box > div {
  1492. width: 80px;
  1493. height: 30px;
  1494. cursor: pointer;
  1495. transition: 0.3s;
  1496. font-weight: bold;
  1497. font-size: 0.9em;
  1498. border-radius: 5px;
  1499. display: flex;
  1500. justify-content: center;
  1501. align-items: center;
  1502. position: relative;
  1503. box-sizing: border-box;
  1504. }
  1505. .ac_c_i_t_p_box > div:hover {
  1506. background-color: #f2f4f7;
  1507. }
  1508. .ac_c_i_t_left {
  1509. width: 50px;
  1510. height: 50px;
  1511. border-radius: 8px;
  1512. margin-right: 10px;
  1513. box-sizing: border-box;
  1514. padding: 5px;
  1515. }
  1516. .ac_c_i_t_left > svg {
  1517. width: 100%;
  1518. height: 100%;
  1519. }
  1520. .ac_c_i_t_left > span {
  1521. width: 100%;
  1522. height: 100%;
  1523. display: block;
  1524. }
  1525. .ac_c_i_t_left > span >>> svg {
  1526. width: 100%;
  1527. height: 100%;
  1528. }
  1529. .ac_c_i_t_right {
  1530. width: calc(100% - 60px);
  1531. height: 100%;
  1532. display: flex;
  1533. flex-direction: column;
  1534. justify-content: space-evenly;
  1535. }
  1536. .ac_c_i_t_right > div {
  1537. font-size: 1.4em;
  1538. font-weight: bold;
  1539. max-width: 100%;
  1540. overflow: hidden;
  1541. text-overflow: ellipsis;
  1542. white-space: nowrap;
  1543. }
  1544. .ac_c_i_t_right > span {
  1545. font-size: 1.1em;
  1546. color: #8991a1;
  1547. display: block;
  1548. max-width: 100%;
  1549. overflow: hidden;
  1550. text-overflow: ellipsis;
  1551. white-space: nowrap;
  1552. }
  1553. .ac_c_i_bottom {
  1554. width: 100%;
  1555. height: calc(100% - 60px);
  1556. margin-top: 15px;
  1557. }
  1558. .ac_c_i_bottom > div {
  1559. font-size: 1em;
  1560. color: #8991a1;
  1561. width: 100%;
  1562. height: calc(100%);
  1563. display: -webkit-box;
  1564. display: block;
  1565. overflow: hidden;
  1566. text-overflow: ellipsis;
  1567. -webkit-line-clamp: 8;
  1568. -webkit-box-orient: vertical;
  1569. }
  1570. .ac_c_i_bottom > span {
  1571. margin-top: 5px;
  1572. font-size: 1em;
  1573. color: #409eff;
  1574. overflow: hidden;
  1575. display: block;
  1576. text-overflow: ellipsis;
  1577. white-space: nowrap;
  1578. cursor: pointer;
  1579. } */
  1580. </style>