123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208 |
- <template>
- <div id="tableList">
- <div class="headerNavTool" v-if="navText.headShow !== false">
- <div class="leftIndexText">
- {{ navText.title }} <strong>{{ navText.index }}</strong> {{ navText.ch
- }}<span
- style="
- color: red;
- font-weight: bold;
- font-size: 16px;
- margin-left: 10px;
- "
- ><i class="el-icon-warning-outline" style="font-weight: bold"></i>
- 鼠标点击数据表数据,再按键盘左右键可以左右滑动数据表数据。</span
- >
- </div>
- <div class="rightBtnBox">
- <slot name="customize"></slot>
- <el-button
- size="medium"
- type="primary"
- @click="addClick"
- v-if="!navText.addHide"
- >添加</el-button
- >
- <el-button
- v-if="navText.backFatherBtn && navText.backFatherBtn.status"
- size="medium"
- type="warning"
- @click="backFather"
- >{{ navText.backFatherBtn.title }}</el-button
- >
- <el-popover
- popper-class="slotPopper"
- placement="bottom-end"
- trigger="click"
- >
- <div class="popoverDis">
- <div class="checkboxHeader">
- <el-checkbox
- :indeterminate="isIndeterminate"
- v-model="checkAll"
- @change="handleCheckAllChange"
- >列展示</el-checkbox
- >
- <div class="initbtns" @click="initVue">重置</div>
- </div>
- <div
- style="height: 1px; width: 100%; background-color: #eaeefb"
- ></div>
- <el-checkbox-group
- class="checkboxGroup"
- v-model="checkedCities"
- @change="handleCheckedCitiesChange"
- >
- <div
- class="checkboxchild"
- v-for="(item, index) in cities"
- :key="index"
- >
- <el-checkbox
- :label="item"
- @change="checkboxChange(item, $event)"
- >{{ item }}</el-checkbox
- >
- <div class="icon-right">
- <i class="el-icon-upload2" @click="upMove(item, index)"></i>
- <i
- class="el-icon-download"
- @click="downMove(item, index)"
- ></i>
- </div>
- </div>
- </el-checkbox-group>
- </div>
- <el-button
- v-if="navText.custom !== false"
- style="margin-left: 10px"
- size="medium"
- slot="reference"
- >自定义列</el-button
- >
- </el-popover>
- </div>
- </div>
- <el-table
- :max-height="tableHeight(clientHeight)"
- id="allTableList"
- :data="tableData"
- :span-method="objectSpanMethod"
- stripe
- style="width: 100%"
- @select-all="selectAll"
- @select="select"
- @sort-change="sortChange"
- :row-key="rowKey"
- :load="load"
- :cell-style="timeStyle"
- lazy
- :border="true"
- ref="pagerset"
- v-loading="loading"
- :row-class-name="navText.tableColor ? navText.tableColorFunc : ''"
- :header-cell-style="{
- 'background-color': '#eee',
- color: '#333',
- fontSize: '14px',
- }"
- :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
- >
- <el-table-column
- v-if="navText.choiceRadio"
- align="center"
- type="selection"
- :fixed="navText.radioFixed"
- width="55"
- >
- <template slot-scope="scope">
- <el-radio
- style="margin-left: 10px"
- v-model="tableRadio"
- :label="scope.row[navText.radioKey]"
- @change="radioChange"
- >{{ "" }}</el-radio
- >
- </template>
- </el-table-column>
- <el-table-column
- v-if="navText.choice"
- :reserve-selection="navText.openCheckMore"
- align="center"
- type="selection"
- width="55"
- header-align="center"
- fixed="left"
- :selectable="
- navText.selectableStatus ? navText.selectableFunc : selectFuncTrue
- "
- >
- </el-table-column>
- <el-table-column
- v-if="navText.dontNum ? false : true"
- type="index"
- :index="setIndex"
- label="序号"
- width="70"
- align="center"
- header-align="center"
- >
- </el-table-column>
- <af-table-column
- v-for="(item, index) in compTableSet(tableSet)"
- :width="item.width"
- :label="item.label"
- :align="item.dontCenter ? 'left' : 'center'"
- :sortable="item.prop === 'sort' || item.sort"
- :sort-method="sortMethods"
- :show-overflow-tooltip="item.showTooltip ? false : true"
- header-align="center"
- :prop="item.prop"
- sort-by="sort"
- :key="index"
- >
- <template slot-scope="scope">
- <div class="imgboxsq" v-if="item.scope === 'img'">
- <img
- style="height: 60px; width: 60px"
- v-if="!scope.row[item.prop]"
- src="@/assets/404_images/wuyuxaog.png"
- alt=""
- />
- <el-image
- v-else
- class="el_images"
- lazy
- :src="$methodsTools.splitImgHost(scope.row[item.prop])"
- style="height: 100%; width: 100%"
- :preview-src-list="[
- $methodsTools.splitImgHost(scope.row[item.prop]),
- ]"
- alt="加载失败"
- >
- </el-image>
- </div>
- <div v-else-if="item.scope === 'sortType'">
- <el-input-number
- v-model="scope.row[item.prop]"
- :min="0"
- style="width: 80px"
- :controls="false"
- @change="blurBackData(scope.row)"
- ></el-input-number>
- </div>
- <template
- v-else-if="
- item.scope === 'copyTime' && scope.row[item.prop] != null
- "
- >
- <div v-for="(item, index) in scope.row['copyTime']" :key="index">
- <span>{{ item }}</span>
- </div>
- </template>
- <span
- v-else-if="item.scope === 'status' && scope.row[item.prop] != null"
- >{{
- Number(scope.row[item.prop]) === 1
- ? "启用"
- : Number(scope.row[item.prop]) === 0
- ? "关闭"
- : Number(scope.row[item.prop]) === -1
- ? "已删除"
- : "未知"
- }}</span
- >
- <span v-else-if="item.scope === 'hasTime'">{{
- Number(scope.row[item.prop]) === 1
- ? "有效"
- : Number(scope.row[item.prop]) === 0
- ? "无效"
- : "未知"
- }}</span>
- <span v-else-if="item.scope === 'reStatus'">{{
- Number(scope.row[item.prop]) === 1
- ? "定时发布"
- : Number(scope.row[item.prop]) === 0
- ? "手动发布"
- : "未知"
- }}</span>
- <span v-else-if="item.scope === 'fabStatus'">{{
- Number(scope.row[item.prop]) === 1
- ? "发布"
- : Number(scope.row[item.prop]) === 0
- ? "未发布"
- : "未知"
- }}</span>
- <span v-else-if="item.scope === 'sectionTypes'">{{
- Number(scope.row[item.prop]) === 2
- ? "录播"
- : Number(scope.row[item.prop]) === 1
- ? "直播"
- : Number(scope.row[item.prop]) === 3
- ? "回放"
- : "未知"
- }}</span>
- <span
- v-else-if="
- item.scope === 'treeWatch' &&
- (scope.row['goodsType'] === 1 ||
- scope.row['goodsType'] === 2 ||
- scope.row['goodsType'] === 6)
- "
- style="color: blue"
- @click="
- scope.row['goodsType'] === 1 || scope.row['goodsType'] === 6
- ? diavios(scope.row['goodsId'])
- : diaviosTK(scope.row['goodsId'])
- "
- >结构树视图</span
- >
- <span v-else-if="item.scope === 'leftCh'">
- {{ item.ch }}{{ scope.row[item.prop] }}
- </span>
- <span
- v-else-if="item.scope === 'goodsIds'"
- class="editInfoSty"
- @click="editInfo(scope.row, 3)"
- >
- {{
- !scope.row[item.prop]
- ? 0
- : scope.row[item.prop].split(",").map(Number).length
- }}
- </span>
- <span
- v-else-if="item.scope === 'aboutSpec'"
- style="color: blue; cursor: pointer"
- @click="openSpec(scope.row['goodsId'])"
- >
- {{ scope.row[item.prop] ? "已关联" : "未关联" }}
- </span>
- <span v-else-if="item.scope === 'liveAndUrl'">{{
- scope.row[item.prop] == 2
- ? scope.row[item.prop2]
- : scope.row[item.prop1]
- }}</span>
- <ul v-else-if="item.scope === 'mapTypes'" class="ulAuto">
- <template v-for="(itm, inds) in scope.row[item.prop]">
- <li :key="inds" v-if="inds === 0">
- {{ itm.educationName + "-" + itm.projectName }}
- </li>
- </template>
- <el-popover :key="Math.random()" placement="right" trigger="click">
- <ul>
- <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
- {{ inds + 1 }}、
- {{ itm.educationName + "-" + itm.projectName }}
- </li>
- </ul>
- <el-button
- slot="reference"
- style="margin-left: 6px"
- type="text"
- v-if="scope.row[item.prop].length > 1"
- size="mini"
- >更多</el-button
- >
- </el-popover>
- </ul>
- <ul v-else-if="item.scope === 'mapTypesBUS'" class="ulAuto">
- <template v-for="(itm, inds) in scope.row[item.prop]">
- <li :key="inds" v-if="inds === 0">
- {{
- itm.educationName +
- "-" +
- itm.projectName +
- "-" +
- itm.businessName
- }}
- </li>
- </template>
- <el-popover :key="Math.random()" placement="right" trigger="click">
- <ul>
- <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
- {{ inds + 1 }}、
- {{
- itm.educationName +
- "-" +
- itm.projectName +
- "-" +
- itm.businessName
- }}
- </li>
- </ul>
- <el-button
- slot="reference"
- style="margin-left: 6px"
- type="text"
- v-if="scope.row[item.prop].length > 1"
- size="mini"
- >更多</el-button
- >
- </el-popover>
- </ul>
- <div v-else-if="item.scope === 'splits'" class="dis_sdt">
- <ul>
- <template v-for="(itm, inds) in scope.row[item.prop]">
- <li :key="inds" v-if="inds < 2">
- {{ itm }}
- </li>
- </template>
- </ul>
- <el-popover :key="Math.random()" placement="right" trigger="click">
- <ul>
- <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
- {{ inds + 1 }}、
- {{ itm }}
- </li>
- </ul>
- <el-button
- slot="reference"
- style="margin-left: 6px"
- type="text"
- v-if="scope.row[item.prop].length > 2"
- size="mini"
- >更多</el-button
- >
- </el-popover>
- </div>
- <div v-else-if="item.scope === 'goodsList'" class="ulAuto">
- <ul>
- <template v-for="(itm, inds) in scope.row[item.prop]">
- <li :key="inds" v-if="inds === 0">
- {{ itm.goodsName }}
- </li>
- </template>
- </ul>
- <el-popover :key="Math.random()" placement="right" trigger="click">
- <ul>
- <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
- {{ inds + 1 }}、
- {{ itm.goodsName }}
- </li>
- </ul>
- <el-button
- slot="reference"
- style="margin-left: 6px"
- type="text"
- v-if="scope.row[item.prop].length > 1"
- size="mini"
- >更多</el-button
- >
- </el-popover>
- </div>
- <div v-else-if="item.scope === 'aboutChapter'" class="ulAuto">
- <ul>
- <template v-for="(itm, inds) in scope.row[item.prop]">
- <li
- class="jumpStys"
- :key="inds"
- v-if="inds === 0"
- @click="jumpPages(itm, item.int)"
- >
- {{ itm[item.prop1] }}
- </li>
- </template>
- </ul>
- <el-popover :key="Math.random()" placement="right" trigger="click">
- <ul>
- <li
- v-for="(itm, inds) in scope.row[item.prop]"
- :key="inds"
- class="jumpStys"
- @click="jumpPages(itm, item.int)"
- >
- {{ inds + 1 }}、
- {{ itm[item.prop1] }}
- </li>
- </ul>
- <el-button
- slot="reference"
- style="margin-left: 6px"
- type="text"
- v-if="scope.row[item.prop].length > 1"
- size="mini"
- >更多</el-button
- >
- </el-popover>
- </div>
- <ul v-else-if="item.scope === 'mapTypesMores'" class="ulAuto">
- <template v-for="(itm, inds) in scope.row[item.prop]">
- <li :key="inds" v-if="inds === 0">
- {{
- itm.educationName +
- "-" +
- itm.projectName +
- "-" +
- itm.businessName +
- "-" +
- itm.subjectName
- }}
- </li>
- </template>
- <el-popover :key="Math.random()" placement="right" trigger="click">
- <ul style="overflow: auto; max-height: 500px">
- <li v-for="(itm, inds) in scope.row[item.prop]" :key="inds">
- {{ inds + 1 }}、
- {{
- itm.educationName +
- "-" +
- itm.projectName +
- "-" +
- itm.businessName +
- "-" +
- itm.subjectName
- }}
- </li>
- </ul>
- <el-button
- slot="reference"
- style="margin-left: 6px"
- type="text"
- v-if="scope.row[item.prop].length > 1"
- size="mini"
- >更多</el-button
- >
- </el-popover>
- </ul>
- <div v-else-if="item.scope === 'htmlInfo'">
- <bankMsg ref="bankMsg" :bankMsg="scope.row" />
- </div>
- <div v-else-if="item.scope === 'video'">
- <i
- v-if="scope.row[item.prop][item.prop1] !== null"
- class="el-icon-video-play cvideo"
- @click="
- openVideo(
- $methodsTools.splitImgHost(scope.row[item.prop][item.prop1])
- )
- "
- ></i>
- </div>
- <div
- v-else-if="item.scope === 'PDF'"
- style="display: flex; align-items: center"
- >
- <a
- v-if="scope.row[item.prop][item.prop1] !== null"
- :href="
- $methodsTools.splitImgHost(scope.row[item.prop][item.prop1])
- "
- target="_blank"
- style="
- display: block;
- width: 35px;
- height: 45px;
- margin-right: 10px;
- "
- >
- <img class="imgHover" src="@/assets/images/pdf@3x.png" alt="" />
- </a>
- <div>{{ scope.row[item.prop][item.prop2] }}</div>
- </div>
- <div
- v-else-if="item.scope === 'openDialog'"
- class="open_style"
- @click="openDialog(scope.row)"
- >
- {{ item.name ? item.name : scope.row[item.prop] }}
- </div>
- <span v-else-if="item.scope === 'Salary'">
- {{ scope.row[item.prop1] === 1 ? "月薪" : "年薪" }}
- {{
- scope.row[item.prop2] === scope.row[item.prop3]
- ? scope.row[item.prop2]
- : scope.row[item.prop2] + "~" + scope.row[item.prop3]
- }}
- </span>
- <template v-else-if="item.scope === 'courseAbout'">
- <div v-for="(item, index) in scope.row[item.prop]" :key="index">
- {{ item.courseName }} ({{ item.aliasName }})
- </div>
- </template>
- <span v-else-if="item.scope === 'cashRatio'">
- {{ scope.row[item.prop]
- }}{{ scope.row["cashType"] === 1 ? "%" : "" }}
- </span>
- <span v-else-if="item.scope === 'convert'">{{
- $methodsTools.secondToDate(scope.row[item.prop], false)
- }}</span>
- <div v-else-if="item.scope === 'studentServicePeriod'">
- <span v-if="scope.row[item.prop1] === 1"
- >{{ scope.row[item.prop2] }}年</span
- >
- <span v-if="scope.row[item.prop1] === 2"
- >{{ scope.row[item.prop2] }}月</span
- >
- <span v-if="scope.row[item.prop1] === 3"
- >{{ scope.row[item.prop2] }}日</span
- >
- <span v-if="scope.row[item.prop1] === 4">
- {{ $methodsTools.onlyForma(scope.row[item.prop3]) }}
- {{ scope.row[item.prop3] && scope.row[item.prop4] ? "至" : "" }}
- {{ $methodsTools.onlyForma(scope.row[item.prop4]) }}
- </span>
- </div>
- <span v-else-if="item.scope === 'address'"
- >{{
- scope.row[item.prop1] +
- scope.row[item.prop2] +
- scope.row[item.prop3]
- }}{{ scope.row[item.prop4] ? scope.row[item.prop4] : "" }}</span
- >
- <span v-else-if="item.scope === 'sex'">
- {{
- scope.row[item.prop] == 1
- ? "男"
- : scope.row[item.prop] == 2
- ? "女"
- : "未知"
- }}
- </span>
- <span v-else-if="item.scope === 'type'">
- {{ item.values[scope.row[item.prop]] }}
- </span>
- <span v-else-if="item.scope === 'typeStatus'">{{
- scope.row[item.prop] === 0
- ? "报名指引"
- : scope.row[item.prop] === 1
- ? "打印准考证"
- : scope.row[item.prop] === 2
- ? "成绩查询指引"
- : "未知"
- }}</span>
- <span v-else-if="item.scope === 'typeId'">{{
- scope.row[item.prop] === 1
- ? "普通练习"
- : scope.row[item.prop] === 2
- ? "押题试卷"
- : scope.row[item.prop] === 3
- ? "真题试卷"
- : "未知"
- }}</span>
- <div v-else-if="item.scope === 'knowledge'" class="overSty">
- <el-button
- type="success"
- size="small"
- v-for="(items, ks) in scope.row[item.prop]"
- :key="ks"
- >
- {{ items.knowledgeName }}
- </el-button>
- </div>
- <span v-else-if="item.scope === 'numberAll'">{{
- scope.row[item.prop1] + scope.row[item.prop2]
- }}</span>
- <span v-else-if="item.scope === 'moreLists'">{{
- scope.row[item.prop1] + " ~ " + scope.row[item.prop2]
- }}</span>
- <span v-else-if="item.scope === 'TimeLists'"
- >{{ $methodsTools.onlyForma(scope.row[item.prop1], item.Diszing) }}
- {{ scope.row[item.prop1] ? "至" : "" }}
- {{
- $methodsTools.onlyForma(scope.row[item.prop2], item.Diszing)
- }}</span
- >
- <span v-else-if="item.scope === 'aTimeList'">{{
- scope.row[item.prop] === null || scope.row[item.prop] === 0
- ? "--"
- : $methodsTools.onlyForma(scope.row[item.prop], !item.isDiszing)
- }}</span>
- <div v-else-if="item.scope === 'inputs'">
- <el-input-number
- style="width: 50px"
- size="small"
- :controls="false"
- v-model="scope.row[item.prop]"
- controls-position="right"
- :min="0"
- ></el-input-number>
- </div>
- <span v-else-if="item.scope === 'topic'">{{
- scope.row[item.prop] === 1
- ? "单选题"
- : scope.row[item.prop] === 2
- ? "多选题"
- : scope.row[item.prop] === 3
- ? "判断题"
- : scope.row[item.prop] === 4
- ? "案例题"
- : scope.row[item.prop] === 5
- ? "简答题"
- : "未知"
- }}</span>
- <span v-else-if="item.scope === 'typeStatusName'">{{
- scope.row[item.prop] === 1
- ? "扫码支付"
- : scope.row[item.prop] === 2
- ? "刷卡支付"
- : scope.row[item.prop] === 3
- ? "现金支付"
- : scope.row[item.prop] === 4
- ? "转账"
- : "未知"
- }}</span>
- <ul style="margin: 0" v-else-if="item.scope === 'studyCount'">
- <li>总共:{{ scope.row[item.prop1] + scope.row[item.prop2] }}</li>
- <li>消耗:{{ scope.row[item.prop1] }}</li>
- <li>剩余:{{ scope.row[item.prop2] }}</li>
- </ul>
- <span
- v-else-if="item.scope === 'statusPeriod'"
- :style="scope.row[item.prop] === 2 ? 'color:red' : ''"
- >
- {{
- scope.row[item.prop] === -1
- ? "不可审核"
- : scope.row[item.prop] === 2
- ? "待审核"
- : scope.row[item.prop] === 0
- ? "未通过"
- : scope.row[item.prop] === 1
- ? "已通过"
- : scope.row[item.prop] === 3
- ? "审核中"
- : ""
- }}
- </span>
- <div
- v-else-if="item.scope === 'openBox'"
- class="open_style"
- @click="openBoxData(scope.row)"
- >
- {{ scope.row[item.prop] }}
- </div>
- <div v-else-if="item.scope === 'changeCLS'">
- <div
- v-if="!scope.row['interfacePushId'] && !scope.row['periodPlush']"
- >
- <div v-if="scope.row[item.prop] === 1" style="color: red">
- 有变更<span
- style="margin-left: 6px; color: blue; cursor: pointer"
- @click="isShowBoxsFun(scope.row)"
- >查看</span
- >
- </div>
- <span v-else> 正常 </span>
- </div>
- <template v-else>
- <div
- v-if="
- scope.row['interfacePushId'] === 1 &&
- !scope.row['periodPlush']
- "
- >
- <div v-if="scope.row[item.prop] === 1">
- <div
- v-if="
- scope.row['officialStatusTime'] &&
- scope.row['userUpdates'][0].createTime <
- scope.row['officialStatusTime']
- "
- >
- 正常
- </div>
- <div v-else style="color: red">
- 有变更<span
- style="margin-left: 6px; color: blue; cursor: pointer"
- @click="isShowBoxsFun(scope.row)"
- >查看</span
- >
- </div>
- </div>
- <span v-else> 正常 </span>
- </div>
- <div
- v-if="
- scope.row['interfacePushId'] === 1 &&
- scope.row['periodPlush'] === 1
- "
- >
- <div v-if="scope.row[item.prop] === 1">
- <div
- v-if="
- scope.row['officialStatusTime'] &&
- scope.row['userUpdates'][0].createTime <
- scope.row['officialStatusTime']
- "
- >
- 正常
- </div>
- <div v-else style="color: purple">
- 有变更<span
- style="margin-left: 6px; color: blue; cursor: pointer"
- @click="isShowBoxsFun(scope.row)"
- >查看</span
- >
- </div>
- </div>
- <span v-else> 正常 </span>
- </div>
- </template>
- </div>
- <span
- v-else-if="item.scope === 'finishStatus'"
- :style="scope.row[item.prop] === 0 ? 'color:red' : ''"
- >
- {{
- scope.row[item.prop] === 0
- ? "未学完"
- : scope.row[item.prop] === 1
- ? "已学完"
- : ""
- }}
- </span>
- <span v-else-if="item.scope === 'computer'">
- {{ scope.row[item.prop1] + "/" + scope.row[item.prop2] }}
- {{
- scope.row[item.prop1] == 0 && scope.row[item.prop2] == 0
- ? "0%"
- : (
- (scope.row[item.prop1] / scope.row[item.prop2]) *
- 100
- ).toFixed(2) + "%"
- }}
- </span>
- <span v-else-if="item.scope === 'toFixedYuan'">
- {{ $methodsTools.decimalPoint(scope.row[item.prop]) }}
- </span>
- <span v-else-if="item.scope === 'cType'">
- <el-tag
- type="success"
- v-if="
- compType(scope.row[item.prop], scope.row['requestMethod']) ===
- '新增'
- "
- >
- {{
- compType(scope.row[item.prop], scope.row["requestMethod"])
- }}</el-tag
- >
- <el-tag
- v-if="
- compType(scope.row[item.prop], scope.row['requestMethod']) ===
- '修改'
- "
- >
- {{
- compType(scope.row[item.prop], scope.row["requestMethod"])
- }}</el-tag
- >
- <el-tag
- type="warning"
- v-if="
- compType(scope.row[item.prop], scope.row['requestMethod']) ===
- '查询'
- "
- >
- {{
- compType(scope.row[item.prop], scope.row["requestMethod"])
- }}</el-tag
- >
- </span>
- <span v-else-if="item.scope === 'time'">{{
- numTime(scope.row[item.prop])
- }}</span>
- <span v-else-if="item.scope === 'isgzhOpenId'">{{
- scope.row[item.prop] ? "是" : "否"
- }}</span>
- <span v-else-if="item.scope === 'timeBtn'"
- >{{ numTime(scope.row[item.prop]) }}
- <el-button type="text" @click="getxq(scope.row)">详情</el-button>
- </span>
- <span
- class="editInfoSty"
- v-else-if="item.scope === 'editInfo'"
- @click="editInfo(scope.row)"
- >{{ scope.row[item.prop] }}
- </span>
- <div v-else-if="item.scope === 'editName'">
- <span>{{ scope.row[item.prop] }}</span>
- <el-button
- style="margin-left: 6px"
- type="text"
- @click="editInfo(scope.row, 2)"
- >修改</el-button
- >
- </div>
- <span v-else-if="item.scope === 'InfoMore'"
- >{{ scope.row[item.prop1] }} - {{ scope.row[item.prop2] }}
- </span>
- <div
- class="editInfoSty"
- v-else-if="item.scope === 'editInfoHTML'"
- @click="editInfo(scope.row)"
- >
- {{ getSimpleText(scope.row[item.prop]) }}
- </div>
- <div v-else-if="item.scope === 'editInfoHTMLs'">
- {{ getSimpleText(scope.row[item.prop]) }}
- </div>
- <span v-else-if="item.scope === 'minute'">{{
- numTimeminute(scope.row[item.prop])
- }}</span>
- <span
- v-else-if="item.scope === 'jumpPage'"
- @click="jumpPage(scope.row)"
- style="color: #409eff; cursor: pointer"
- >{{ scope.row[item.prop] }}</span
- >
- <span v-else-if="item.scope === 'objType'">
- {{
- scope.row[item.objProp].length
- ? scope.row[item.objProp][0][item.prop]
- : ""
- }}
- </span>
- <span v-else-if="item.scope === 'isOKs'" style="color: red"
- >审核通过</span
- >
- <span v-else-if="item.scope === 'eduTypes'">
- {{
- scope.row[item.prop1] +
- "-" +
- scope.row[item.prop2] +
- "-" +
- scope.row[item.prop3]
- }}{{ scope.row[item.prop4] ? "-" + scope.row[item.prop4] : "" }}
- </span>
- <span v-else-if="item.scope === 'peopleNums'">
- {{ scope.row[item.prop1] }} / {{ scope.row[item.prop2] }}
- </span>
- <span
- v-else-if="item.scope === 'jumpPageLabel'"
- @click="jumpPageLabel(scope.row)"
- style="color: #409eff; cursor: pointer"
- >{{ scope.row[item.prop] }}</span
- >
- <span v-else-if="item.scope === 'urlStatus'">
- {{
- scope.row[item.prop] === 1
- ? scope.row[item.prop1]
- : scope.row[item.prop] === 2
- ? scope.row[item.prop2]
- : scope.row[item.prop] === 3
- ? scope.row[item.prop3]
- : ""
- }}
- </span>
- <span
- v-else-if="item.scope === 'jumpPageLabelProfess'"
- @click="jumpPageLabelProfess(scope.row)"
- style="color: #409eff; cursor: pointer"
- >{{ scope.row[item.prop] }}</span
- >
- <span
- v-else-if="item.scope === 'infoJump'"
- @click="jumpinfoJump(scope.row)"
- style="color: #409eff; cursor: pointer"
- >详情</span
- >
- <div v-else-if="item.scope === 'learnStatus'">
- <div v-if="scope.row.learnStatus === 0" style="color: red">
- 未开通
- </div>
- <div v-if="scope.row.learnStatus === 1">已开通</div>
- <div v-if="scope.row.learnStatus === 2">
- 标记失败
- <el-popover placement="right" trigger="click" width="360">
- <div>
- <p>账号开通状态为:标记失败</p>
- <p>失败原因:<br />{{ scope.row.reason }}</p>
- </div>
- <el-button type="text" slot="reference">原因</el-button>
- </el-popover>
- </div>
- </div>
- <span v-else-if="item.scope === 'ptai'">{{
- scope.row[item.prop] == 1 ? "微信小程序" : "未知"
- }}</span>
- <div v-else-if="item.scope === 'isOptions'">
- <template v-for="(itemt, indext) in item.options">
- <span
- :key="indext"
- v-if="itemt.value === scope.row[item.prop]"
- :style="itemt.style ? itemt.style : ''"
- >{{ itemt.label }}
- <el-button
- type="text"
- v-if="itemt.click"
- @click="backFunc(scope.row)"
- >查看</el-button
- ></span
- >
- </template>
- </div>
- <div v-else-if="item.scope === 'isOptionsDY'">
- <template v-for="(itemt, indext) in item.options">
- <div
- :key="indext"
- v-if="itemt.value === scope.row[item.prop]"
- :style="
- scope.row[item.prop] == 5 ? 'color:rgb(132, 0, 255);' : ''
- "
- >
- <el-popover
- :key="indext"
- trigger="hover"
- v-if="itemt.popover === true"
- >
- <span
- >订单编号(业务系统):{{ scope.row[item.oldOrder] }}</span
- >
- <el-button type="text" slot="reference">{{
- itemt.label
- }}</el-button>
- </el-popover>
- <span v-else
- >{{ itemt.label }}
- <el-button
- type="text"
- v-if="itemt.click"
- @click="backFunc(scope.row)"
- >查看</el-button
- ></span
- >
- </div>
- </template>
- </div>
- <div v-else-if="item.scope === 'orderGoodsStatus'">
- {{
- scope.row[item.prop] === -1
- ? "关闭"
- : scope.row[item.prop] === 0
- ? "待支付"
- : scope.row[item.prop] === 1
- ? `已支付(¥${scope.row["goodsReceived"]})`
- : scope.row[item.prop] === 2
- ? `已退款(¥${scope.row["goodsReceived"]})`
- : ""
- }}
- </div>
- <div v-else-if="item.scope === 'solt'">
- <slot :name="item.soltName" :scope="scope"></slot>
- </div>
- <div v-else-if="item.scope === 'fill'">
- {{ scope.row[item.prop] || "--" }}
- </div>
- <div v-else-if="item.scope === 'formatPrice'">
- {{ scope.row[item.prop] || 0 | formatPrice }}
- </div>
- <span v-else :style="item.style">
- {{ scope.row[item.prop] }}
- {{
- (scope.row[item.prop] || scope.row[item.prop] === 0) && item.ch
- ? item.ch
- : ""
- }}
- </span>
- </template>
- </af-table-column>
- <el-table-column
- label="操作"
- align="center"
- fixed="right"
- :width="navText.changeWidth ? navText.changeWidth : '180px'"
- v-if="!navText.tableHide"
- >
- <template slot-scope="scope">
- <slot name="btn" :scope="scope"></slot>
- </template>
- </el-table-column>
- </el-table>
- <el-dialog
- :visible.sync="diaBox"
- width="500px"
- :show-close="false"
- :destroy-on-close="true"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">详情</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="closeBeforefs"
- />
- </div>
- </div>
- <el-row class="contentBox" :gutter="30">
- <div style="width: 100%; height: 100%">
- <video
- controls
- preload
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(videoUrls)"
- ></video>
- </div>
- </el-row>
- <div slot="footer" class="dialog-footer">
- <el-button @click="closeBeforefs">关闭</el-button>
- </div>
- </el-dialog>
- <el-dialog
- :visible.sync="dialogVisible"
- width="560px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">课程树形图</div>
- <div class="rightBoxs">
- <img src="@/assets/images/Close@2x.png" alt="" @click="closes" />
- </div>
- </div>
- <div>
- <el-tree
- :key="Math.random()"
- :props="props"
- :load="loadNode"
- lazy
- ></el-tree>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="closes">取 消</el-button>
- </span>
- </el-dialog>
- <el-dialog
- :visible.sync="diaviosOpen"
- width="560px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">商品树形图</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="diaviosOpen = false"
- />
- </div>
- </div>
- <div style="max-height: 600px; overflow: auto">
- <el-tree
- v-if="diaviosOpen"
- default-expand-all
- :key="Math.random()"
- :props="props1"
- :load="loadNode1"
- lazy
- ></el-tree>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="diaviosOpen = false">取 消</el-button>
- </span>
- </el-dialog>
- <el-dialog
- :visible.sync="isShowBoxs"
- width="400px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">资料变更详情</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="isShowBoxs = false"
- />
- </div>
- </div>
- <div style="max-height: 400px; overflow: auto">
- <ul>
- <li
- v-for="(items, indexs) in listBoxsGET"
- :key="indexs"
- style="margin-bottom: 30px"
- >
- <p>{{ $methodsTools.onlyForma(items.createTime) }}</p>
- <p style="padding-left: 14px; color: #999">
- 姓名:{{ items.realname }}
- </p>
- <p style="padding-left: 14px; color: #999">
- 身份证号码:{{ items.idCard }}
- </p>
- <p style="padding-left: 14px; color: #999">
- 绑定手机号码:{{ items.telphone }}
- </p>
- </li>
- </ul>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="isShowBoxs = false">取 消</el-button>
- </span>
- </el-dialog>
- <el-dialog
- :visible.sync="diaviosTKOpen"
- width="560px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">商品树形图</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="diaviosTKOpen = false"
- />
- </div>
- </div>
- <div style="max-height: 600px; overflow: auto">
- <el-tree
- v-if="diaviosTKOpen"
- default-expand-all
- :key="Math.random()"
- :props="props2"
- :load="loadNode2"
- lazy
- ></el-tree>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="diaviosTKOpen = false">取 消</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import bankMsg from "./bankMsg";
- export default {
- components: { bankMsg },
- props: [
- "tableSets",
- "tableData",
- "navText",
- "rowKey",
- "loading",
- "studentTable",
- "objectSpanMethod",
- "setIndex",
- "radio",
- ],
- data: function () {
- return {
- diaviosOpen: false,
- diaviosTKOpen: false,
- dialogVisible: false,
- tableSet: this.tableSets,
- allCheckData: [], //表格多选
- checkAll: true,
- checkedCities: [], //自定义列 选中数组
- cities: [], //自定义列 总数组
- isIndeterminate: false,
- videoUrls: "",
- diaBox: false,
- isShowBoxs: false,
- listBoxsGET: [],
- props: {
- label(data, node) {
- return data.menuName || data.name;
- },
- isLeaf(data, node) {
- return data.hasChildren ? false : true;
- },
- },
- props1: {
- label(data, node) {
- return data.courseName || data.menuName || data.name;
- },
- isLeaf(data, node) {
- return data.hasChildren ? false : true;
- },
- },
- props2: {
- label(data, node) {
- return data.examName || data.menuName || data.name;
- },
- isLeaf(data, node) {
- return data.hasChildren ? false : true;
- },
- },
- treeDatas: [],
- treeDatas1: [],
- treeDatas2: [],
- clientHeight: 0,
- };
- },
- computed: {
- tableRadio: {
- get() {
- return this.radio;
- },
- set(val) {
- this.$emit("update:radio", val);
- },
- },
- compTableSet: function () {
- return function (options) {
- var arrays = options.filter((item) => {
- return item.hidden;
- });
- return arrays;
- };
- },
- numTime: function () {
- return function (res) {
- return Number(res / 3600).toFixed(2);
- };
- },
- numTimeminute: function () {
- return function (res) {
- return Number(res / 60).toFixed(2);
- };
- },
- compType: function () {
- return function (res, data) {
- if (data === "POST") {
- if (res.indexOf("edit") !== -1 || res.indexOf("update") !== -1) {
- return "修改";
- } else {
- return "新增";
- }
- } else if (data === "GET") {
- return "查询";
- }
- };
- },
- tableHeight: function () {
- return function (h) {
- var b = document.getElementById("allTableList")?.offsetTop || 0;
- return h - b - 85;
- };
- },
- },
- created() {
- if (this.studentTable) {
- let data = sessionStorage.getItem("studentTableList");
- if (data && data !== "") {
- this.tableSet = JSON.parse(data);
- }
- }
- this.inittableSet = JSON.stringify(this.tableSet);
- this.initTR();
- },
- mounted() {
- this.clientHeight = document.documentElement.clientHeight;
- window.addEventListener(
- "resize",
- () => {
- this.clientHeight = document.documentElement.clientHeight;
- },
- true
- );
- },
- methods: {
- selectFuncTrue() {
- return true;
- },
- radioChange(val) {},
- /**
- * 学习账号标记跳转班级
- */
- backClassView(row, type) {
- this.$emit("classView", row, type);
- },
- blurBackData(row) {
- this.$emit("sortFunc", row);
- },
- backFunc(row) {
- this.$emit("backFunc", row);
- },
- /**
- * 清除多选框
- */
- clearMoreActive() {
- this.allCheckData = [];
- this.$refs.pagerset.clearSelection();
- },
- isShowBoxsFun(item) {
- this.$api.inquireuserUpdateListsy({ userId: item.userId }).then((res) => {
- this.listBoxsGET = res.rows;
- this.isShowBoxs = true;
- // this.$api
- // .editgradestudentuserUpdate({ userId: item.userId, status: 1 })
- // .then((result) => {});
- });
- },
- openDialog(row) {
- this.$emit("openDialog", row);
- },
- sortMethods(a, b) {
- if (a.classGradeUserGoodsVoList && b.classGradeUserGoodsVoList) {
- return a.classGradeUserGoodsVoList.length >
- b.classGradeUserGoodsVoList.length
- ? -1
- : 1;
- } else {
- return a.sort > b.sort ? -1 : 1;
- }
- },
- sortChange(column) {
- this.$emit("sortChange", column);
- },
- openSpec(id) {
- this.$emit("openClassNum", id);
- },
- /**
- * int: 1 节列表-关联章 2 章列表-关联模块 3 模块列表-关联课程 4 课程列表-关联商品 5 题目列表-关联试卷 6 试卷列表-关联商品 7 章卷列表-关联商品 8 模块列表-关联商品
- */
- jumpPages(v, int) {
- if (int === 1) {
- const jump = () => {
- this.$router.push({
- path: "/resource/videoManagement/chapterEdit",
- query: {
- id: v.chapterId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "ChapterEdit";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "ChapterEdit",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }
- if (int === 2) {
- const jump = () => {
- this.$router.push({
- path: "/resource/videoManagement/moduleManagementEdit",
- query: {
- id: v.moduleId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "ModuleManagementEdit";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "ModuleManagementEdit",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }
- if (int === 3) {
- const jump = () => {
- this.$router.push({
- path: "/resource/videoManagement/editCourse",
- query: {
- id: v.courseId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "EditCourse";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "EditCourse",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }
- if (int === 4) {
- const jump = () => {
- this.$router.push({
- name: "CommodityManageMentEdit",
- query: {
- id: v.goodsId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "CommodityManageMentEdit";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "CommodityManageMentEdit",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }
- if (int === 5) {
- const jump = () => {
- this.$router.push({
- path: "/resource/bankManagement/editPaper",
- query: {
- id: v.examId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "EditPaper";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "EditPaper",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }
- if (int === 6) {
- const jump = () => {
- this.$router.push({
- path: "/Marketing/goods/commodityManageMentEdit",
- query: {
- id: v.goodsId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "CommodityManageMentEdit";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "CommodityManageMentEdit",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }
- if (int === 7) {
- const jump = () => {
- this.$router.push({
- path: "/Marketing/goods/commodityManageMentEdit",
- query: {
- id: v.goodsId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "CommodityManageMentEdit";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "CommodityManageMentEdit",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }
- if (int === 8) {
- const jump = () => {
- this.$router.push({
- path: "/Marketing/goods/commodityManageMentEdit",
- query: {
- id: v.goodsId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "CommodityManageMentEdit";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "CommodityManageMentEdit",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }
- },
- getSimpleText(html) {
- var re1 = new RegExp("<.+?>", "g"); //匹配html标签的正则表达式,"g"是搜索匹配多个符合的内容
- var msg = html.replace(re1, ""); //执行替换成空字符
- return msg;
- },
- //树形图关闭
- closes() {
- this.dialogVisible = false;
- },
- loadNode(node, resolve) {
- if (node.level === 0) {
- this.treeDatas.forEach((item) => {
- if (item.type === 1) {
- item.hasChildren = true;
- }
- if (item.type === 2) {
- item.hasChildren = true;
- }
- if (item.type === 3) {
- item.hasChildren = false;
- }
- });
- return resolve(this.treeDatas);
- } else {
- if (node.data.type === 1) {
- this.$api
- .inquireCourseListmodulechapter(node.data.menuId)
- .then((res) => {
- res.data.forEach((item) => {
- item.TypeId = 2 + "-" + item.chapterId;
- item.hasChildren = true;
- item.menuId = item.chapterId;
- item.type = 2;
- });
- return resolve(res.data);
- });
- }
- if (node.data.type === 2) {
- this.$api
- .inquireCoursechaptersectionlist(node.data.menuId)
- .then((res) => {
- res.data.forEach((item) => {
- item.TypeId = 3 + "-" + item.sectionId;
- item.type = 3;
- });
- return resolve(res.data);
- });
- }
- if (node.data.type === 3) {
- return resolve([]);
- }
- }
- },
- diavios(ids) {
- console.log(ids, "触发");
- this.$api.obtainCourseSgoodsId(ids).then((res) => {
- res.rows.forEach((item) => {
- item.TypeId = "0-" + item.courseId;
- item.type = 0;
- item.hasChildren = true;
- });
- this.treeDatas1 = res.rows;
- this.diaviosOpen = true;
- });
- },
- loadNode1(node, resolve) {
- if (node.level === 0) {
- return resolve(this.treeDatas1);
- } else {
- if (node.data.type === 0) {
- this.$api
- .inquireCoursemenuListS({ courseId: node.data.courseId })
- .then((res) => {
- res.rows.forEach((item) => {
- item.TypeId = 1 + "-" + item.menuId;
- item.hasChildren = item.type === 3 ? false : true;
- item.menuId = item.menuId;
- });
- return resolve(res.rows);
- });
- }
- if (node.data.type === 1) {
- this.$api
- .inquireCourseListmodulechapter(node.data.menuId)
- .then((res) => {
- res.data.forEach((item) => {
- item.TypeId = 2 + "-" + item.chapterId;
- item.hasChildren = true;
- item.menuId = item.chapterId;
- item.type = 2;
- });
- return resolve(res.data);
- });
- }
- if (node.data.type === 2) {
- this.$api
- .inquireCoursechaptersectionlist(node.data.menuId)
- .then((res) => {
- res.data.forEach((item) => {
- item.TypeId = 3 + "-" + item.sectionId;
- item.type = 3;
- });
- return resolve(res.data);
- });
- }
- if (node.data.type === 3) {
- return resolve([]);
- }
- }
- },
- openBoxData(row) {
- this.$emit("openBoxFun", row);
- },
- diaviosTK(ids) {
- this.$api.inquireGoodsbanklist({ goodsId: ids }).then((res) => {
- res.data.forEach((item) => {
- item.TypeId = item.type + "-" + item.majorId;
- item.hasChildren = item.type === 3 ? false : true;
- });
- this.treeDatas2 = res.data;
- this.diaviosTKOpen = true;
- });
- },
- loadNode2(node, resolve) {
- if (node.level === 0) {
- return resolve(this.treeDatas2);
- } else {
- if (node.data.type === 1) {
- this.$api
- .inquireBankchapterModule({ moduleExamId: node.data.majorId })
- .then((res) => {
- res.data.forEach((item) => {
- item.TypeId = 2 + "-" + item.chapterExamId;
- item.menuId = item.chapterExamId;
- item.type = 2;
- });
- return resolve(res.data);
- });
- }
- if (node.data.type === 2) {
- this.$api
- .inquirebankchapterexamList({
- chapterExamId: node.data.majorId,
- })
- .then((res) => {
- res.data.forEach((item) => {
- item.TypeId = 3 + "-" + item.examId;
- item.type = 3;
- });
- return resolve(res.data);
- });
- }
- if (node.data.type === 3) {
- return resolve([]);
- }
- }
- },
- timeStyle(column) {
- if (column.columnIndex === 0 && this.navText.firstColLeft) {
- return "text-align:left!important; padding-left: 40px;";
- }
- },
- //初始化
- initTR() {
- this.cities = [];
- this.checkedCities = [];
- this.checkAll = true;
- this.isIndeterminate = false;
- this.tableSet.forEach((item, index) => {
- this.cities.push(item.label);
- if (item.hidden) {
- this.checkedCities.push(item.label);
- }
- });
- this.tableSet = [];
- this.$nextTick(() => {
- this.tableSet = JSON.parse(this.inittableSet);
- });
- if (this.checkedCities.length === 0) {
- this.isIndeterminate = false;
- } else if (this.checkedCities.length === this.cities.length) {
- this.isIndeterminate = false;
- this.checkAll = true;
- } else {
- this.isIndeterminate = true;
- this.checkAll = false;
- }
- },
- //自定义列全选按钮触发
- handleCheckAllChange(val) {
- this.checkedCities = val ? this.cities : [];
- this.isIndeterminate = false;
- if (val) {
- this.tableSet = [];
- this.$nextTick(() => {
- this.tableSet = JSON.parse(this.inittableSet);
- });
- } else {
- this.tableSet.forEach((item, index) => {
- item.hidden = false;
- });
- }
- },
- // 勾选自定义列子选项
- handleCheckedCitiesChange(value) {
- var copyTable = JSON.parse(JSON.stringify(this.tableSet));
- let checkedCount = value.length;
- this.checkAll = checkedCount === this.cities.length;
- this.isIndeterminate =
- checkedCount > 0 && checkedCount < this.cities.length;
- this.tableSet = [];
- this.$nextTick(() => {
- this.tableSet = copyTable;
- });
- },
- checkboxChange(v, e) {
- var copyTable = JSON.parse(JSON.stringify(this.tableSet));
- copyTable.forEach((item) => {
- if (item.label === v) {
- item.hidden = e;
- }
- });
- this.tableSet = [];
- this.$nextTick(() => {
- this.tableSet = copyTable;
- if (this.studentTable) {
- sessionStorage.setItem("studentTableList", JSON.stringify(copyTable));
- }
- });
- },
- //自定义列重置
- initVue() {
- // this.$emit("initTableset");
- this.tableSet = JSON.parse(this.inittableSet);
- this.initTR();
- },
- // 下移
- downMove(option, index) {
- if (index !== this.tableSet.length - 1) {
- this.tableSet[index] = this.tableSet.splice(
- index + 1,
- 1,
- this.tableSet[index]
- )[0];
- this.cities[index] = this.cities.splice(
- index + 1,
- 1,
- this.cities[index]
- )[0];
- } else {
- this.tableSet.unshift(this.tableSet.splice(index, 1)[0]);
- this.cities.unshift(this.cities.splice(index, 1)[0]);
- }
- var copyTable = JSON.parse(JSON.stringify(this.tableSet));
- this.tableSet = [];
- this.$nextTick(() => {
- this.tableSet = copyTable;
- });
- },
- // 上移
- upMove(option, index) {
- if (index != 0) {
- this.tableSet[index] = this.tableSet.splice(
- index - 1,
- 1,
- this.tableSet[index]
- )[0];
- this.cities[index] = this.cities.splice(
- index - 1,
- 1,
- this.cities[index]
- )[0];
- } else {
- this.tableSet.push(this.tableSet.shift());
- this.cities.push(this.cities.shift());
- }
- var copyTable = JSON.parse(JSON.stringify(this.tableSet));
- this.tableSet = [];
- this.$nextTick(() => {
- this.tableSet = copyTable;
- });
- },
- //跳转页面
- jumpPage(options) {
- const jump = () => {
- this.$router.push({
- path: "dictData",
- query: {
- dictId: options.dictId,
- dictType: options.dictType,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "DictData";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "DictData",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- },
- //跳转页面
- jumpPageLabel(options) {
- const jump = () => {
- this.$router.push({
- path: "labelInfos",
- query: {
- id: options.id,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "LabelInfos";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "LabelInfos",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- }, //跳转页面
- jumpPageLabelProfess(options) {
- const jump = () => {
- this.$router.push({
- path: "labelInfos",
- query: {
- id: options.labelId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "LabelInfos";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "LabelInfos",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- },
- jumpinfoJump(options) {
- const jump = () => {
- this.$router.push({
- path: "beneficiaryInfos",
- query: {
- id: options.payeeId,
- },
- });
- };
- const statusPage = this.$store.state.tagsView.visitedViews.some(
- (item) => {
- return item.name == "BeneficiaryInfos";
- }
- );
- if (statusPage) {
- this.$store
- .dispatch("tagsView/delCachedView", {
- name: "BeneficiaryInfos",
- })
- .then((res) => {
- jump();
- });
- } else {
- jump();
- }
- },
- //新增按钮
- addClick() {
- this.$emit("addClick");
- },
- //将选中值传回调用组件
- backFather() {
- this.$emit("emitData", this.allCheckData);
- },
- edit() {},
- selectAll(value) {
- this.allCheckData = value;
- this.$emit("selectAll", value);
- },
- select(selection, row) {
- this.allCheckData = selection;
- this.$emit("select", selection, row);
- },
- load(tree, treeNode, resolve) {
- this.$emit("load", tree, treeNode, resolve);
- },
- editInfo(option, int) {
- if (int === 2) {
- this.$emit("editName", option);
- } else if (int === 3) {
- this.$emit("aboutGoods", option);
- } else {
- this.$emit("editInfo", option);
- }
- },
- getxq(option) {
- this.$emit("getxq", option.userId);
- },
- openVideo(url) {
- this.videoUrls = url;
- this.diaBox = true;
- },
- closeBeforefs() {
- this.diaBox = false;
- },
- },
- };
- </script>
- <style lang="less">
- .el-table .info-row {
- background: #c9c9c9;
- }
- .open_style {
- cursor: pointer;
- color: blue;
- }
- .el-table .cell.el-tooltip {
- transition: all 0.3s;
- }
- .max-heightStyles {
- max-height: 500px;
- overflow-y: auto;
- }
- .overSty {
- white-space: nowrap;
- overflow-x: auto;
- &::-webkit-scrollbar {
- width: 14px;
- height: 14px;
- }
- &::-webkit-scrollbar-track,
- &::-webkit-scrollbar-thumb {
- border-radius: 999px;
- border: 5px solid transparent;
- }
- &::-webkit-scrollbar-track {
- box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2) inset;
- }
- &::-webkit-scrollbar-thumb {
- min-height: 20px;
- background-clip: content-box;
- box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2) inset;
- }
- &::-webkit-scrollbar-corner {
- background: transparent;
- }
- }
- .slotPopper {
- padding: 0px !important;
- }
- </style>
- <style lang="less" scoped>
- #tableList {
- padding: 16px 16px 16px;
- border-radius: 8px;
- box-shadow: 0px 0px 9px 1px rgba(28, 41, 90, 0.1);
- background: #ffffff;
- .headerNavTool {
- height: 72px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: -16px;
- .rightBtnBox {
- display: flex;
- align-items: center;
- }
- }
- }
- .goodsListStyle {
- cursor: pointer;
- color: blue;
- }
- .popoverDis {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- font-size: 14px;
- .checkboxHeader {
- height: 40px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-left: 13px;
- padding-right: 15px;
- width: 100%;
- .initbtns {
- color: #47a6ff;
- cursor: pointer;
- }
- }
- .checkboxGroup {
- display: flex;
- flex-direction: column;
- width: 100%;
- .checkboxchild {
- width: 100%;
- justify-content: space-between;
- height: 40px;
- display: flex;
- align-items: center;
- padding: 0px 15px 0px 13px;
- transition: all 0.4s;
- &:hover {
- background-color: #ecf5ff;
- }
- &:hover .icon-right {
- display: flex;
- }
- .icon-right {
- display: flex;
- align-items: center;
- width: 30px;
- height: 30px;
- color: #666;
- font-size: 14px;
- display: none;
- i {
- cursor: pointer;
- margin: 0px 3px;
- &:hover {
- color: #47a6ff;
- }
- }
- }
- }
- }
- }
- /deep/.el-checkbox__input.is-checked + .el-checkbox__label {
- color: #666;
- }
- .imgboxsq {
- margin: 0 auto;
- height: 60px;
- max-height: 60px;
- .el_images {
- /deep/.el-image__inner {
- width: auto;
- }
- }
- }
- .imgHover {
- width: 100%;
- height: 100%;
- cursor: pointer;
- }
- .cvideo {
- transition: all 0.2s;
- color: #333;
- cursor: pointer;
- font-size: 30px;
- }
- .cvideo:hover {
- color: #47a6ff;
- }
- .editInfoSty {
- cursor: pointer;
- color: blue;
- }
- .ulAuto {
- display: flex;
- justify-content: center;
- align-items: center;
- & > ul {
- margin: 0px;
- }
- }
- .ulAutos {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .el-popover > ul {
- margin: 0px;
- }
- .dis_sdt {
- display: flex;
- align-items: flex-end;
- ul {
- margin: 0px;
- li {
- text-align: left;
- }
- }
- }
- .jumpStys {
- color: blue;
- cursor: pointer;
- }
- .zdyBoxStyle {
- display: flex;
- align-items: center;
- justify-content: center;
- .zdyBtnstyle {
- padding: 4px 16px;
- border-radius: 4px;
- border: 1px solid #666;
- color: #666;
- cursor: pointer;
- }
- .goodsActiveStyle {
- color: #fff;
- background-color: #409eff;
- border-color: #409eff;
- }
- }
- .liSYTS {
- padding: 10px;
- margin-bottom: 16px;
- background: #eee;
- width: 96%;
- }
- .overBoxs {
- max-height: 500px;
- overflow-y: auto;
- }
- </style>
|