appManagement.vue 50 KB

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