123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829 |
- <template>
- <div>
- <el-dialog
- title="权限设置"
- class="permissionSettingDialog"
- :visible.sync="show"
- :close-on-click-modal="false"
- width="1400px"
- top="8vh"
- >
- <div v-loading="loading" class="ps_area">
- <div class="pa_a_head">
- <div class="pa_a_h_tag">
- <span
- :class="{ pa_a_h_active: tagType == 'basics' }"
- @click="changeTagType('basics')"
- >基本信息</span
- >
- <span
- :class="{ pa_a_h_active: tagType == 'desktop' }"
- @click="changeTagType('desktop')"
- >桌面</span
- >
- <span
- :class="{ pa_a_h_active: tagType == 'admin-banner' }"
- @click="changeTagType('admin-banner')"
- >平台Banner</span
- >
- <span
- :class="{ pa_a_h_active: tagType == 'admin-index' }"
- @click="changeTagType('admin-index')"
- >平台首页</span
- >
- <span
- :class="{ pa_a_h_active: tagType == 'admin-cocoFlow' }"
- @click="changeTagType('admin-cocoFlow')"
- >平台首页CocoFlow</span
- >
- <span
- :class="{ pa_a_h_active: tagType == 'admin-cocoFlow2' }"
- @click="changeTagType('admin-cocoFlow2')"
- >平台首页CocoFlow2</span
- >
- <span
- :class="{ pa_a_h_active: tagType == 'admin-sidebar' }"
- @click="changeTagType('admin-sidebar')"
- >平台侧边栏</span
- >
- <span
- :class="{ pa_a_h_active: tagType == 'admin-school' }"
- @click="changeTagType('admin-school')"
- v-if="type == 'org'"
- >学校设置</span
- >
- <span
- :class="{ pa_a_h_active: tagType == 'admin-feature' }"
- @click="changeTagType('admin-feature')"
- >校区特色</span
- >
- <!-- v-if="data.parentid" -->
- </div>
- <div class="ea_add">
- <el-button
- size="mini"
- v-if="['admin-sidebar', 'admin-school'].includes(tagType)"
- type="primary"
- @click="addMenu(tagType)"
- >添加菜单</el-button
- >
- <el-button
- size="mini"
- v-if="['admin-banner'].includes(tagType)"
- type="primary"
- @click="addBanner()"
- >添加Banner</el-button
- >
- <el-button
- size="mini"
- v-if="['admin-cocoFlow', 'admin-cocoFlow2','admin-feature'].includes(tagType)"
- type="primary"
- @click="addApp()"
- >添加应用</el-button
- >
- <el-button
- size="mini"
- v-if="
- ['desktop', 'admin-index', 'admin-sidebar'].includes(tagType)
- "
- type="primary"
- @click="addTool(tagType)"
- >添加工具</el-button
- >
- </div>
- </div>
- <div class="pa_a_editBox">
- <div class="editArea pa_a_eb_basics" v-show="tagType == 'basics'">
- <div class="ea_basics_input">
- <span>标题</span>
- <el-input
- v-model="form.basics.title"
- placeholder="请输入标题内容"
- ></el-input>
- </div>
- <div class="ea_basics_input">
- <span>简介</span>
- <el-input
- v-model="form.basics.brief"
- placeholder="请输入简介内容"
- ></el-input>
- </div>
- <div class="ea_basics_logo">
- <span>logo</span>
- <el-tooltip
- class="item"
- effect="dark"
- :content="form.basics.logo ? '更改图标' : '上传图标'"
- placement="top"
- >
- <el-image
- style="width: 60px; height: 60px; margin-left: 20px"
- :src="form.basics.logo"
- fit="cover"
- @click="addBasicsIcon('logo')"
- >
- <div
- slot="error"
- class="image-slot"
- @click="addBasicsIcon('logo')"
- >
- <i class="el-icon-picture-outline"></i>
- </div>
- </el-image>
- </el-tooltip>
- </div>
- <div class="ea_basics_logo">
- <span>登录页logo</span>
- <el-tooltip
- class="item"
- effect="dark"
- :content="form.basics.loginLogo ? '更改图标' : '上传图标'"
- placement="top"
- >
- <el-image
- style="width: 60px; height: 60px; margin-left: 20px"
- :src="form.basics.loginLogo"
- fit="cover"
- @click="addBasicsIcon('loginLogo')"
- >
- <div
- slot="error"
- class="image-slot"
- @click="addBasicsIcon('loginLogo')"
- >
- <i class="el-icon-picture-outline"></i>
- </div>
- </el-image>
- </el-tooltip>
- </div>
- <div class="ea_basics_logo">
- <span>登录页banner</span>
- <el-tooltip
- class="item"
- effect="dark"
- :content="form.basics.loginBanner ? '更改' : '上传'"
- placement="top"
- >
- <el-image
- style="width: 60px; height: 60px; margin-left: 20px"
- :src="form.basics.loginBanner"
- fit="cover"
- @click="addBasicsIcon('loginBanner')"
- >
- <div
- slot="error"
- class="image-slot"
- @click="addBasicsIcon('loginBanner')"
- >
- <i class="el-icon-picture-outline"></i>
- </div>
- </el-image>
- </el-tooltip>
- </div>
- <div class="ea_basics_logo">
- <span>CocoFlow图标</span>
- <el-tooltip
- class="item"
- effect="dark"
- :content="form.basics.cocoFlow ? '更改图标' : '上传图标'"
- placement="top"
- >
- <el-image
- style="width: 60px; height: 60px; margin-left: 20px"
- :src="form.basics.cocoFlow"
- fit="cover"
- @click="addBasicsIcon('cocoFlow')"
- >
- <div
- slot="error"
- class="image-slot"
- @click="addBasicsIcon('cocoFlow')"
- >
- <i class="el-icon-picture-outline"></i>
- </div>
- </el-image>
- </el-tooltip>
- </div>
- </div>
- <div class="editArea pa_a_eb_desktop" v-show="tagType == 'desktop'">
- <div class="ea_table">
- <el-table
- :data="form.desktop.list"
- stripe
- border
- style="width: 100%"
- :header-cell-style="headerCellStyle"
- >
- <el-table-column
- label="标识"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.toolId ? scope.row.toolId : "-"
- }}</template>
- </el-table-column>
- <!-- <el-table-column
- label="宽度"
- min-width="45"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.dialogWidth ? scope.row.dialogWidth : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="高度"
- min-width="45"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.dialogHeight ? scope.row.dialogHeight : "-"
- }}</template>
- </el-table-column> -->
- <el-table-column
- label="描述"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.description ? scope.row.description : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="工具设置"
- min-width="80"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-popover placement="bottom" width="840" trigger="hover">
- <div class="urlItemBox">
- <div
- class="urlItem"
- v-for="(item, index) in scope.row.url"
- :key="scope.row.id + '-' + index"
- >
- <span>{{ item.region }}</span>
- <div class="ui_message">
- <div>名称:{{ item.name ? item.name : "-" }}</div>
- <div>
- <span>链接:</span
- ><a
- :href="item.url"
- v-if="item.url"
- target="_blank"
- >{{ item.url }}</a
- ><span v-else>-</span>
- </div>
- <div>
- <span>桌面图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.icon"
- style="width: 100%; height: 100%"
- :src="item.icon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>平台图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.platformIcon"
- style="width: 100%; height: 100%"
- :src="item.platformIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>默认图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.defaultIcon"
- style="width: 100%; height: 100%"
- :src="item.defaultIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>激活图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.activeIcon"
- style="width: 100%; height: 100%"
- :src="item.activeIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>hover图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.hoverIcon"
- style="width: 100%; height: 100%"
- :src="item.hoverIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <el-button slot="reference" size="small"
- >查看设置</el-button
- >
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- label="仅管理员显示"
- min-width="80"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.isAdmin == "1" ? "是" : "否"
- }}</template>
- </el-table-column>
- <el-table-column
- label="操作"
- width="200px"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <button
- @click="moveUp(scope.row)"
- v-if="scope.$index > 0"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 上移
- </button>
- <button
- @click="moveDown(scope.row)"
- v-if="form.desktop.list.length - 1 > scope.$index"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 下移
- </button>
- <button
- @click="del(scope.row)"
- style="
- color: #ff2570;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 删除
- </button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="editArea appList" v-show="tagType == 'admin-cocoFlow'">
- <template v-if="form.admin.cocoFlow">
- <div
- class="appItem"
- v-for="(item, index) in form.admin.cocoFlow"
- :key="item.id"
- >
- <div class="ai_left">
- <el-image
- style="width: 100%; height: 100%; cursor: pointer"
- :src="item.setIcon ? item.setIcon : item.json.icon"
- fit="cover"
- @click="updateIconCocoFLow(index)"
- ></el-image>
- </div>
- <div class="ai_right">
- <div>{{ item.name }}</div>
- <div class="ai_r_btn">
- <svg
- @click="moveApp(item.id, 0)"
- v-if="index != 0"
- t="1744598539024"
- class="icon"
- viewBox="0 0 1470 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2613"
- width="200"
- height="200"
- >
- <path
- d="M664.965051 36.390373L20.010522 880.212016c-44.471546 58.191134-2.978155 142.114864 70.271066 142.114863h1289.8254c73.232489 0 114.725879-83.923729 70.271065-142.114863L805.473719 36.390373a88.441155 88.441155 0 0 0-140.508668 0z"
- p-id="2614"
- ></path>
- </svg>
- <svg
- @click="moveApp(item.id, 1)"
- v-if="index != form.admin.cocoFlow.length - 1"
- style="transform: rotate(180deg)"
- t="1744598539024"
- class="icon"
- viewBox="0 0 1470 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2613"
- width="200"
- height="200"
- >
- <path
- d="M664.965051 36.390373L20.010522 880.212016c-44.471546 58.191134-2.978155 142.114864 70.271066 142.114863h1289.8254c73.232489 0 114.725879-83.923729 70.271065-142.114863L805.473719 36.390373a88.441155 88.441155 0 0 0-140.508668 0z"
- p-id="2614"
- ></path>
- </svg>
- </div>
- <span>{{ item.detail }}</span>
- </div>
- </div>
- </template>
- </div>
- <div class="editArea appList" v-show="tagType == 'admin-cocoFlow2'">
- <template v-if="form.admin.cocoFlow2">
- <div
- class="appItem"
- v-for="(item, index) in form.admin.cocoFlow2"
- :key="item.id"
- >
- <div class="ai_left">
- <el-image
- style="width: 100%; height: 100%; cursor: pointer"
- :src="item.setIcon ? item.setIcon : item.json.icon"
- fit="cover"
- @click="updateIconCocoFLow(index)"
- ></el-image>
- </div>
- <div class="ai_right">
- <div>{{ item.name }}</div>
- <div class="ai_r_btn">
- <svg
- @click="moveApp(item.id, 0)"
- v-if="index != 0"
- t="1744598539024"
- class="icon"
- viewBox="0 0 1470 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2613"
- width="200"
- height="200"
- >
- <path
- d="M664.965051 36.390373L20.010522 880.212016c-44.471546 58.191134-2.978155 142.114864 70.271066 142.114863h1289.8254c73.232489 0 114.725879-83.923729 70.271065-142.114863L805.473719 36.390373a88.441155 88.441155 0 0 0-140.508668 0z"
- p-id="2614"
- ></path>
- </svg>
- <svg
- @click="moveApp(item.id, 1)"
- v-if="index != form.admin.cocoFlow2.length - 1"
- style="transform: rotate(180deg)"
- t="1744598539024"
- class="icon"
- viewBox="0 0 1470 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2613"
- width="200"
- height="200"
- >
- <path
- d="M664.965051 36.390373L20.010522 880.212016c-44.471546 58.191134-2.978155 142.114864 70.271066 142.114863h1289.8254c73.232489 0 114.725879-83.923729 70.271065-142.114863L805.473719 36.390373a88.441155 88.441155 0 0 0-140.508668 0z"
- p-id="2614"
- ></path>
- </svg>
- </div>
- <span>{{ item.detail }}</span>
- </div>
- </div>
- </template>
- </div>
- <div
- class="editArea pa_a_eb_admin-index"
- v-show="tagType == 'admin-index'"
- >
- <div class="ea_table">
- <el-table
- :data="form.admin.index.list"
- stripe
- border
- style="width: 100%"
- :header-cell-style="headerCellStyle"
- >
- <el-table-column
- label="标识"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.toolId ? scope.row.toolId : "-"
- }}</template>
- </el-table-column>
- <!-- <el-table-column
- label="宽度"
- min-width="45"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.dialogWidth ? scope.row.dialogWidth : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="高度"
- min-width="45"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.dialogHeight ? scope.row.dialogHeight : "-"
- }}</template>
- </el-table-column> -->
- <el-table-column
- label="描述"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.description ? scope.row.description : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="工具设置"
- min-width="80"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-popover placement="bottom" width="840" trigger="hover">
- <div class="urlItemBox">
- <div
- class="urlItem"
- v-for="(item, index) in scope.row.url"
- :key="scope.row.id + '-' + index"
- >
- <span>{{ item.region }}</span>
- <div class="ui_message">
- <div>名称:{{ item.name ? item.name : "-" }}</div>
- <div>
- <span>链接:</span
- ><a
- :href="item.url"
- v-if="item.url"
- target="_blank"
- >{{ item.url }}</a
- ><span v-else>-</span>
- </div>
- <div>
- <span>桌面图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.icon"
- style="width: 100%; height: 100%"
- :src="item.icon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>平台图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.platformIcon"
- style="width: 100%; height: 100%"
- :src="item.platformIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>默认图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.defaultIcon"
- style="width: 100%; height: 100%"
- :src="item.defaultIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>激活图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.activeIcon"
- style="width: 100%; height: 100%"
- :src="item.activeIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>hover图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.hoverIcon"
- style="width: 100%; height: 100%"
- :src="item.hoverIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <el-button slot="reference" size="small"
- >查看设置</el-button
- >
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- label="仅管理员显示"
- min-width="80"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.isAdmin == "1" ? "是" : "否"
- }}</template>
- </el-table-column>
- <el-table-column
- label="操作"
- width="200px"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <button
- @click="moveUp(scope.row)"
- v-if="scope.$index > 0"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 上移
- </button>
- <button
- @click="moveDown(scope.row)"
- v-if="form.admin.index.list.length - 1 > scope.$index"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 下移
- </button>
- <button
- @click="del(scope.row)"
- style="
- color: #ff2570;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 删除
- </button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div
- class="editArea pa_a_eb_admin-index"
- v-show="tagType == 'admin-banner'"
- >
- <div class="ea_table">
- <el-table
- :data="form.admin.banner"
- stripe
- border
- style="width: 100%"
- :header-cell-style="headerCellStyle"
- >
- <el-table-column
- label="标题"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.title ? scope.row.title : "-"
- }}</template>
- </el-table-column>
- <el-table-column label="图片" width="450">
- <template slot-scope="scope">
- <el-image
- :src="scope.row.src"
- v-if="scope.row.src"
- style="width: 400px; height: 200px"
- ></el-image>
- <span v-else>-</span>
- </template>
- </el-table-column>
- <el-table-column
- label="跳转链接"
- width="80"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-tooltip
- class="item"
- effect="dark"
- :content="scope.row.url"
- placement="top"
- v-if="scope.row.url"
- >
- <a :href="scope.row.url" target="_blank">点击跳转</a>
- </el-tooltip>
- <span v-else>-</span>
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- width="250px"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <button
- @click="editBanner(scope.row)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 修改
- </button>
- <button
- @click="moveUp(scope.row)"
- v-if="scope.$index > 0"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 上移
- </button>
- <button
- @click="moveDown(scope.row)"
- v-if="form.admin.banner.length - 1 > scope.$index"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 下移
- </button>
- <button
- @click="del(scope.row)"
- style="
- color: #ff2570;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 删除
- </button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div
- class="editArea pa_a_eb_admin-sidebar"
- v-show="tagType == 'admin-sidebar'"
- >
- <div class="ea_table">
- <el-table
- :data="form.admin.sidebar.list"
- stripe
- border
- style="width: 100%"
- row-key="typeId"
- :header-cell-style="headerCellStyle"
- :tree-props="{
- children: 'children',
- hasChildren: 'hasChildren',
- }"
- >
- <el-table-column
- label="标识"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.toolId ? scope.row.toolId : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="描述"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.description ? scope.row.description : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="菜单名称"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.menuName ? scope.row.menuName : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="菜单默认图标"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-image
- v-if="scope.row.menuIcon"
- style="width: 50px; height: 50px"
- :src="scope.row.menuIcon"
- fit="cover"
- >
- <div slot="error" class="image-slot">
- <i class="el-icon-picture-outline"></i>
- </div>
- </el-image>
- <span v-else>-</span>
- </template>
- </el-table-column>
- <el-table-column
- label="菜单激活图标"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-image
- v-if="scope.row.menuActiveIcon"
- style="width: 50px; height: 50px"
- :src="scope.row.menuActiveIcon"
- fit="cover"
- >
- <div slot="error" class="image-slot">
- <i class="el-icon-picture-outline"></i>
- </div>
- </el-image>
- <span v-else>-</span>
- </template>
- </el-table-column>
- <el-table-column
- label="工具设置"
- min-width="110"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-popover
- placement="bottom"
- width="840"
- trigger="hover"
- v-if="scope.row.url"
- >
- <div class="urlItemBox">
- <div
- class="urlItem"
- v-for="(item, index) in scope.row.url"
- :key="scope.row.id + '-' + index"
- >
- <span>{{ item.region }}</span>
- <div class="ui_message">
- <div>名称:{{ item.name ? item.name : "-" }}</div>
- <div>
- <span>链接:</span
- ><a
- :href="item.url"
- v-if="item.url"
- target="_blank"
- >{{ item.url }}</a
- ><span v-else>-</span>
- </div>
- <div>
- <span>桌面图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.icon"
- style="width: 100%; height: 100%"
- :src="item.icon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>平台图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.platformIcon"
- style="width: 100%; height: 100%"
- :src="item.platformIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>默认图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.defaultIcon"
- style="width: 100%; height: 100%"
- :src="item.defaultIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>激活图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.activeIcon"
- style="width: 100%; height: 100%"
- :src="item.activeIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- <div>
- <span>hover图标:</span>
- <div class="ui_m_image">
- <el-image
- v-if="item.hoverIcon"
- style="width: 100%; height: 100%"
- :src="item.hoverIcon"
- fit="cover"
- ></el-image>
- <span v-else>-</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <el-button slot="reference" size="small"
- >查看设置</el-button
- >
- </el-popover>
- <span v-else>-</span>
- </template>
- </el-table-column>
- <el-table-column
- label="仅管理员显示"
- min-width="80"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <span v-if="scope.row.isAdmin">{{
- scope.row.isAdmin == "1" ? "是" : "否"
- }}</span>
- <span v-else>-</span>
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- width="320px"
- fixed="right"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <button
- @click="addToolSidebar(scope.row.id)"
- v-if="scope.row.menuName"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 添加工具
- </button>
- <button
- @click="editMenu(scope.row)"
- v-if="scope.row.menuName"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 修改
- </button>
- <button
- @click="moveUp(scope.row, scope.row.typeId)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 上移
- </button>
- <button
- @click="moveDown(scope.row, scope.row.typeId)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 下移
- </button>
- <button
- @click="del(scope.row, scope.row.typeId)"
- style="
- color: #ff2570;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 删除
- </button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div
- class="editArea pa_a_eb_admin-sidebar"
- v-show="tagType == 'admin-school'"
- >
- <div class="ea_table">
- <el-table
- :data="form.admin.school.list"
- stripe
- border
- style="width: 100%"
- row-key="typeId"
- :header-cell-style="headerCellStyle"
- :tree-props="{
- children: 'children',
- hasChildren: 'hasChildren',
- }"
- >
- <el-table-column
- label="菜单名称"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.menuName ? scope.row.menuName : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="菜单默认图标"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-image
- v-if="scope.row.menuIcon"
- style="width: 50px; height: 50px"
- :src="scope.row.menuIcon"
- fit="cover"
- >
- <div slot="error" class="image-slot">
- <i class="el-icon-picture-outline"></i>
- </div>
- </el-image>
- <span v-else>-</span>
- </template>
- </el-table-column>
- <el-table-column
- label="学校名称"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.name ? scope.row.name : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="编码"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.code ? scope.row.code : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="组织名称"
- min-width="300"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.orgName ? scope.row.orgName : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="操作"
- width="320px"
- fixed="right"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <button
- @click="addSchool(scope.row.id)"
- v-if="scope.row.menuName"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 添加学校
- </button>
- <button
- @click="editMenu(scope.row)"
- v-if="scope.row.s"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 修改
- </button>
- <button
- @click="moveUp(scope.row, scope.row.typeId)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 上移
- </button>
- <button
- @click="moveDown(scope.row, scope.row.typeId)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 下移
- </button>
- <button
- @click="del(scope.row, scope.row.typeId)"
- style="
- color: #ff2570;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 删除
- </button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="editArea pa_a_eb_feature" v-show="tagType == 'admin-feature'">
- <div class="ea_appList">
- <div class="ea_appListTit">集团简介</div>
- <el-input
- type="textarea"
- :rows="2"
- resize="none"
- placeholder="请输入内容"
- v-model="form.admin.CampusF.GroupBri">
- </el-input>
- </div>
- <div class="ea_appList">
- <div class="ea_appListTit">办学特色</div>
- <el-table
- :data="form.admin.CampusF.feature"
- stripe
- border
- style="width: 100%"
- :header-cell-style="headerCellStyle"
- >
- <el-table-column
- label="icon"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <img style="height: 30px;width: 30px;object-fit: cover;" :src="scope.row.icon" alt="">
- </template>
- </el-table-column>
- <el-table-column
- label="标题"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.name ? scope.row.name : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="简介"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.bri ? scope.row.bri : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="修改"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <button
- @click="editRunS(scope.$index,scope.row,0)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 修改
- </button>
- <button
- v-if="form.admin.CampusF.feature.length > 1"
- @click="delFe(scope.$index,0)"
- style="
- color: red;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 删除
- </button>
- <button
- v-if="scope.$index == form.admin.CampusF.feature.length - 1"
- @click="addCon(0)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 添加
- </button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="ea_appList">
- <div class="ea_appListTit">师资力量</div>
- <el-input
- style="margin-bottom: 10px;"
- type="textarea"
- :rows="2"
- resize="none"
- placeholder="请输入描述"
- v-model="form.admin.CampusF.teacherN.teaBri">
- </el-input>
- <el-table
- :data="form.admin.CampusF.teacherN.list"
- stripe
- border
- style="width: 100%"
- :header-cell-style="headerCellStyle"
- >
- <el-table-column
- label="标题"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.name ? scope.row.name : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="简介"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">{{
- scope.row.bri ? scope.row.bri : "-"
- }}</template>
- </el-table-column>
- <el-table-column
- label="修改"
- min-width="200"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <button
- @click="editRunS(scope.$index,scope.row,1)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 修改
- </button>
- <button
- v-if="form.admin.CampusF.teacherN.list.length > 1"
- @click="delFe(scope.$index,1)"
- style="
- color: red;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 删除
- </button>
- <button
- v-if="scope.$index == form.admin.CampusF.teacherN.list.length - 1"
- @click="addCon(1)"
- style="
- color: #308fff;
- background: none;
- border: none;
- cursor: pointer;
- margin-left: 25px;
- "
- >
- 添加
- </button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="ea_appList">
- <div class="ea_appListTit">
- 特色应用
- </div>
- <div style="display: flex;flex-wrap: wrap;">
- <template v-if="form.admin.CampusF.appList.length">
- <div
- class="appItem"
- v-for="(item, index) in form.admin.CampusF.appList"
- :key="item.id"
- >
- <div class="ai_left">
- <el-image
- style="width: 100%; height: 100%; cursor: pointer"
- :src="item.setIcon ? item.setIcon : item.json.icon"
- fit="cover"
- @click="updateIconCocoFLow(index)"
- ></el-image>
- </div>
- <div class="ai_right">
- <div>{{ item.name }}</div>
- <div class="ai_r_btn">
- <svg
- @click="moveApp(item.id, 0)"
- v-if="index != 0"
- t="1744598539024"
- class="icon"
- viewBox="0 0 1470 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2613"
- width="200"
- height="200"
- >
- <path
- d="M664.965051 36.390373L20.010522 880.212016c-44.471546 58.191134-2.978155 142.114864 70.271066 142.114863h1289.8254c73.232489 0 114.725879-83.923729 70.271065-142.114863L805.473719 36.390373a88.441155 88.441155 0 0 0-140.508668 0z"
- p-id="2614"
- ></path>
- </svg>
- <svg
- @click="moveApp(item.id, 1)"
- v-if="index != form.admin.cocoFlow.length - 1"
- style="transform: rotate(180deg)"
- t="1744598539024"
- class="icon"
- viewBox="0 0 1470 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2613"
- width="200"
- height="200"
- >
- <path
- d="M664.965051 36.390373L20.010522 880.212016c-44.471546 58.191134-2.978155 142.114864 70.271066 142.114863h1289.8254c73.232489 0 114.725879-83.923729 70.271065-142.114863L805.473719 36.390373a88.441155 88.441155 0 0 0-140.508668 0z"
- p-id="2614"
- ></path>
- </svg>
- </div>
- <span>{{ item.detail }}</span>
- </div>
- </div>
- </template>
- </div>
-
- </div>
- </div>
- </div>
- </div>
- <!-- 按钮区域 -->
- <div slot="footer" class="el-dialog__footer">
- <el-button @click="close()">取 消</el-button>
- <el-button type="primary" @click="submit()">确认</el-button>
- </div>
- </el-dialog>
- <selectToolDialog ref="selectToolDialogRef" @success="selectToolSuccess" />
- <addMenuDialog ref="addMenuDialogRef" @success="addMenuSuccess" />
- <selectAppDialog ref="selectAppDialogRef" @success="selectAppSuccess" />
- <addBannerDialog ref="addBannerDialogRef" @success="addBannerSuccess" />
- <selectSchoolDialog
- ref="selectSchoolDialogRef"
- @success="selectSchoolSuccess"
- :id="data ? data.id : ''"
- />
- <addCampusDialog ref="addCampusDialogRef" @success="addCampusSuccess" />
- </div>
- </template>
- <script>
- import "@/common/aws-sdk-2.235.1.min.js";
- import selectToolDialog from "./selectToolDialog.vue";
- import { API_CONFIG } from "@/common/apiConfig";
- import addMenuDialog from "./addMenuDialog.vue";
- import { addOp } from "@/api/user";
- import { mapGetters } from "vuex";
- import selectAppDialog from "./selectAppDialog.vue";
- import selectSchoolDialog from "./selectSchoolDialog.vue";
- import addBannerDialog from "./addBannerDialog";
- import addCampusDialog from "./addCampusDialog";
- export default {
- components: {
- selectToolDialog,
- addMenuDialog,
- selectAppDialog,
- addBannerDialog,
- selectSchoolDialog,
- addCampusDialog
- },
- computed: {
- ...mapGetters(["userid"]),
- },
- data() {
- return {
- show: false,
- loading: false,
- data: null,
- type: null,
- tagType: "basics",
- addToolIndex: null,
- toolList: [],
- appList: [],
- form: {
- basics: {
- title: "",
- brief: "",
- logo: "",
- loginLogo: "",
- loginBanner: "",
- cocoFlow:"",
- },
- //桌面 管理平台首页 管理平台侧边栏
- desktop: {
- list: [],
- },
- // 修改小区特色信息
- CampusData:'',
- CampusType:0,
- // 0 办学特色 1 师资力量
- CampusNum:0,
- admin: {
- index: {
- list: [],
- cocoFlow: [],
- },
- sidebar: {
- list: [],
- },
- school: {
- list: [],
- },
- CampusF: {
- GroupBri:'',
- feature:[],
- teacherN:{
- teaBri:'',
- list: [],
- },
- appList: [],
- },
- },
- },
- };
- },
- methods: {
- delFe(index,type){
- if (type == 0) {
- this.form.admin.CampusF.feature.splice(index,1)
- }else{
- this.form.admin.CampusF.teacherN.list.splice(index,1)
- }
- },
- addCon(type){
-
- if (type == 0) {
-
- this.CampusNum = this.form.admin.CampusF.feature.length
- this.CampusType = type
- this.$refs.addCampusDialogRef.open({bri:'',icon:'',name:''}, type);
- }else{
-
- this.CampusNum = this.form.admin.CampusF.teacherN.list.length
- this.CampusType = type
- this.$refs.addCampusDialogRef.open({bri:'',name:''}, type);
- }
-
- },
- // 修改 0办学特色 1师资力量
- editRunS(index,val,type){
- this.CampusData = val
- this.CampusType = type
- this.CampusNum = index
- this.$refs.addCampusDialogRef.open(val, type);
- },
- // 修改数据0办学特色 1师资力量
- addCampusSuccess(val){
- if (this.CampusType == 0) {
- this.form.admin.CampusF.feature.splice(this.CampusNum,1,val.item)
- }else{
- this.form.admin.CampusF.teacherN.list.splice(this.CampusNum,1,val.item)
- }
- },
- open(data, type) {
- this.init();
- let _data = JSON.parse(JSON.stringify(data));
- console.log('_data',_data);
- if (_data.json) {
- let _form = JSON.parse(_data.json);
- if (!_form.admin.school) {
- _form.admin.school = { list: [] };
- }
- if (!_form.admin.CampusF) {
- _form.admin.CampusF = {
- GroupBri:'',
- feature:[
- {icon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/tese1745913146000.svg',
- name:'默认标题',bri:'暂无简介'},
- ],
- teacherN:{
- teaBri:'',
- list: [
- {name:'默认标题',bri:'暂无简介'}
- ],
- },
- appList: [],
- };
- }
- this.form = _form;
- }
- Promise.all([this.getToolData(), this.getAppData()])
- .then(() => {
- this.setDataListToo(this.toolList, this.appList);
- })
- .catch((e) => {
- console.log("👉", e);
- });
- this.data = _data;
- this.type = type;
- this.show = true;
- },
- close() {
- this.show = false;
- this.init();
- },
- init() {
- this.form = {
- basics: {
- title: "",
- brief: "",
- logo: "",
- loginLogo: "",
- loginBanner: "",
- cocoFlow:"",
- },
- //桌面 管理平台首页 管理平台侧边栏
- desktop: {
- list: [],
- },
- admin: {
- index: {
- list: [],
- cocoFlow: [],
- },
- sidebar: {
- list: [],
- },
- school: {
- list: [],
- },
- CampusF: {
- GroupBri:'',
- feature:[
- {icon:'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/tese1745913146000.svg',
- name:'默认标题',bri:'暂无简介'},
- ],
- teacherN:{
- teaBri:'',
- list: [
- {name:'默认标题',bri:'暂无简介'}
- ],
- },
- appList: [],
- },
- },
- };
- this.type = null;
- this.data = null;
- this.tagType = "basics";
- },
- submit() {
- // this.close();
- console.log(this.form);
- this.setJson();
- },
- async addBasicsIcon(type = "logo") {
- let _url = await this.uploadFile("image/*");
- if (_url) {
- this.form.basics[type] = _url;
- this.$forceUpdate();
- console.log(this.form);
- await addOp({
- uid: this.userid,
- cid: this.data.id,
- type: "user_op",
- content: `修改了${this.data.name}的基本信息的${type}`,
- });
- } else {
- return console.log("无图片");
- }
- },
- uploadFile(accept = "*") {
- return new Promise((resolve) => {
- const input = document.createElement("input");
- input.type = "file";
- input.accept = accept;
- input.onchange = (event) => {
- const file = event.target.files[0];
- if (file) {
- let credentials = {
- accessKeyId: "AKIATLPEDU37QV5CHLMH",
- secretAccessKey: "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",
- }; //秘钥形式的登录上传
- window.AWS.config.update(credentials);
- window.AWS.config.region = "cn-northwest-1"; //设置区域
- let bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
- // let _name = file.name;
- // let size = file.size;
- let params = {
- Key:
- file.name.split(".")[0] +
- new Date().getTime() +
- "." +
- file.name.split(".")[file.name.split(".").length - 1],
- ContentType: file.type,
- Body: file,
- "Access-Control-Allow-Credentials": "*",
- ACL: "public-read",
- }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
- let options = {
- partSize: 2048 * 1024 * 1024,
- queueSize: 2,
- leavePartsOnError: true,
- };
- bucket
- .upload(params, options)
- .on("httpUploadProgress", (evt) => {
- console.log(evt);
- })
- .send((err, data) => {
- if (err) {
- this.$message.error("上传失败");
- return resolve("");
- } else {
- return resolve(data.Location);
- }
- });
- } else {
- resolve("");
- }
- };
- input.click();
- });
- },
- changeTagType(newType) {
- this.tagType = newType;
- },
- addTool(type) {
- let selectList = [];
- if (type == "desktop") selectList = this.form.desktop.list;
- if (type == "admin-index") selectList = this.form.admin.index.list;
- if (type == "admin-sidebar") selectList = this.form.admin.sidebar.list;
- this.$refs.selectToolDialogRef.open(
- selectList,
- type,
- ["admin-index", "admin-sidebar"].includes(type)
- ? this.form.desktop.list
- : []
- );
- },
- async selectToolSuccess([_list, type]) {
- console.log(type, "===", _list);
- let list = _list;
- if (type == "desktop") {
- this.form.desktop.list = list;
- this.$refs.selectToolDialogRef.close();
- await addOp({
- uid: this.userid,
- cid: this.data.id,
- type: "user_op",
- content: `修改了${this.data.name}的桌面端工具`,
- });
- } else if (type == "admin-index") {
- this.form.admin.index.list = list;
- this.$refs.selectToolDialogRef.close();
- await addOp({
- uid: this.userid,
- cid: this.data.id,
- type: "user_op",
- content: `修改了${this.data.name}的平台首页工具`,
- });
- } else if (type == "admin-sidebar" || type == "admin-sidebar2") {
- if (this.addToolIndex != null) {
- let _index = this.form.admin.sidebar.list.findIndex(
- (i) => i.id == this.addToolIndex
- );
- if (_index == -1) return this.$message.error("未找到对应的菜单");
- list.forEach((i) => (i.typeId = this.addToolIndex + "," + i.id));
- this.form.admin.sidebar.list[_index].children.push(
- ...JSON.parse(JSON.stringify(list))
- );
- this.addToolIndex = null;
- } else {
- list.forEach((i) => (i.typeId = i.id));
- this.form.admin.sidebar.list.push(
- ...JSON.parse(JSON.stringify(list))
- );
- }
- await addOp({
- uid: this.userid,
- cid: this.data.id,
- type: "user_op",
- content: `修改了${this.data.name}的平台侧边栏工具`,
- });
- this.$refs.selectToolDialogRef.close();
- }
- this.$forceUpdate();
- },
- addBanner() {
- this.$refs.addBannerDialogRef.open("", "add");
- },
- addBannerSuccess({ item, type }) {
- if (type == "add") {
- item.id = new Date().getTime();
- if (this.form.admin.banner) {
- item.id = new Date().getTime();
- this.form.admin.banner.push(item);
- } else {
- this.form.admin.banner = [item];
- }
- this.$refs.addBannerDialogRef.close();
- } else if (type == "edit") {
- let index = this.form.admin.banner.findIndex(
- (banner) => banner.id === item.id
- );
- if (index !== -1) {
- this.form.admin.banner.splice(index, 1, item);
- }
- this.$refs.addBannerDialogRef.close();
- }
- this.$forceUpdate();
- },
- editBanner(row) {
- this.$refs.addBannerDialogRef.open(row, "edit");
- },
- // 表头的背景色
- headerCellStyle() {
- return { backgroundColor: "#f1f1f1" };
- },
- moveUp(row, typeId) {
- console.log(typeId);
- if (this.tagType == "desktop") {
- let _index = this.form.desktop.list.findIndex((i) => i.id == row.id);
- if (_index > 0) {
- const itemToMove = this.form.desktop.list.splice(_index, 1)[0];
- this.form.desktop.list.splice(_index - 1, 0, itemToMove);
- }
- } else if (this.tagType == "admin-index") {
- let _index = this.form.admin.index.list.findIndex(
- (i) => i.id == row.id
- );
- if (_index > 0) {
- const itemToMove = this.form.admin.index.list.splice(_index, 1)[0];
- this.form.admin.index.list.splice(_index - 1, 0, itemToMove);
- }
- } else if (this.tagType == "admin-sidebar") {
- let typeIdList = typeId.split(",");
- console.log(typeIdList);
- if (typeIdList.length == 1) {
- let _index = this.form.admin.sidebar.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- if (_index > 0) {
- const itemToMove = this.form.admin.sidebar.list.splice(
- _index,
- 1
- )[0];
- this.form.admin.sidebar.list.splice(_index - 1, 0, itemToMove);
- }
- } else if (typeIdList.length == 2) {
- let _index = this.form.admin.sidebar.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- let _index2 = this.form.admin.sidebar.list[_index].children.findIndex(
- (i) => i.id == typeIdList[1]
- );
- console.log(_index2);
- if (_index2 > 0) {
- const itemToMove = this.form.admin.sidebar.list[
- _index
- ].children.splice(_index2, 1)[0];
- this.form.admin.sidebar.list[_index].children.splice(
- _index2 - 1,
- 0,
- itemToMove
- );
- }
- }
- } else if (this.tagType == "admin-banner") {
- let _index = this.form.admin.banner.findIndex((i) => i.id == row.id);
- if (_index > 0) {
- const itemToMove = this.form.admin.banner.splice(_index, 1)[0];
- this.form.admin.banner.splice(_index - 1, 0, itemToMove);
- }
- } else if (this.tagType == "admin-school") {
- let typeIdList = typeId.split("-");
- console.log(typeIdList);
- if (typeIdList.length == 1) {
- let _index = this.form.admin.school.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- if (_index > 0) {
- const itemToMove = this.form.admin.school.list.splice(_index, 1)[0];
- this.form.admin.school.list.splice(_index - 1, 0, itemToMove);
- }
- } else if (typeIdList.length == 2) {
- let _index = this.form.admin.school.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- let _index2 = this.form.admin.school.list[_index].children.findIndex(
- (i) => i.code == typeIdList[1]
- );
- console.log(_index2);
- if (_index2 > 0) {
- const itemToMove = this.form.admin.school.list[
- _index
- ].children.splice(_index2, 1)[0];
- this.form.admin.school.list[_index].children.splice(
- _index2 - 1,
- 0,
- itemToMove
- );
- }
- }
- }
- },
- moveDown(row, typeId) {
- console.log(typeId);
- if (this.tagType == "desktop") {
- let _index = this.form.desktop.list.findIndex((i) => i.id == row.id);
- if (_index < this.form.desktop.list.length - 1) {
- const itemToMove = this.form.desktop.list.splice(_index, 1)[0];
- this.form.desktop.list.splice(_index + 1, 0, itemToMove);
- }
- } else if (this.tagType == "admin-index") {
- let _index = this.form.admin.index.list.findIndex(
- (i) => i.id == row.id
- );
- if (_index < this.form.admin.index.list.length - 1) {
- const itemToMove = this.form.admin.index.list.splice(_index, 1)[0];
- this.form.admin.index.list.splice(_index + 1, 0, itemToMove);
- }
- } else if (this.tagType == "admin-sidebar") {
- let typeIdList = typeId.split(",");
- if (typeIdList.length == 1) {
- let _index = this.form.admin.sidebar.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- if (_index < this.form.admin.sidebar.list.length - 1) {
- const itemToMove = this.form.admin.sidebar.list.splice(
- _index,
- 1
- )[0];
- this.form.admin.sidebar.list.splice(_index + 1, 0, itemToMove);
- }
- } else if (typeIdList.length == 2) {
- let _index = this.form.admin.sidebar.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- let _index2 = this.form.admin.sidebar.list[_index].children.findIndex(
- (i) => i.id == typeIdList[1]
- );
- if (
- _index2 <
- this.form.admin.sidebar.list[_index].children.length - 1
- ) {
- const itemToMove = this.form.admin.sidebar.list[
- _index
- ].children.splice(_index2, 1)[0];
- this.form.admin.sidebar.list[_index].children.splice(
- _index2 + 1,
- 0,
- itemToMove
- );
- }
- }
- } else if (this.tagType == "admin-banner") {
- let _index = this.form.admin.banner.findIndex((i) => i.id == row.id);
- if (_index < this.form.admin.banner.length - 1) {
- const itemToMove = this.form.admin.banner.splice(_index, 1)[0];
- this.form.admin.banner.splice(_index + 1, 0, itemToMove);
- }
- } else if (this.tagType == "admin-school") {
- let typeIdList = typeId.split("-");
- if (typeIdList.length == 1) {
- let _index = this.form.admin.school.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- if (_index < this.form.admin.school.list.length - 1) {
- const itemToMove = this.form.admin.school.list.splice(_index, 1)[0];
- this.form.admin.school.list.splice(_index + 1, 0, itemToMove);
- }
- } else if (typeIdList.length == 2) {
- let _index = this.form.admin.school.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- let _index2 = this.form.admin.school.list[_index].children.findIndex(
- (i) => i.code == typeIdList[1]
- );
- if (
- _index2 <
- this.form.admin.school.list[_index].children.length - 1
- ) {
- const itemToMove = this.form.admin.school.list[
- _index
- ].children.splice(_index2, 1)[0];
- this.form.admin.school.list[_index].children.splice(
- _index2 + 1,
- 0,
- itemToMove
- );
- }
- }
- }
- },
- del(row, typeId) {
- if (this.tagType == "desktop") {
- const index = this.form.desktop.list.findIndex((i) => i.id === row.id);
- if (index > -1) {
- this.form.desktop.list.splice(index, 1);
- }
- } else if (this.tagType == "admin-index") {
- const index = this.form.admin.index.list.findIndex(
- (i) => i.id === row.id
- );
- if (index > -1) {
- this.form.admin.index.list.splice(index, 1);
- }
- } else if (this.tagType == "admin-sidebar") {
- let typeIdList = typeId.split(",");
- if (typeIdList.length == 1) {
- let _index = this.form.admin.sidebar.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- this.form.admin.sidebar.list.splice(_index, 1);
- } else if (typeIdList.length == 2) {
- let _index = this.form.admin.sidebar.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- let _index2 = this.form.admin.sidebar.list[_index].children.findIndex(
- (i) => i.typeId == typeIdList[1]
- );
- this.form.admin.sidebar.list[_index].children.splice(_index2, 1);
- }
- // this.form.admin.sidebar.list.splice(_index, 1);
- } else if (this.tagType == "admin-banner") {
- const index = this.form.admin.banner.findIndex((i) => i.id === row.id);
- if (index > -1) {
- this.form.admin.banner.splice(index, 1);
- }
- } else if (this.tagType == "admin-school") {
- let typeIdList = typeId.split("-");
- if (typeIdList.length == 1) {
- let _index = this.form.admin.school.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- this.form.admin.school.list.splice(_index, 1);
- } else if (typeIdList.length == 2) {
- let _index = this.form.admin.school.list.findIndex(
- (i) => i.typeId == typeIdList[0]
- );
- let _index2 = this.form.admin.school.list[_index].children.findIndex(
- (i) => i.code == typeIdList[1]
- );
- this.form.admin.school.list[_index].children.splice(_index2, 1);
- }
- // this.form.admin.sidebar.list.splice(_index, 1);
- }
- },
- getToolData() {
- return new Promise((resolve) => {
- let params = [
- {
- functionName: "select_desktopToolByPage",
- status: "",
- page: 1,
- lim: 9999999,
- },
- ];
- this.loading = true;
- this.$ajax
- .post(API_CONFIG.baseUrl, params)
- .then((res) => {
- let _data = res.data;
- let _list = _data[0];
- _list.forEach((i) => {
- i.url = JSON.parse(i.url);
- i.json = JSON.parse(i.json);
- i.argumentList = JSON.parse(i.argumentList);
- });
- this.toolList = _list;
- this.loading = false;
- resolve(_list);
- })
- .catch((err) => {
- console.log(err);
- this.loading = false;
- this.$message.error("获取工具数据失败");
- this.close();
- });
- });
- },
- getAppData() {
- return new Promise((resolve) => {
- let params = [
- {
- functionName: "select_schUsuallyApp",
- userid: "",
- stand: "cn",
- },
- ];
- this.loading = true;
- this.$ajax
- .post(API_CONFIG.baseUrl, params)
- .then((res) => {
- let _data = res.data;
- let _list = _data[0];
- _list.forEach((i) => {
- i.json = JSON.parse(i.json);
- });
- this.appList = _list;
- this.loading = false;
- resolve(_list);
- })
- .catch((err) => {
- console.log(err);
- this.loading = false;
- this.$message.error("获取应用数据失败");
- this.close();
- });
- });
- },
- setJson() {
- let _form = JSON.parse(JSON.stringify(this.form));
- _form.desktop.list = _form.desktop.list.map((i) => i.id);
- _form.admin.index.list = _form.admin.index.list.map((i) => i.id);
- _form.admin.sidebar.list.forEach((i, index) => {
- if (i.children) {
- _form.admin.sidebar.list[index].children = i.children.map(
- (i) => i.id
- );
- } else {
- _form.admin.sidebar.list[index] = i.id;
- }
- });
- _form.admin.cocoFlow = _form.admin.cocoFlow
- ? _form.admin.cocoFlow.map((i) => {
- return { id: i.id, setIcon: i.setIcon }})
- : [];
- _form.admin.cocoFlow2 = _form.admin.cocoFlow2
- ? _form.admin.cocoFlow2.map((i) => {
- return { id: i.id, setIcon: i.setIcon }})
- : [];
- _form.admin.CampusF.appList = _form.admin.CampusF.appList
- ? _form.admin.CampusF.appList.map((i) => {
- return { id: i.id, setIcon: i.setIcon }})
- : [];
- let params = [
- {
- functionName: "update_orgOroid_json_byId",
- id: this.data.id,
- ujson: JSON.stringify(_form),
- type: this.type,
- },
- ];
- console.log('_form',_form);
- this.loading = true;
- this.$ajax
- .post(API_CONFIG.baseUrl, params)
- .then(async (res) => {
- let _data = res.data;
- if (_data == 1) {
- this.$message.success("修改权限成功");
- this.$emit("getData");
- await addOp({
- uid: this.userid,
- cid: this.data.id,
- type: "user_op",
- content: `修改了${this.data.name}的权限设置`,
- });
- this.close();
- } else {
- this.$message.error("修改权限失败");
- }
- this.loading = false;
- })
- .catch((err) => {
- console.log(err);
- this.loading = false;
- this.$message.error("修改权限失败");
- });
- },
- setDataListToo(toolList = [], appList = []) {
- let _form = JSON.parse(JSON.stringify(this.form));
- _form.desktop.list.forEach((i, index) => {
- let _index = toolList.findIndex((i2) => i == i2.id);
- if (_index != -1) {
- _form.desktop.list[index] = toolList[_index];
- } else {
- console.log("无工具", i);
- }
- });
- if (_form.admin.cocoFlow) {
- _form.admin.cocoFlow.forEach((i, index) => {
- let _index = appList.findIndex((i2) => i.id == i2.id);
- if (_index != -1) {
- let _setData = appList[_index];
- _setData.setIcon = i.setIcon;
- _form.admin.cocoFlow[index] = _setData;
- } else {
- console.log("无应用", i);
- }
- });
- }
- if (_form.admin.cocoFlow2) {
- _form.admin.cocoFlow2.forEach((i, index) => {
- let _index = appList.findIndex((i2) => i.id == i2.id);
- if (_index != -1) {
- let _setData = appList[_index];
- _setData.setIcon = i.setIcon;
- _form.admin.cocoFlow2[index] = _setData;
- } else {
- console.log("无应用", i);
- }
- });
- }
- if (_form.admin.CampusF.appList && _form.admin.CampusF.appList.length) {
- _form.admin.CampusF.appList.forEach((i, index) => {
- let _index = appList.findIndex((i2) => i.id == i2.id);
- if (_index != -1) {
- let _setData = appList[_index];
- _setData.setIcon = i.setIcon;
- _form.admin.CampusF.appList[index] = _setData;
- } else {
- console.log("无应用", i);
- }
- });
- }
-
- _form.admin.index.list.forEach((i, index) => {
- let _index = toolList.findIndex((i2) => i == i2.id);
- if (_index != -1) {
- _form.admin.index.list[index] = toolList[_index];
- } else {
- console.log("无工具", i);
- }
- });
- _form.admin.sidebar.list.forEach((i, index) => {
- if (i.children) {
- i.children.forEach((i2, index2) => {
- let _toolList = JSON.parse(JSON.stringify(toolList));
- let _index = _toolList.findIndex((i3) => i2 == i3.id);
- if (_index != -1) {
- _form.admin.sidebar.list[index].children[index2] =
- _toolList[_index];
- _form.admin.sidebar.list[index].children[index2].typeId =
- _form.admin.sidebar.list[index].typeId +
- "," +
- _toolList[_index].id;
- } else {
- console.log("无工具", i);
- }
- });
- } else {
- let _toolList = JSON.parse(JSON.stringify(toolList));
- let _index = _toolList.findIndex((i2) => i == i2.id);
- if (_index != -1) {
- _form.admin.sidebar.list[index] = _toolList[_index];
- _form.admin.sidebar.list[index].typeId =
- _form.admin.sidebar.list[index].id;
- } else {
- console.log("无工具", i);
- }
- }
- });
- this.form = _form;
- this.$forceUpdate();
- },
- addToolSidebar(id) {
- this.addToolIndex = id;
- let index = this.form.admin.sidebar.list.findIndex((i) => i.id == id);
- if (index == -1) return this.$message.error("未找到对应菜单");
- let selectList = [];
- selectList = this.form.admin.sidebar.list[index].children;
- this.$refs.selectToolDialogRef.open(
- selectList,
- "admin-sidebar",
- this.form.desktop.list
- );
- },
- async addMenuSuccess({ item, type, tagType }) {
- console.log(item, type);
- if (tagType == "admin-sidebar") {
- if (type == "add") {
- item.id = String(new Date().getTime());
- item.typeId = item.id;
- this.form.admin.sidebar.list.push(item);
- await addOp({
- uid: this.userid,
- cid: "",
- type: "user_op",
- content: `添加了侧边栏一级菜单:${item.menuName}`,
- });
- } else if (type == "edit") {
- let _index = this.form.admin.sidebar.list.findIndex(
- (i) => i.typeId == item.typeId
- );
- if (_index != -1) {
- let _sidebar = JSON.parse(JSON.stringify(this.form.admin.sidebar));
- _sidebar.list[_index] = item;
- this.form.admin.sidebar = JSON.parse(JSON.stringify(_sidebar));
- this.$forceUpdate();
- await addOp({
- uid: this.userid,
- cid: "",
- type: "user_op",
- content: `修改了侧边栏一级菜单:${item.menuName}`,
- });
- }
- }
- } else if (tagType == "admin-school") {
- if (type == "add") {
- item.id = String(new Date().getTime());
- item.typeId = item.id;
- delete item.menuActiveIcon;
- this.form.admin.school.list.push(item);
- await addOp({
- uid: this.userid,
- cid: "",
- type: "user_op",
- content: `添加了学校一级菜单:${item.menuName}`,
- });
- } else if (type == "edit") {
- let _index = this.form.admin.school.list.findIndex(
- (i) => i.typeId == item.typeId
- );
- if (_index != -1) {
- let _school = JSON.parse(JSON.stringify(this.form.admin.school));
- _school.list[_index] = item;
- this.form.admin.school = JSON.parse(JSON.stringify(_school));
- this.$forceUpdate();
- await addOp({
- uid: this.userid,
- cid: "",
- type: "user_op",
- content: `修改了了学校一级菜单:${item.menuName}`,
- });
- }
- }
- }
- this.$refs.addMenuDialogRef.close();
- },
- addMenu(type) {
- this.$refs.addMenuDialogRef.open("", "add", type);
- },
- editMenu(row) {
- this.$refs.addMenuDialogRef.open(row, "edit", this.tagType);
- },
- addApp() {
- let _list = [];
- let _max = 0
- if (this.tagType == "admin-cocoFlow") {
- _list = this.form.admin.cocoFlow ? this.form.admin.cocoFlow : [];
- _max = 8;
- } else if (this.tagType == "admin-cocoFlow2") {
- _list = this.form.admin.cocoFlow2 ? this.form.admin.cocoFlow2 : [];
- _max = 4;
- } else if (this.tagType == "admin-feature") {
- _list = this.form.admin.CampusF.appList ? this.form.admin.CampusF.appList : [];
- _max = 8;
- }
- this.$refs.selectAppDialogRef.open({
- select: _list,
- max:_max
- });
- },
- moveApp(id, type) {
- if(this.tagType=='admin-cocoFlow'){
- let _index = this.form.admin.cocoFlow.findIndex((i) => i.id == id);
- if (type == 0 && _index != 0) {
- //上移
- let temp = this.form.admin.cocoFlow[_index - 1];
- this.form.admin.cocoFlow[_index - 1] = this.form.admin.cocoFlow[_index];
- this.form.admin.cocoFlow[_index] = temp;
- } else if (type == 1 && _index != this.form.admin.cocoFlow.length - 1) {
- let temp = this.form.admin.cocoFlow[_index + 1];
- this.form.admin.cocoFlow[_index + 1] = this.form.admin.cocoFlow[_index];
- this.form.admin.cocoFlow[_index] = temp;
- }
- }else if(this.tagType=='admin-cocoFlow2'){
- let _index = this.form.admin.cocoFlow2.findIndex((i) => i.id == id);
- if (type == 0 && _index != 0) {
- //上移
- let temp = this.form.admin.cocoFlow2[_index - 1];
- this.form.admin.cocoFlow2[_index - 1] = this.form.admin.cocoFlow2[_index];
- this.form.admin.cocoFlow2[_index] = temp;
- } else if (type == 1 && _index != this.form.admin.cocoFlow2.length - 1) {
- let temp = this.form.admin.cocoFlow2[_index + 1];
- this.form.admin.cocoFlow2[_index + 1] = this.form.admin.cocoFlow2[_index];
- this.form.admin.cocoFlow2[_index] = temp;
- }
- }else if(this.tagType=='admin-feature'){
- let _index = this.form.admin.CampusF.appList.findIndex((i) => i.id == id);
- if (type == 0 && _index != 0) {
- //上移
- let temp = this.form.admin.CampusF.appList[_index - 1];
- this.form.admin.CampusF.appList[_index - 1] = this.form.admin.CampusF.appList[_index];
- this.form.admin.CampusF.appList[_index] = temp;
- } else if (type == 1 && _index != this.form.admin.CampusF.appList.length - 1) {
- let temp = this.form.admin.CampusF.appList[_index + 1];
- this.form.admin.CampusF.appList[_index + 1] = this.form.admin.CampusF.appList[_index];
- this.form.admin.CampusF.appList[_index] = temp;
- }
- }
- this.$forceUpdate();
- },
- selectAppSuccess(data) {
- if (this.tagType == "admin-cocoFlow") {
- this.form.admin.cocoFlow = JSON.parse(JSON.stringify(data));
- } else if (this.tagType == "admin-cocoFlow2") {
- this.form.admin.cocoFlow2 = JSON.parse(JSON.stringify(data));
- } else if (this.tagType == "admin-feature") {
- this.form.admin.CampusF.appList = JSON.parse(JSON.stringify(data));
- }
- this.$forceUpdate();
- this.$refs.selectAppDialogRef.close();
- },
- addSchool(id) {
- console.log("👉", id);
- let _children = this.form.admin.school.list.find(
- (i) => i.id == id
- ).children;
- this.$refs.selectSchoolDialogRef.open(_children, id);
- },
- selectSchoolSuccess({ data, type }) {
- let _data = JSON.parse(JSON.stringify(data));
- _data.forEach((i) => {
- delete i.json;
- i.typeId = `${type}-${i.code}`;
- });
- this.form.admin.school.list.find((i) => i.id == type).children = _data;
- this.$refs.selectSchoolDialogRef.close();
- },
- async updateIconCocoFLow(index) {
- let _url = await this.uploadFile("image/*");
- if (_url) {
- if (this.tagType == "admin-cocoFlow") {
- let _data = JSON.parse(JSON.stringify(this.form.admin.cocoFlow));
- _data[index].setIcon = _url;
- this.form.admin.cocoFlow = _data;
- } else if (this.tagType == "admin-cocoFlow2") {
- let _data = JSON.parse(JSON.stringify(this.form.admin.cocoFlow2));
- _data[index].setIcon = _url;
- this.form.admin.cocoFlow2 = _data;
- } else if (this.tagType == "admin-feature") {
- let _data = JSON.parse(JSON.stringify(this.form.admin.CampusF.appList));
- _data[index].setIcon = _url;
- this.form.admin.CampusF.appList = _data;
- }
- this.$forceUpdate();
- } else {
- return console.log("无图片");
- }
- },
- },
- };
- </script>
- <style scoped>
- .permissionSettingDialog >>> .el-dialog__header {
- padding: 15px 20px;
- background: #454545;
- }
- .permissionSettingDialog >>> .el-dialog__title {
- color: #fff;
- }
- .el-dialog__footer {
- padding: 10px 0 0 10px;
- }
- .ps_area {
- width: 100%;
- height: 800px;
- }
- .pa_a_head {
- width: 100%;
- height: 40px;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- overflow: auto;
- border-bottom: 1px solid #e4e7ed;
- }
- .pa_a_h_tag {
- width: calc(100%);
- height: 100%;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- overflow: auto;
- }
- .pa_a_h_tag > span {
- font-size: 16px;
- display: block;
- width: auto;
- height: 100%;
- padding: 0 20px;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-right: 10px;
- cursor: pointer;
- transition: 0.2s;
- white-space: nowrap;
- }
- .pa_a_h_active {
- color: #409eff;
- }
- .pa_a_editBox {
- width: 100%;
- height: 100%;
- overflow: auto;
- }
- .editArea {
- width: 100%;
- height: auto;
- box-sizing: border-box;
- }
- .ea_basics_input {
- width: 100%;
- height: auto;
- margin-top: 20px;
- display: flex;
- align-items: center;
- }
- .ea_basics_input > span {
- display: block;
- width: 60px;
- height: auto;
- }
- .ea_basics_logo {
- margin-top: 30px;
- width: auto;
- height: auto;
- cursor: pointer;
- display: flex;
- align-items: center;
- }
- .ea_basics_logo > span {
- display: block;
- min-width: 80px;
- }
- .ea_basics_logo >>> .image-slot {
- width: 100%;
- height: 100%;
- font-size: 22px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .ea_item {
- width: 83px;
- height: 83px;
- margin: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .pa_a_eb_desktop {
- display: flex;
- flex-direction: column;
- padding: 0;
- }
- .ea_add {
- width: 200px;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- }
- .urlItemBox {
- display: flex;
- flex-wrap: wrap;
- }
- .urlItem {
- width: 400px;
- height: 300px;
- overflow: auto;
- position: relative;
- box-sizing: border-box;
- border-bottom: solid 1px #ebeef5;
- }
- .urlItem:nth-child(2n) {
- margin-left: 20px;
- }
- .urlItem > span {
- font-size: 18px;
- font-weight: bold;
- }
- .ui_m_image {
- width: 40px;
- height: 40px;
- float: left;
- display: flex;
- align-items: center;
- }
- .ui_message > div {
- display: flex;
- align-items: center;
- }
- .ui_message > div > span {
- white-space: nowrap;
- }
- .appList {
- display: flex;
- flex-wrap: wrap;
- box-sizing: border-box;
- padding-top: 20px;
- }
- .appItem {
- width: 298px;
- height: 100px;
- background-color: white;
- box-sizing: border-box;
- border: solid 1px #f3f4f6;
- padding: 10px;
- border-radius: 8px;
- cursor: pointer;
- margin-bottom: 20px;
- margin-right: 20px;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: 0.3s;
- }
- .appActive {
- border-color: #409eff;
- box-shadow: 0px 6px 30px 5px #00000015;
- }
- .appItem:hover {
- box-shadow: 0px 6px 30px 5px #00000015;
- }
- .ai_left {
- width: 80px;
- height: 80px;
- box-sizing: border-box;
- padding: 10px;
- margin-right: 10px;
- }
- .ai_right {
- width: calc(100% - 80px - 10px);
- position: relative;
- }
- .ai_right > div {
- max-width: calc(100% - 50px);
- font-weight: bold;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- font-size: 16px;
- color: #000;
- margin-bottom: 10px;
- }
- .ai_r_btn {
- width: auto;
- display: flex;
- position: absolute;
- right: 0;
- top: 0;
- }
- .ai_r_btn > svg {
- width: 10px;
- height: 10px;
- margin-left: 15px;
- cursor: pointer;
- }
- .ai_right > span {
- font-size: 14px;
- color: #00000099;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .pa_a_eb_feature{
- display: flex;
- flex-direction: column;
- }
- .ea_appListTit{
- height: 40px;
- line-height: 40px;
- margin: 20px 0 0;
- }
- .ea_appList{
- }
- </style>
|