12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606 |
- <template>
- <div class="feature-box">
- <div class="feature ">
- <ul >
- <li @click="dialogVisible = true">
- <span>
- <img :src="new1" alt="" style="width:40px;height:40px">
- <p>轮播图</p>
- </span>
- </li>
- <li @click="two = true">
- <span>
- <img :src="new2" alt="" style="width:40px;height:40px">
- <p>医院介绍</p>
- </span>
- </li>
- <li @click="three = true">
- <span>
- <img :src="new3" alt="" style="width:40px;height:40px">
- <p>科室介绍</p>
- </span>
- </li>
- <li @click="four = true">
- <span>
- <img :src="new4" alt="" style="width:40px;height:40px">
- <p>医护团队</p>
- </span>
- </li>
- <li @click="five = true">
- <span>
- <img :src="new5" alt="" style="width:40px;height:40px">
- <p>医院环境</p>
- </span>
- </li>
- <li @click="six = true">
- <span>
- <img :src="new6" alt="" style="width:40px;height:40px">
- <p>医院动态</p>
- </span>
- </li>
- <li @click="seven = true">
- <span>
- <img :src="new7" alt="" style="width:40px;height:40px">
- <p>医院活动</p>
- </span>
- </li>
- <li @click="eight = true" >
- <span>
- <img :src="new8" alt="" style="width:40px;height:40px">
- <p>魔方导航</p>
- </span>
- </li>
- </ul>
- </div>
- <div class="clear"></div>
- <!-- 新增轮播图 -->
- <el-dialog
- title="新增轮播图"
- :visible.sync="dialogVisible"
- width="50%"
- center>
- <el-form ref="rotationform" :model="rotationform" label-width="90px" :rules="rules" >
- <el-form-item label="模块标题:" required prop="title">
- <el-input v-model="rotationform.title" @input="changeInput($event)"></el-input>
- </el-form-item>
- <el-form-item label="排序值:" required prop="sort">
- <el-input v-model="rotationform.sort" @input="changeInput($event)" type="number"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- <el-form-item label="添加图片:">
- <div class="flex-img">
- <div class="el-upload-list el-upload-list--picture-card">
- <div class="el-upload-list__item is-success" v-for="(item,index) in this.rotationdatatwo" :key="item.id" v-show="isEmpty">
- <img class="flex-img__image" :src="item.images">
- <label class="el-upload-list__item-status-label">
- <i class="el-icon-upload-success el-icon-check"></i>
- </label>
- <span class="el-upload-list__item-actions">
- <span class="el-upload-list__item-delete">
- <i class="el-icon-edit-outline" @click="editRotationImages(item.id);editRotionImages = true"></i>
- <i class="el-icon-delete" @click="deleteRotations(item.id,index)"></i>
- </span>
- </span>
- </div>
- </div>
- <div class="addrot" @click="addpicVisible = true" v-show="isNoEmpty">
- <div class="addrotone">
- <i class="el-icon-plus"></i>
- </div>
- <div class="addrotwo">
- <span>新增图片</span>
- </div>
- </div>
- </div>
- <p class="tips">图片已上传{{totalImages}}张,最多上传9张</p>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="AddRotationChart('rotationform');">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 编辑图片 -->
- <el-dialog
- title="添加图片"
- :visible.sync="addpicVisible"
- width="40%"
- center>
- <el-form ref="picform" :model="picform" label-width="90px" :rules="rules">
- <el-form-item label="图片编辑:" required prop="imageUrl">
- <el-col :span="5">
- <el-upload
- :data="imageData"
- class="avatar-uploader"
- action="https://upload.qiniup.com"
- :show-file-list="false"
- :on-success="rotationSuccess"
- :before-upload="rotationUpload"
- :limit="9">
- <img v-if="picform.imageUrl" :src="picform.imageUrl" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-col>
- <el-col :span="19" v-show="isImages">
- <div class="tpic">
- <img :src="picform.imageUrl" style="width:250px;height:150px">
- </div>
- </el-col>
- </el-form-item>
- <el-form-item label="排序值:" required prop="sort">
- <el-col :span="24">
- <el-input v-model="picform.sort" style="width:410px" type="number"></el-input>
- </el-col>
- </el-form-item>
- <el-form-item label="图片链接:">
- <el-radio-group v-model="picform.imagelink">
- <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderPicLink" :key="index" @change="select(gender.id)">{{gender.name}}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="链接地址:" v-show="selectone">
- <el-col :span="15">
- <el-input v-model="picform.linkaddress" style="width:300px" :disabled="true"></el-input>
- </el-col>
- <el-col :span="4">
- <el-button size="medium" @click="linkVisible = true">设置链接</el-button>
- </el-col>
- </el-form-item>
-
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="addpicVisible = false">取 消</el-button>
- <el-button type="primary" @click="AddImageslink('picform');addpicVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- <el-dialog
- title="添加图片"
- :visible.sync="addpicdialogVisible"
- width="30%"
- center>
- <el-form>
- <el-form-item label="添加图片:">
- <el-upload
- :data="imageData"
- class="avatar-uploader"
- action="https://upload.qiniup.com"
- :show-file-list="false"
- :on-success="rotationSuccess"
- :before-upload="rotationUpload">
- <img v-if="picform.imageUrl" :src="picform.imageUrl" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="addpicdialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="addpicdialogVisible = false">确 定</el-button>
- </span>
- </el-dialog> -->
-
- <!-- 设置图片链接地址 -->
- <el-dialog
- title="设置图片链接地址"
- :visible.sync="linkVisible"
- width="30%"
- center>
- <el-form label-width="90px" :model="linkformtwo" ref="linkformtwo">
- <el-form-item label="站外链接:">
- <el-input v-model="linkformtwo.address"></el-input>
- </el-form-item>
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="linkVisible = false">取 消</el-button>
- <el-button type="primary" @click="AddLinkAddress('linkformtwo');">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 新增医院介绍 -->
- <el-dialog
- title="新增医院介绍"
- :visible.sync="two"
- width="50%"
- :modal='false'
- v-dialogDrag
- :close-on-click-modal="false"
- center>
- <el-form ref="hispitalform" :model="hispitalform" label-width="90px" :rules="rules">
- <el-form-item label="模块标题:" required prop="title">
- <el-input v-model="hispitalform.title"></el-input>
- </el-form-item>
- <el-form-item label="排序值:" required prop="sort">
- <el-input v-model="hispitalform.sort" type="number"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- <el-form-item label="医院介绍:" required prop="introduction">
- <keep-alive>
- <neditor ref="neditor"
- id="editor"
- v-bind:r_content="hispitalform.introduction">
- </neditor>
- </keep-alive>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="two = false">取 消</el-button>
- <el-button type="primary" @click="saveHispital('hispitalform');">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 新增科室介绍 -->
- <el-dialog
- title="新增科室介绍"
- :visible.sync="three"
- width="50%"
- center>
- <el-form ref="administform" :model="administform" label-width="90px" :rules="rules">
- <el-form-item label="模块标题:" required prop="title">
- <el-input v-model="administform.title"></el-input>
- </el-form-item>
- <el-form-item label="排序值:" required prop="sort">
- <el-input v-model="administform.sort" type="number" ></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- <el-form-item label="科室介绍:" required prop="introduction">
- <keep-alive>
- <neditor ref="neditor"
- id="editorthree"
- v-bind:r_content="administform.introduction">
- </neditor>
- </keep-alive>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="three = false">取 消</el-button>
- <el-button type="primary" @click="addAdminist('administform');">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 新增名医介绍 -->
- <el-dialog
- title="新增名医介绍"
- :visible.sync="four"
- width="50%"
- center>
- <el-form ref="doctorform" :model="doctorform" label-width="90px" :rules="rules" >
- <el-form-item label="模块标题:" required prop="title">
- <el-input v-model="doctorform.title"></el-input>
- </el-form-item>
- <el-form-item label="排序值:" required prop="sort">
- <el-input v-model="doctorform.sort" type="number"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- <el-form-item label="新增名医:" v-model="doctorform.image">
- <div class="flex-img" v-show="headshow">
- <div class="el-upload-list el-upload-list--picture-card" >
- <div class="el-upload-list__item is-success" v-for="(item,index) in this.docform" :key="item.id">
- <img class="flex-img__image" :src="item.dochead">
- <label class="el-upload-list__item-status-label">
- <i class="el-icon-upload-success el-icon-check"></i>
- </label>
- <span class="el-upload-list__item-actions">
- <span class="el-upload-list__item-delete">
- <i class="el-icon-edit-outline" @click="editDoctor(item.id);editcenterDialogVisible = true"></i>
- <i class="el-icon-delete" @click="deleteDoctor(item.id,index)"></i>
- </span>
- </span>
- </div>
- </div>
- </div>
- <div class="doc" @click="centerDialogVisible = true">
- <div class="docone">
- <li class="el-icon-plus"></li>
- </div>
- <div class="doctwo">
- <span>新增名医</span>
- </div>
- </div>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="four = false">取 消</el-button>
- <el-button type="primary" @click="AddDoctor('doctorform');">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 新增医生信息 -->
- <el-dialog
- title="新增医生信息"
- :visible.sync="centerDialogVisible"
- width="50%"
- center>
- <el-form label-width="90px" class="clearfix" :model="eidtDoctorform" ref="eidtDoctorform" :rules="rules">
- <el-row :span=20>
- <el-col :span="12">
- <el-form-item label="医生姓名:" required prop="name">
- <el-select placeholder="请选择" v-model="eidtDoctorform.name" @change="change(eidtDoctorform.name)">
- <el-option
- v-for="item in docnames"
- :key="item.id"
- :label="item.name"
- :value="item.id" >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="医生职称:" required prop="user_title">
- <el-select v-model="eidtDoctorform.user_title" placeholder="请选择">
- <el-option
- v-for="item in positions"
- :key="item.index"
- :label="item.name"
- :value="item.index">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :span=20>
- <el-form-item label="医生头像:" required prop="dochead">
- <el-col :span="5">
- <el-upload
- :data="doctorData"
- class="avatar-uploader"
- action="https://upload.qiniup.com"
- :show-file-list="false"
- :on-success="handleAvatarSuccess"
- :before-upload="beforeAvatarUpload">
- <img v-if="eidtDoctorform.dochead" :src="eidtDoctorform.dochead" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-col>
- <el-col :span="16">
- <el-form-item label="排序值:" required prop="sort">
- <el-input v-model="eidtDoctorform.sort" type="number"></el-input>
- </el-form-item>
- </el-col>
- </el-form-item>
- </el-row>
- <el-row :span=20>
- <el-form-item label="医生简介:" required prop="content">
- <keep-alive>
- <neditor ref="neditor"
- id="editorsix"
- v-bind:r_content="eidtDoctorform.content">
- </neditor>
- </keep-alive>
- </el-form-item>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="centerDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="AddDoctorInfo('eidtDoctorform')">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="编辑医生介绍"
- :visible.sync="editcenterDialogVisible"
- width="50%"
- center>
- <el-form label-width="90px" class="clearfix" :model="editdocfrom" ref="editdocfrom" :rules="rules">
- <el-row :span=20>
- <el-col :span="10">
- <el-form-item label="医生姓名:" required prop="doc_name">
- <el-input v-model="editdocfrom.doc_name"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="医生职称:" required prop="doc_postion">
- <el-select v-model="editdocfrom.doc_postion" placeholder="请选择">
- <el-option
- v-for="item in positions"
- :key="item.index"
- :label="item.name"
- :value="item.index">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :span=20>
- <el-form-item label="医生头像:" required prop="dochead">
- <el-col :span="10">
- <el-upload
- :data="doctorDatatwo"
- class="avatar-uploader"
- action="https://upload.qiniup.com"
- :show-file-list="false"
- :on-success="handleAvatarSuccesstwo"
- :before-upload="beforeAvatarUploadtwo">
- <img v-if="editdocfrom.dochead" :src="editdocfrom.dochead" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-col>
- <el-col :span="12">
- <el-form-item label="排序值:" required prop="doc_sort">
- <el-input v-model="editdocfrom.doc_sort" type="number"></el-input>
- </el-form-item>
- </el-col>
- </el-form-item>
- </el-row>
- <el-row :span=20>
- <el-form-item label="医生简介:" required prop="docintroduction">
- <keep-alive>
- <neditor ref="neditor"
- id="editor"
- v-bind:r_content="editdocfrom.docintroduction">
- </neditor>
- </keep-alive>
- </el-form-item>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="editcenterDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="saveDocInfo('editdocfrom')">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 新增科室环境 -->
- <el-dialog
- title="新增科室环境"
- :visible.sync="five"
- width="50%"
- center>
- <el-form ref="keform" :model="keform" label-width="110px" :rules="rules">
- <el-form-item label="模块标题: " required prop="title">
- <el-input v-model="keform.title"></el-input>
- </el-form-item>
- <el-form-item label="排序值: " required prop="sort">
- <el-input v-model="keform.sort" type="number"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- <el-form-item label="新增科室环境:" v-model="keform.keImages" >
- <div class="flex-img">
- <div class="el-upload-list el-upload-list--picture-card" v-show="isEmpty">
- <div class="el-upload-list__item is-success" v-for="(it,index) in this.rotationdata" :key="it.id">
- <img class="flex-img__image" :src="it.enviroimages">
- <label class="el-upload-list__item-status-label">
- <i class="el-icon-upload-success el-icon-check"></i>
- </label>
- <span class="el-upload-list__item-actions">
- <span class="el-upload-list__item-delete">
- <i class="el-icon-edit-outline" @click="EditEnvirImages(it.id);officetwoVisible = true"></i>
- <i class="el-icon-delete" @click="deleteOfficeById(it.id,index)"></i><br>
- </span>
- </span>
- </div>
- </div>
- <div class="upic" @click="officeVisible = true">
- <div class="icon">
- <i class="el-icon-plus"></i>
- </div>
- <div class="ufont">
- <span>新增图片</span>
- </div>
- </div>
- </div>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="five = false">取 消</el-button>
- <el-button type="primary" @click="AddOfficeEnvironment('keform')">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="图片编辑"
- :visible.sync="officeVisible"
- width="35%"
- center>
- <el-form label-width="90px" :model="officeform" ref="officeform" :rules="rules">
- <el-form-item label="图片编辑:" required prop="enviroimages" >
- <el-upload
- :data="keData"
- class="avatar-uploader"
- action="https://upload.qiniup.com"
- :show-file-list="false"
- :on-success="officehandleAvatarSuccess"
- :before-upload="officebeforeAvatarUpload">
- <img v-if="officeform.enviroimages" :src="officeform.enviroimages" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-form-item>
- <el-form-item label="排序:" required prop="sort">
- <el-input v-model="officeform.sort"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="officeVisible = false">取 消</el-button>
- <el-button type="primary" @click="AddImages('officeform');officeVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="图片编辑"
- :visible.sync="officetwoVisible"
- width="30%"
- center>
- <el-form label-width="90px" :model="officetwoform" ref="officetwoform" :rules="rules">
- <el-form-item label="图片编辑:" required prop="enviroimages" >
- <el-upload
- :data="keData"
- class="avatar-uploader"
- action="https://upload.qiniup.com"
- :show-file-list="false"
- :on-success="officetwohandleAvatarSuccess"
- :before-upload="officetwobeforeAvatarUpload">
- <img v-if="officetwoform.enviroimages" :src="officetwoform.enviroimages" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-form-item>
- <el-form-item label="排序:" required prop="sort">
- <el-input v-model="officetwoform.sort"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="officetwoVisible = false">取 消</el-button>
- <el-button type="primary" @click="AddtwoImages('officetwoform');officetwoVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
-
-
-
- <!-- 新增文章列表 -->
- <el-dialog
- title="新增文章列表"
- :visible.sync="six"
- width="50%"
- center>
- <el-form ref="articeform" :model="articeform" label-width="110px" :rules="rules">
- <el-form-item label="模块标题:" required prop="title">
- <el-input v-model="articeform.title"></el-input>
- </el-form-item>
- <el-form-item label="排序值:" required prop="sort">
- <el-input v-model="articeform.sort" type="number"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- <!-- <el-form-item label="文章分类: ">
- <el-select v-model="articeform.category" style="width:49%;float:left;">
- <el-option
- v-for="item in articeType"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- <el-select v-model="articeform.categoryone" style="width:49%;float:right;">
- <el-option
- v-for="item in articeTypelist"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item> -->
- <el-form-item label="首页展示条数: " required prop="number">
- <el-input v-model="articeform.number"></el-input>
- <p class="tips">请输入1-9的整数,最大数量为9</p>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="six = false">取 消</el-button>
- <el-button type="primary" @click="AddArticeList('articeform');six = false">确 定</el-button>
- </span>
- </el-dialog>
- <!-- 新增活动列表 -->
- <el-dialog
- title="新增活动列表"
- :visible.sync="seven"
- width="50%"
- center>
- <el-form ref="activeform" :model="activeform" label-width="120px" :rules="rules">
- <el-form-item label="模块标题: " required prop="title">
- <el-input v-model="activeform.title"></el-input>
- </el-form-item>
- <el-form-item label="排序值: " required prop="sort">
- <el-input v-model="activeform.sort" type="number"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
-
- <el-form-item label="首页展示条数: " required prop="number">
- <el-input v-model="activeform.number"></el-input>
- <p class="tips">请输入1-9的整数</p>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="seven = false">取 消</el-button>
- <el-button type="primary" @click="addActiveform('activeform');seven = false">确 定</el-button>
- </span>
- </el-dialog>
- <!-- 新增魔方导航 -->
- <el-dialog
- title="新增魔方导航"
- :visible.sync="eight"
- width="58%"
- center>
- <el-form ref="marginform" :model="marginform" label-width="90px" :rules="rules" >
- <el-form-item label="模块标题:" required prop="title">
- <el-input v-model="marginform.title"></el-input>
- </el-form-item>
- <el-form-item label="排序值:" required prop="sort">
- <el-input v-model="marginform.sort" type="number"></el-input>
- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
- </el-form-item>
- <el-form-item label="添加图片:" v-model="marginform.marginImages" required prop="marginImages">
- <div class="flex-img">
- <div class="el-upload-list el-upload-list--picture-card" v-for="item in margindata" :key="item.id" v-show="isEmpty">
- <div class="el-upload-list__item is-success">
- <img class="flex-img__image" :src="item.margimage">
- <label class="el-upload-list__item-status-label">
- <i class="el-icon-upload-success el-icon-check"></i>
- </label>
- <span class="el-upload-list__item-actions">
- <span class="el-upload-list__item-delete">
- <i class="el-icon-edit-outline" @click="editImages(item.id);EditMacDialogVisible = true"></i>
- <i class="el-icon-delete" @click="deleteMargin(item.id,index)"></i><br>
- <i class="yangshi">{{item.margtitle}}</i>
- </span>
- </span>
- </div>
- </div>
- <div class="upic" @click="MagicNavigation = true">
- <div class="icon">
- <i class="el-icon-plus"></i>
- </div>
- <div class="ufont">
- <span>新增导航</span>
- </div>
- </div>
- </div>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="eight = false">取 消</el-button>
- <el-button type="primary" @click="AddMarginChart('marginform');">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="编辑魔方导航"
- :visible.sync="EditMacDialogVisible"
- width="35%"
- center>
- <el-form label-width="90px" ref="editmacform" :model="editmacform" :rules="rules">
- <el-form-item label="导航标题:" required prop="margtitle">
- <el-input v-model="editmacform.margtitle"></el-input>
- </el-form-item>
- <el-form-item label="导航图标:" required prop="margimage">
- <el-upload
- :data="rotationData"
- class="avatar-uploader"
- action="https://upload.qiniup.com"
- :show-file-list="false"
- :on-success="machandleAvatarSuccess"
- :before-upload="macbeforeAvatarUpload">
- <img v-if="editmacform.margimage" :src="editmacform.margimage" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-form-item>
- <el-form-item label="跳转设置:" required="jumpset">
- <el-radio-group v-model="editmacform.jumpset">
- <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="selectGender(gender.id)">{{gender.name}}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item>
- <el-col :span="18">
- <el-input style="width:300px" v-model="editmacform.marginaddress" v-show="define" :disabled="true"></el-input>
- </el-col>
- <el-col :span="4">
- <el-button size="medium" @click="magicVisibleOne = true;GetMagicLinkAddressByID(editmacform.linkid)" v-show="define" >设置链接</el-button>
- </el-col>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="EditMacDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="UpdateEditMacgin('editmacform');">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="设置链接地址"
- :visible.sync="magicVisibleOne"
- width="30%"
- center>
- <el-form label-width="90px">
- <el-form-item label="连接类型">
- <el-radio-group v-model="form.gender">
- <el-radio :label="item.id" :value="item.id" v-for="(item,index) in defineOptions" :key="index" @change="selectItem(item.id)">{{item.name}}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="链接类型:" v-show="definetwo">
- <el-select v-model="value" placeholder="请选择">
- <el-option
- v-for="item in modelTtile"
- :key="item.id"
- :label="item.title"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="电话号码:" v-show="definethree">
- <el-input></el-input>
- </el-form-item>
- <el-form-item label="站外链接:" v-show="definefour">
- <el-input></el-input>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="magicVisibleOne = false">取 消</el-button>
- <el-button type="primary" @click="magicVisibleOne = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 编辑魔法导航 -->
- <el-dialog
- title="编辑魔方导航"
- :visible.sync="MagicNavigation"
- width="35%"
- center>
- <el-form label-width="90px" ref="editmarginform" :model="editmarginform" :rules="rules">
- <el-form-item label="导航标题:" required prop="margtitle">
- <el-input style="width:400px" v-model="editmarginform.margtitle"></el-input>
- </el-form-item>
- <el-form-item label="导航图标:" required prop="margImage" >
- <el-upload
- class="avatar-uploader"
- :data="magicData"
- action="https://upload.qiniup.com"
- :on-success="MagicSuccess"
- :before-upload="MagicUpload"
- :show-file-list="false">
- <img v-if="editmarginform.margImage" :src="editmarginform.margImage" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-form-item>
- <el-form-item label="跳转设置" required prop="jumpset">
- <el-radio-group v-model="editmarginform.jumpset">
- <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="rotationGender(gender.id)">{{gender.name}}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item>
- <el-col :span="15">
- <el-input style="width:300px" v-model="editmarginform.marginaddress" v-show="definefive" :disabled="true"></el-input>
- </el-col>
- <el-col :span="4">
- <el-button size="medium" @click="magicVisible=true" v-show="definefive">设置链接</el-button>
- </el-col>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="MagicNavigation = false">取 消</el-button>
- <el-button type="primary" @click="AddMagicNavi('editmarginform');">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="设置链接地址"
- :visible.sync="magicVisible"
- width="30%"
- center>
- <el-form label-width="90px" ref="maclinkform" :model="maclinkform">
- <el-form-item label="连接类型">
- <el-radio-group v-model="maclinkform.linkType">
- <el-radio :label="item.id" :value="item.id" v-for="(item,index) in defineOptions" :key="index" @change="selectItemtwo(item.id)">{{item.name}}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="链接类型:" v-show="definetwo">
- <el-select v-model="maclinkform.instationlink" placeholder="请选择" clearable>
- <el-option
- v-for="item in modelTtile"
- :key="item.id"
- :label="item.title"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="电话号码:" v-show="definethree">
- <el-input v-model="maclinkform.phone"></el-input>
- </el-form-item>
- <el-form-item label="站外链接:" v-show="definefour">
- <el-input v-model="maclinkform.outstationlink"></el-input>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="magicVisible = false">取 消</el-button>
- <el-button type="primary" @click="AddMagiclinkData('maclinkform');">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 编辑轮播图 -->
- <el-dialog
- title="编辑轮播图"
- :visible.sync="editRotionImages"
- width="35%"
- center>
- <el-form label-width="90px" ref="editrotationform" :model="editrotationform" :rules="rules">
- <el-form-item label="图片编辑:">
- <el-upload
- :data="rotationData"
- class="avatar-uploader"
- action="https://upload.qiniup.com"
- :show-file-list="false"
- :on-success="rotationAvatarSuccess"
- :before-upload="rotationAvatarUpload">
- <img v-if="editrotationform.images" :src="editrotationform.images" class="avatar">
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-form-item>
- <el-form-item label="排序值:" required prop="sort">
- <el-input v-model="editrotationform.sort" type="number"></el-input>
- </el-form-item>
- <el-form-item label="图片链接:">
- <el-radio-group v-model="editrotationform.piclink">
- <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderPicLink" :key="index" @change="select(gender.id)">{{gender.name}}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="链接地址:" v-show="selectone">
- <el-col :span="15">
- <el-input v-model="editrotationform.linkaddress" style="width:300px"></el-input>
- </el-col>
- <el-col :span="4">
- <el-button size="medium" v-show="selectone" @click="rotationVisible = true;GetRotationVisibleByLinkId(editrotationform.linkid)">设置链接</el-button>
- </el-col>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="editRotionImages = false">取 消</el-button>
- <el-button type="primary" @click="updateRotionImages('editrotationform');editRotionImages = false">确 定</el-button>
- </span>
- </el-dialog>
-
-
- <!-- 设置轮播图链接地址 -->
- <el-dialog
- title="设置链接地址"
- :visible.sync="rotationVisible"
- width="30%"
- center>
- <el-form label-width="90px" ref="rotationvisibleform" :model="rotationvisibleform">
- <el-form-item label="站外链接:">
- <el-input v-model="rotationvisibleform.defineaddress"></el-input>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="rotationVisible = false">取 消</el-button>
- <el-button type="primary" @click="AddRotationVisibleForm('rotationvisibleform');">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
-
- <script>
- import { AddRotationChart, saveHispital,addOffices,AddDoctor,AddDoctorInfo,AddImages,AddOfficeEnvironment,getQueryDocInfo,change,
- getQueryDoCHead,editDoctor,saveDocInfo,deleteDoctor,AddImageslink,getEditImages,AddMagicNavi,getMagicImages,AddMarginChart,
- deleteRotations,editRotationImages,updateRotionImages,addActiveform,deleteMargin,getEditImagesDetail,UpdateEditMacgin,getArticleType
- ,AddArticeList,getEnImages,EditEnvirImages,AddtwoImages,deleteOfficeById,GetArticleById,GetAllActivity,AddLinkAddress,AddMagiclinkData,
- getMacLinkAddress,getCountImages,getAllModelTitle, GetMagicLinkAddressByID,GetRotationVisibleByLinkId,AddRotationVisibleForm} from '@/api/site/site'
- import { getToken } from '@/api/qiniu'
- import { getFileExtension} from '@/utils/tools'
- import { isIP, isIPv4 } from 'net';
- import { quillEditor } from 'vue-quill-editor'
- import Neditor from '@/components/Neditor'
- import 'quill/dist/quill.core.css'
- import 'quill/dist/quill.snow.css'
- import 'quill/dist/quill.bubble.css'
- import { constants } from 'crypto';
- import { fail } from 'assert';
- import { get } from 'http';
- import {checkNumber,checkSort} from "@/utils/tools";
- export default {
- name: "newfeature",
- components:{
- Neditor,
- },
- data() {
-
- var checkNumberRule = (rule, value, callback) => {
- if (!checkNumber(value)) {
- callback(new Error('请输入1-99的整数'));
- }else {
- callback();
- }
- };
-
- var checkSortRule = (rule,value,callback)=>{
- if(!checkSort(value)){
- callback(new Error('请输入1-9的整数'));
- }else{
- callback();
- }
- }
- return {
- rotationvisibleform:{
- id:"",
- defineaddress:"",
- },
- genderPicLink:[
- {id:1,name:"无"},
- {id:2,name:"自定义"},
- ],
- genderOptions:[
- {id:1, name:'自定义'},
- {id:2, name:'不跳转'},
- ],
- genderOption:[
- {id:1,name:'自定义'},
- {id:2,name:'无'},
- ],
- defineOptions:[
- // {id:1,name:'无'},
- {id:2,name:'站内链接'},
- {id:3,name:'电话'},
- {id:4,name:'站外链接'},
- ],
- defineOptionsTwo:[
- {id:1,name:'无'},
- {id:2,name:'站内链接'},
- {id:3,name:'站外链接'}
- ],
- defineOptionsThree:[
- {id:1,name:'站外链接'}
- ],
- options: [
- {id:1,name:"文章"},
- {id:2,name:"活动"},
- {id:3,name:"肾科咨询"},
- {id:4,name:"肾科动态"},
- {id:5,name:"肾科科普"},
- {id:6,name:"生活"},
- {id:7,name:"肾友故事"},
- ],
-
- modelTtile:[],
- id:0,
- articeType:[
- {id:1,name:"SCRM"},
- {id:2,name:"酷医云"},
- ],
- linkform:{
- id:"",
- connectType:"",
- linkType:"",
- addtype:"",
- contenttype:"",
- linkaddress:"",
- defineAddress:"",
- },
- maclinkform:{
- linkType:'',
- instationlink:'',
- phone:'',
- outstationlink:'',
- },
- articeTypelist:[],
- acticeNamelist:[],
- headshow:false,
- define:false,
- definetwo:false,
- definethree:false,
- definefour:false,
- definefive:true,
- selectone:false,
- rotationVisible:false,
- officeVisible:false,
- officetwoVisible:false,
- addpicdialogVisible:false,
- isEmpty:false,
- isImages:false,
- isNoEmpty:true,
- docnames:[],
- addTypeShow:false,
- radio: '1',
- radiotwo:'2',
- positions:[
- { index: 1, name: '医士' },
- { index: 2, name: '医师' },
- { index: 3, name: '住院医师' },
- { index: 4, name: '主治医师' },
- { index: 5, name: '副主任医师' },
- { index: 6, name: '主任医师' },
- { index: 7, name: '护士' },
- { index: 8, name: '护师' },
- { index: 9, name: '主管护师' },
- { index: 10, name: '副主任护师' },
- { index: 11, name: '主任护师' },
- { index: 12, name: '运营专员' },
- ],
- form:{
- gender:"",
- },
- value: '',
- new1: require("../../../assets/preview/轮播图.png"),
- new2: require("../../../assets/preview/医院介绍.png"),
- new3: require("../../../assets/preview/科室介绍.png"),
- new4: require("../../../assets/preview/名医介绍.png"),
- new5: require("../../../assets/preview/科室环境.png"),
- new6: require("../../../assets/preview/文章列表.png"),
- new7: require("../../../assets/preview/活动列表.png"),
- new8: require("../../../assets/preview/魔方导航.png"),
- dialogVisible: false,
- dialogRotationVisible: false,
- editcenterDialogVisible: false,
- EditMacDialogVisible:false,
- addpicVisible:false,
- MagicNavigation:false,
- magicVisible:false,
- magicVisibleOne:false,
- editRotionImages:false,
- radio: '1',
- two: false,
- three: false,
- four: false,
- five: false,
- six: false,
- seven: false,
- eight: false,
- linkVisible:false,
- dialogImageUrl: '',
- disabled: false,
- qiniuDomain: 'https://images.shengws.com/',
- uploadData: { token: '', key: '' },
- doctorData: { token: '', key: '' },
- doctorDatatwo: { token: '', key: '' },
- rotationData: { token:'',key: '' },
- magicData:{ token:'',key:''},
- keData: { token: '' ,key: ''},
- imageData: { token:'',key: ''},
- file: this.image ? this.image : '',
- hideShow:false,
- show:false,
- centerDialogVisible:false,
- rotationdata:[],
- rotationdatatwo:[],
- margindata:[],
- filelist:[],
- radio:3,
- form: {
- name: "",
- sort:"",
- textarea:"",
- image:"",
- },
- docform:[],
- hispitalform:{
- title:"",
- sort:"",
- introduction:"",
- },
- administform:{
- title:"",
- sort:"",
- introduction:"",
- },
- doctorform:{
- title:"",
- sort:"",
- image:"",
- docimages:[],
- ids:[],
- },
- editdocfrom:{
- doc_name:"",
- dochead:"",
- doc_postion:"",
- doc_sort:"",
- docintroduction:"",
- },
- eidtDoctorform:{
- id:"",
- name:"",
- dochead:"",
- user_title:"",
- sort:"",
- content:"",
- },
- rotationform:{
- title:"",
- sort:"",
- rotationImages:[],
- ids:[],
- },
- marginform:{
- title:"",
- sort:"",
- marginImages:[],
- margintTitle:[],
- ids:[],
- },
- editmarginform:{
- id:"",
- margtitle:"",
- margImage:"",
- marginaddress:"",
- jumpset:1,
- linkid:"",
- },
- keform:{
- title:"",
- sort:"",
- keImages:[],
- ids:[],
- },
- picform:{
- id:"",
- imageUrl:"",
- sort:"",
- imagelink:1,
- linkaddress:"",
- },
-
- editrotationform:{
- images:"",
- sort:"",
- piclink:"",
- linkaddress:"",
- },
- activeform:{
- title:"",
- sort:"",
- number:"",
- },
-
- articeform:{
- title:"",
- sort:"",
- category:"",
- categoryone:"",
- number:"",
- },
- editmacform:{
- margtitle:"",
- margimage:"",
- marginaddress:"",
- jumpset:"",
- },
- officeform:{
- enviroimages:"",
- sort:"",
- },
- officetwoform:{
- enviroimages:"",
- sort:"",
- },
- articeNamelist:[],
- patientRotation:[],
- totalImages:0,
- linkformtwo:{
- address:"",
- },
- rules: {
- title: [{required: true, message: "请填写模块标题",},],
- sort: [{required: true,message:"请填写排序值"},{validator:checkNumberRule}],
- introduction: [{required: true,message:"请填写医院介绍"}],
- image: [{required: true,message:"请填写新增名医"}],
- docname: [{required:true,message:"请填写医生姓名"}],
- doc_name:[{required:true,message:"请填写医生姓名"}],
- docHead: [{required: true,message:"请上传医生头像"}],
- dochead: [{required: true,message:"请上传医生头像"}],
- docpositional:[{required:true,message:"请填写医生职位"}],
- doc_postion:[{required:true,message:"请填写医生职位"}],
- docintroduction:[{required:true,message:"请填写医生简介"}],
- images:[{required:true,message:"请填写新增科室环境"}],
- rotationImages:[{required:true,message:"请填写添加图片"}],
- keimages:[{required:true,message:"请填写新增科室环境"}],
- user_title:[{required:true,message:"请填写医生职称"}],
- docimages:[{required:true,message:"请填写新增名医"}],
- imageUrl:[{required:true,message:"请填写图片编辑"}],
- margtitle:[{required:true,message:"请填写导航标题"}],
- address:[{required:true,message:"请填写链接地址"}],
- number:[{required:true,message:"请填写活动条数"},{validator:checkSortRule}],
- enviroimages:[{required:true,message:"请上传图片"}],
- marginImages:[{required:true,message:"请添加图片"}],
- jumpset:[{required:true,message:"请选择跳转设置"}],
- margImage:[{required:true,message:"请上传导航图标"}],
- name:[{required:true,message:"请选择医生姓名"}],
- },
- };
- },
- // 医院介绍模块
- methods:{
- changeInput(e){
- this.$forceUpdate();
- },
- changeType(id){
-
- if(id == 1){
- this.addTypeShow = true;
- }
- if(id == 2){
- this.addTypeShow = false;
- GetAllActivity(this.articeNamelist).then(response=>{
- if(response.data.state == 1){
- var activtity = response.data.data.activtity;
- this.articeNamelist = response.data.data.activtity;
- }
- })
- }
- },
- GetArticleById(id){
- GetArticleById(id,this.linkform).then(response=>{
- if(response.data.state == 1){
- var articlelist = response.data.data.articlelist;
- this.articeNamelist = response.data.data.articlelist;
- }
- })
- },
- AddLinkAddress(formName){
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddLinkAddress(this.linkformtwo.address).then(response=>{
- if(response.data.state == 1){
- this.linkVisible = false;
- var linkaddress = response.data.data.patientLinkaddress;
- this.picform.linkaddress = linkaddress.defineaddress;
- this.picform.id = linkaddress.id;
- this.linkformtwo.address = "";
- console.log("数据返回",linkaddress)
- }
- })
- }
- })
- },
-
- OpenCreate(){
- this.$refs.newfeature.Open();
- },
- //轮播图
- rotationEditImages(){
- this.dialogRotationVisible = true;
- },
-
- imageUploadSuccess(res,file) {
- console.log("上传的数据是什么",this.qiniuDomain+res.url)
- this.doctorform.docimages.push(this.qiniuDomain + res.url)
- },
- beforeUpload(file) {
- var fileType = file.type
- const isJPG = fileType.indexOf("image") > -1;
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isJPG) {
- this.$message.error("只能上传图片");
- return false;
- }
- if (!isLt2M) {
- this.$message.error("图片大小不能超过 2MB!");
- return false;
- }
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.uploading = true;
- this.loadingText = '封面图片上传中'
-
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
-
- const tokentree = response.data.data.uptoken
- console.log("token是什么?",tokentree)
- _self._data.doctorData.token = tokentree;
- _self._data.doctorData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- this.uploading = false;
- })
- })
-
- },
-
- rotationSuccess(res,file){
- this.picform.imageUrl = this.qiniuDomain + res.url;
- this.isImages = true;
- },
-
- rotationUpload(file){
- var fileType = file.type
- const isJPG = fileType.indexOf("image") > -1;
- const isLt2M = file.size / 1024 / 1024 < 2;
- console.log("我爱你中国我爱你中奴工")
- console.log(fileType,isJPG,isLt2M)
- if (!isJPG) {
- this.$message.error("只能上传图片");
- return false;
- }
- if (!isLt2M) {
- this.$message.error("图片大小不能超过 2MB!");
- return false;
- }
- var date = new Date()
- console.log("date是",date)
- var ext = getFileExtension(file.name)
- console.log("ext",ext)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- console.log("key",key)
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- console.log("我爱你中国")
- const tokentree = response.data.data.uptoken;
- console.log("图片编辑token是什么?",tokentree)
- _self._data.imageData.token = tokentree;
- _self._data.imageData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- })
- })
- },
- handleRemove() {
- this.file = '';
- },
-
- handleAvatarSuccess(res, file) {
- this.eidtDoctorform.dochead = this.qiniuDomain + res.url;
- },
-
-
- beforeAvatarUpload(file) {
- console.log("尺寸",file.size)
- const isJPG = file.type === 'image/jpeg';
- const isLt2M = file.size / 1024 / 1024 < 2;
-
- if (!isJPG) {
- this.$message.error('上传头像图片只能是 JPG 格式!');
- }
- if (!isLt2M) {
- this.$message.error('上传头像图片大小不能超过 2MB!');
- }
-
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.uploading = true;
- this.loadingText = '封面图片上传中'
-
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- const token= response.data.data.uptoken
- console.log("医生头像token是什么?",token)
- _self._data.doctorData.token = token;
- _self._data.doctorData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- this.uploading = false;
- })
- })
- return isJPG && isLt2M;
- },
-
- handleAvatarSuccesstwo(res,file){
- this.editdocfrom.dochead = this.qiniuDomain + res.url;
- },
-
- beforeAvatarUploadtwo(file) {
- console.log("尺寸",file.size)
- const isJPG = file.type === 'image/jpeg';
- const isLt2M = file.size / 1024 / 1024 < 2;
-
- if (!isJPG) {
- this.$message.error('上传头像图片只能是 JPG 格式!');
- }
- if (!isLt2M) {
- this.$message.error('上传头像图片大小不能超过 2MB!');
- }
-
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.uploading = true;
- this.loadingText = '封面图片上传中'
-
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- const token= response.data.data.uptoken
- console.log("医生头像token是什么?",token)
- _self._data.doctorDatatwo.token = token;
- _self._data.doctorDatatwo.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- this.uploading = false;
- })
- })
- return isJPG && isLt2M;
- },
-
- MagicSuccess(res,file){
- this.editmarginform.margImage =this.qiniuDomain + res.url;
- },
-
- MagicUpload(file){
- var fileType = file.type
- const isJPG = fileType.indexOf("image") > -1;
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isJPG) {
- this.$message.error("只能上传图片");
- return false;
- }
- if (!isLt2M) {
- this.$message.error("图片大小不能超过 2MB!");
- return false;
- }
-
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.loadingText = '封面图片上传中'
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- const token= response.data.data.uptoken
- console.log("导航头像token是什么?",token)
- _self._data.magicData.token = token;
- _self._data.magicData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- })
- })
- return isJPG && isLt2M;
- },
-
- rotationAvatarSuccess(res,file){
- this.editrotationform.images = this.qiniuDomain + res.url;
- },
- rotationAvatarUpload(file){
- var fileType = file.type
- const isJPG = fileType.indexOf("image") > -1;
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isJPG) {
- this.$message.error("只能上传图片");
- return false;
- }
- if (!isLt2M) {
- this.$message.error("图片大小不能超过 2MB!");
- return false;
- }
-
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.loadingText = '封面图片上传中'
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- const token= response.data.data.uptoken
- console.log("导航头像token是什么?",token)
- _self._data.rotationData.token = token;
- _self._data.rotationData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- })
- })
- return isJPG && isLt2M;
- },
-
- machandleAvatarSuccess(res){
- this.editmacform.margimage = this.qiniuDomain + res.url;
- },
- macbeforeAvatarUpload(file){
- var fileType = file.type
- const isJPG = fileType.indexOf("image") > -1;
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isJPG) {
- this.$message.error("只能上传图片");
- return false;
- }
- if (!isLt2M) {
- this.$message.error("图片大小不能超过 2MB!");
- return false;
- }
-
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.loadingText = '封面图片上传中'
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- const token= response.data.data.uptoken
- console.log("导航头像token是什么?",token)
- _self._data.rotationData.token = token;
- _self._data.rotationData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- })
- })
- return isJPG && isLt2M;
- },
-
- //新增轮播图
- AddRotationChart(formName){
- var sorts = this.rotationform.sort;
- var sort = parseInt(sorts);
- this.rotationform.sort = sort;
- for (let index = 0; index < this.rotationdatatwo.length; index++) {
- console.log("长度",this.rotationdatatwo.length)
- this.rotationform.ids.push(this.rotationdatatwo[index].id)
- this.rotationform.rotationImages.push(this.rotationdatatwo[index].images)
- }
- console.log("this.rotationform.rotationImages是什么",this.rotationform.rotationImages)
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddRotationChart(this.rotationform).then(response=>{
- if(response.data.state==1){
- var rotation = response.data.data.rotation;
- var patientRotation = response.data.data.patientRotation;
- this.patientRotation = response.data.data.patientRotation;
- console.log("查询出每条轮播数据",patientRotation)
- this.$message.success("添加轮播图成功");
- this.dialogVisible = false;
- this.$emit('getHospitaldata');
- this.rotationform.title = "";
- this.rotationform.sort = "";
- this.rotationform.rotationImages = [];
- this.rotationform.ids=[];
- this.isEmpty = false;
- this.totalImages = 0;
- }
- })
- }
- })
- },
-
-
-
- //医院介绍
- saveHispital(formName){
- this.hispitalform.introduction = this.$refs.neditor.content;
- console.log("文章内容",this.$refs.neditor.content)
- this.$refs[formName].validate((valid)=>{
- if(valid){
- saveHispital(this.hispitalform).then(response=>{
- if(response.data.state==1){
- var hospital = response.data.data.hospital;
- //console.log("返回数据",hospital)
- this.$message.success("添加医院介绍成功");
- this.two = false;
- this.$emit('getHospitaldata')
- }
- })
- }
- })
- },
-
- //科室介绍
- addAdminist(formName){
- this.administform.introduction = this.$refs.neditor.content;
- this.$refs[formName].validate((valid)=>{
- if(valid){
- addOffices(this.administform).then(response=>{
- if(response.data.state==1){
- var offices = response.data.data.offices;
- // console.log("返回数据",offices);
- this.$message.success("添加科室介绍成功");
- this.three = false;
- this.$emit('getHospitaldata')
- }
- })
- }
- })
- },
-
- //名医介绍
- AddDoctor(formName){
- var images = [];
- var ids = [];
- for (let index = 0; index < this.docform.length; index++) {
- images.push(this.docform[index].dochead);
- ids.push(this.docform[index].id);
- }
- this.doctorform.docimages = images,
- this.doctorform.ids = ids;
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddDoctor(this.doctorform).then(response=>{
- // console.log("啊啊啊",this.doctorform);
- if(response.data.state==1){
- var doctor = response.data.data.doctor;
- // console.log("返回数据",doctor)
- this.headshow = false;
- this.four = false;
- this.docform = "";
- this.doctorform = "";
- this.$emit('getHospitaldata')
- }
- })
- }
- })
- },
-
- getQueryDocInfo(){
- getQueryDocInfo(this.doctorform).then(response=>{
- if(response.data.state==1){
- this.docnames = response.data.data.doctor;
- console.log("获取医生信息",response.data.data.doctor)
- }
- })
- },
- //获取医生头像
- getQueryDoCHead(){
- getQueryDoCHead().then(response=>{
- if(response.data.state==1){
- var docHead = response.data.data.docHead;
- this.docform = response.data.data.docHead;
- console.log("aaa",response.data.data.docHead)
- this.headshow = true;
- console.log("头像数据返回",docHead)
- }
- })
- },
- change(id){
- change(id).then(response=>{
- if(response.data.state == 1){
- var docinfo = response.data.data.docinfo;
- this.eidtDoctorform = response.data.data.docinfo;
- console.log("编辑医生返回数据",docinfo);
-
- }
- })
- },
- editDoctor(id){
- editDoctor(id).then(response=>{
- if(response.data.state ==1){
- var docionfo = response.data.data.docinfo;
- this.editdocfrom = response.data.data.docinfo;
- console.log("数据",docionfo);
- }
- });
- },
-
- deleteDoctor(id,index){
- this.$confirm('确认要删除吗?删除后信息将无法恢复','删除提示!',{
- dangerouslyUseHTMLString:true,
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(()=>{
- deleteDoctor(id,index).then(response=>{
- if(response.data.state == 1){
- this.docform.splice(index,1)
- }
- }).catch(e=>{});
- }).catch(e=>{});
- },
- //编辑医生介绍
- AddDoctorInfo(formName){
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddDoctorInfo(this.eidtDoctorform).then(response=>{
- if(response.data.state==1){
- var doctor = response.data.data.doctor;
- this.centerDialogVisible = false;
- this.eidtDoctorform.dochead = "";
- this.eidtDoctorform.sort = "";
- this.eidtDoctorform.content = "";
- this.getQueryDoCHead();
- }
- })
- }
- })
- },
- saveDocInfo(formName){
- this.$refs[formName].validate((valid)=>{
- if(valid){
- var sorts = this.editdocfrom.doc_sort
- var sort = parseInt(sorts)
- this.editdocfrom.doc_sort = sort
- this.editdocfrom.docintroduction = this.$refs.neditor.content;
-
- saveDocInfo(this.editdocfrom.id,this.editdocfrom).then(response=>{
- if(response.data.state == 1){
- var doctor = response.data.data.editdoctor;
- console.log("返回数据",doctor);
- this.editcenterDialogVisible = false;
- this.$message.success("保存成功")
- this.getQueryDoCHead();
- }
- })
- }
- })
-
- },
-
- // 科室环境
- deleteKe(){
- },
- handleClose(){
-
- },
- officehandleAvatarSuccess(res){
-
- this.officeform.enviroimages = this.qiniuDomain + res.url;
- },
- officebeforeAvatarUpload(file){
- var fileType = file.type
- const isJPG = fileType.indexOf("image") > -1;
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isJPG) {
- this.$message.error("只能上传图片");
- return false;
- }
- if (!isLt2M) {
- this.$message.error("图片大小不能超过 2MB!");
- return false;
- }
-
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.uploading = true;
- this.loadingText = '图片上传中'
-
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- const tokentree = response.data.data.uptoken
- console.log("科室环境token是什么?",tokentree)
- _self._data.keData.token = tokentree;
- _self._data.keData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- this.uploading = false;
- })
- })
- },
-
- officetwohandleAvatarSuccess(res){
-
- this.officetwoform.enviroimages = this.qiniuDomain + res.url;
- },
-
- officetwobeforeAvatarUpload(file){
- var fileType = file.type
- const isJPG = fileType.indexOf("image") > -1;
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isJPG) {
- this.$message.error("只能上传图片");
- return false;
- }
- if (!isLt2M) {
- this.$message.error("图片大小不能超过 2MB!");
- return false;
- }
-
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.uploading = true;
- this.loadingText = '图片上传中'
-
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- const tokentree = response.data.data.uptoken
- console.log("科室环境token是什么?",tokentree)
- _self._data.keData.token = tokentree;
- _self._data.keData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- this.uploading = false;
- })
- })
- },
-
-
- //科室介绍
- imageKeSuccess(res,file){
- console.log("图片路径",file.url)
- this.keform.keImages.push(this.qiniuDomain + res.url);
- console.log("图片数组",this.keform.keImages)
- },
- beforekeUpload(file){
- var fileType = file.type
- const isJPG = fileType.indexOf("image") > -1;
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isJPG) {
- this.$message.error("只能上传图片");
- return false;
- }
- if (!isLt2M) {
- this.$message.error("图片大小不能超过 2MB!");
- return false;
- }
-
- var date = new Date()
- var ext = getFileExtension(file.name)
- var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() +'_o_' + file.uid + '.' + ext;
- this.uploading = true;
- this.loadingText = '图片上传中'
-
- const _self = this
- return new Promise((resolve, reject) => {
- getToken().then(response => {
- const tokentree = response.data.data.uptoken
- console.log("科室token是什么?",tokentree)
- _self._data.keData.token = tokentree;
- _self._data.keData.key = key;
- resolve(true)
- }).catch(err => {
- reject(false)
- this.uploading = false;
- })
- })
- },
- handleRemove(file, fileList) {
- console.log(file, fileList);
- },
-
- AddImages(formName){
- var sorts = this.officeform.sort
- var sort = parseInt(sorts)
- this.officeform.sort = sort
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddImages(this.officeform).then(response=>{
- this.getEnImages();
- this.officeform.sort = "";
- this.officeform.enviroimages = "";
- this.isEmpty = true;
- })
- }
- })
- },
-
- getEnImages(){
- getEnImages().then(response=>{
- if(response.data.state == 1){
- var enviroimages = response.data.data.enviroimages;
- this.rotationdata = response.data.data.enviroimages;
-
- }
- })
- },
-
- EditEnvirImages(id){
- EditEnvirImages(id,this.officetwoform).then(response=>{
- if(response.data.state == 1){
- this.officetwoform = response.data.data.enviroimages
- }
- })
- },
-
- AddtwoImages(){
- var sorts = this.officetwoform.sort;
- var sort = parseInt(sorts);
- this.officetwoform.sort = sort;
- AddtwoImages(this.officetwoform.id,this.officetwoform).then(response=>{
- if(response.data.state == 1){
- var patientEnviroimages = response.data.data.patientEnviroimages;
- console.log("patientenviroimages",patientEnviroimages)
- this.getEnImages();
- }
- })
- },
-
-
- AddOfficeEnvironment(formName){
- var sorts = this.keform.sort;
- var sort = parseInt(sorts);
- this.keform.sort = sort;
- for (let index = 0; index < this.rotationdata.length; index++) {
- this.keform.keImages.push(this.rotationdata[index].enviroimages);
- this.keform.ids.push(this.rotationdata[index].id)
- }
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddOfficeEnvironment(this.keform).then(response=>{
- if(response.data.state == 1){
- var offenvironment = response.data.data.offenvironment;
- this.five = false;
- this.keform.sort = "";
- this.keform.title = "";
- this.keform.keImages = [];
- this.keform.ids=[];
- this.isEmpty = false;
- console.log("返回数据",offenvironment);
- this.$emit('getHospitaldata')
- }
- })
- }
- })
- },
- selectGender(id){
- if(id == 1){
- this.define = true;
- }
- if(id == 2){
- this.define = false;
- }
- },
- rotationGender(id){
- if(id == 1){
- this.definefive = true;
- }
- if(id == 2){
- this.definefive = false;
- }
- },
- selectItem(id){
- if(id == 1){
- this.definetwo = false;
- this.definethree = false;
- this.definefour = false;
- }
-
- if(id==2){
- this.definetwo = true;
- this.definethree = false;
- this.definefour = false;
- }
-
- if(id==3){
- this.definethree = true;
- this.definetwo = false;
- this.definefour = false;
- }
-
- if(id==4){
- this.definefour = true;
- this.definetwo = false;
- this.definethree = false;
- }
- },
- selectItemTwo(id){
- this.definethree = true;
- },
-
- select(id){
- if(id == 1){
- this.selectone = false;
- }
-
- if(id == 2){
- this.selectone = true;
- }
- },
- selectItemtwo(id){
- if(id == 1){
- this.definetwo = false;
- this.definethree = false;
- this.definefour = false;
- this.maclinkform.instationlink = 0;
- this.maclinkform.phone = "";
- this.maclinkform.outstationlink = "";
- }
- if(id==2){
- this.definetwo = true;
- this.definethree = false;
- this.definefour = false;
- this.maclinkform.phone = "";
- this.maclinkform.outstationlink = "";
- }
-
- if(id==3){
- this.definethree = true;
- this.definetwo = false;
- this.definefour = false;
- this.maclinkform.instationlink = 0
- this.maclinkform.outstationlink = "";
- }
-
- if(id==4){
- this.definefour = true;
- this.definetwo = false;
- this.definethree = false;
- this.maclinkform.instationlink = 0;
- this.maclinkform.phone = "";
- }
- },
-
- AddImageslink(formName){
- var sorts = this.picform.sort
- var sort = parseInt(sorts)
- this.picform.sort = sort
- var imagelink = this.picform.imagelink
- var links = parseInt(imagelink)
- this.picform.imagelink = links;
-
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddImageslink(this.picform.id,this.picform).then(response=>{
- if(response.data.state ==1){
- var editpiclink = response.data.data.editpiclink;
- var total = response.data.data.total;
- this.totalImages = total;
- if(total>=9){
- this.isNoEmpty = false;
- }
- console.log("数据返回",editpiclink)
- this.picform.linkaddress = "",
- this.getEditImages();
- this.isEmpty = true;
- this.isImages = false;
- this.picform.sort = "";
- this.picform.imageUrl = "";
- }
- })
- }
- })
- },
- getEditImages(){
- getEditImages().then(response=>{
- if(response.data.state == 1){
- var editpiclinks = response.data.data.editpiclinks;
- this.rotationdatatwo = response.data.data.editpiclinks;
- // console.log("想不通是什么",this.rotationdatatwo)
- if(this.rotationdatatwo.images == ""){
- this.isEmpty = false;
- }
- }
- })
- },
-
- AddMagicNavi(formName){
- if(this.editmarginform.linkid == ""){
- this.editmarginform.linkid = 0;
- }
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddMagicNavi(this.editmarginform).then(response=>{
- if(response.data.state == 1){
- this.editmarginform.marginaddress = "";
- this.getMagicImages();
- var editmargin = response.data.data.editmargin;
- this.isEmpty = true;
- this.editmarginform.margtitle = "";
- this.editmarginform.margImage = "";
- this.editmarginform.jumpset = "";
- this.MagicNavigation = false;
-
- }
- })
- }
- })
- },
-
- getMagicImages(){
- getMagicImages().then(response=>{
- if(response.data.state == 1){
- var editmargins = response.data.data.editmargins;
- this.margindata = response.data.data.editmargins;
- this.isEmpty = true;
- console.log("这个魔方导航是什么",editmargins);
- }
- })
- },
- AddMarginChart(formName){
- var sorts = this.marginform.sort
- var sort = parseInt(sorts)
- this.marginform.sort = sort
- for (let index = 0; index < this.margindata.length; index++) {
- this.marginform.marginImages.push(this.margindata[index].margimage);
- this.marginform.ids.push(this.margindata[index].id)
- this.marginform.margintTitle.push(this.margindata[index].margtitle);
- }
-
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddMarginChart(this.marginform).then(response=>{
- if(response.data.state ==1){
- var macnavigation = response.data.data.macnavigation;
- this.eight = false;
- console.log("数据",macnavigation);
- this.$emit('getHospitaldata')
- this.marginform.title = "";
- this.marginform.sort = "";
- this.marginform.marginImages = [];
- this.marginform.margintTitle = [];
- this.marginform.ids = [];
- this.isEmpty = false;
- }
- })
- }
- })
- },
-
- deleteRotations(id,index){
- this.$confirm('确认要删除该组件吗?删除后该组件将无法恢复','删除提示!',{
- dangerouslyUseHTMLString:true,
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(()=>{
- deleteRotations(id).then(response=>{
- if(response.data.state == 1){
- var total = response.data.data.total;
- this.totalImages = total;
- this.rotationdatatwo.splice(index,1)
- this.isNoEmpty = true;
- }
- })
- })
- },
-
- editRotationImages(id){
- editRotationImages(id).then(response=>{
- if(response.data.state == 1){
- var editpiclink = response.data.data.editpiclink;
- this.editrotationform = response.data.data.editpiclink;
- console.log("这是什么",editpiclink)
- }
- })
- },
- updateRotionImages(formName){
- var sorts = this.editrotationform.sort;
- var sort = parseInt(sorts);
- this.editrotationform.sort = sort;
- this.$refs[formName].validate((valid)=>{
- if(valid){
- updateRotionImages(this.editrotationform.id,this.editrotationform).then(response=>{
- if(response.data.state == 1){
- var editpiclink = response.data.data.editpiclink;
- console.log("返回数据",editpiclink)
- this.getEditImages();
-
- }
- })
- }
- })
- },
- addActiveform(formName){
- var sorts = this.activeform.sort;
- var sort = parseInt(sorts);
- this.activeform.sort = sort;
-
- var numbers = this.activeform.number;
- var number = parseInt(numbers);
- this.activeform.number = number;
-
- this.$refs[formName].validate((valid)=>{
- if(valid){
- addActiveform(this.activeform).then(response=>{
- if(response.data.state == 1){
- var addactivity = response.data.data.addactivity;
- console.log("返回数据",addactivity);
- this.$emit('getHospitaldata')
- }
- });
- }
- })
- },
- deleteMargin(id,index){
- deleteMargin(id).then(response=>{
- if(response.data.state == 1){
- this.margindata.splice(index,1);
- }
- })
- },
-
- editImages(id){
- getEditImagesDetail(id,this.editmacform).then(response=>{
- if(response.data.state == 1){
-
- var editmargin = response.data.data.editmargin;
- if(editmargin.jumpset == 1){
- this.define = true;
- }
- if(editmargin.jumpset == 2){
- this.define = false;
- }
- this.editmacform = editmargin;
- console.log("返回导航数据",editmargin)
- }
- })
- },
-
- UpdateEditMacgin(formName){
- this.$refs[formName].validate((valid)=>{
- if(valid){
- UpdateEditMacgin(this.editmacform.id,this.editmacform).then(response=>{
- if(response.data.state ==1){
- var editmargin = response.data.data.editmargin;
- this.EditMacDialogVisible = false;
- this.getMagicImages();
- }
- })
- }
- })
- },
-
- getArticleType(){
- getArticleType(this.articeTypelist).then(response=>{
- if(response.data.state == 1){
- var category = response.data.data.category;
- this.articeTypelist = response.data.data.category;
- console.log("文章分类是什么",this.articeTypelist)
- }
- })
- },
- AddArticeList(formName){
- var sorts = this.articeform.sort;
- var sort = parseInt(sorts);
- this.articeform.sort = sort;
- var number = this.articeform.number;
- var numbers = parseInt(number);
- this.articeform.number = numbers;
- this.$refs[formName].validate((valid)=>{
- AddArticeList(this.articeform).then(response=>{
- if(response.data.state == 1){
- var articlelist = response.data.data.articlelist;
- console.log("文章列表",articlelist);
- this.$emit('getHospitaldata');
- }
- })
- })
- },
-
- deleteOfficeById(id,index){
- deleteOfficeById(id,index).then(response=>{
- if(response.data.state == 1){
- this.rotationdata.splice(index,1)
- }
- })
- },
- changeArticeType(id){
- if(id == 1 ){
- this.getArticleType();
- }
- if(id == 2){
-
-
- }
- if(id == 3){
-
-
- }
- if(id == 4){
-
-
- }
- if(id == 5){
-
-
- }
- if(id == 6){
-
-
- }
- if(id == 7){
-
-
- }
- },
- AddMagiclinkData(formName){
- var instationlink = this.maclinkform.instationlink;
- var instationlinks = parseInt(instationlink);
- this.maclinkform.instationlink = instationlinks;
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddMagiclinkData(this.maclinkform).then(response=>{
- if(response.data.state == 1){
- var magiclink = response.data.data.magiclink;
- console.log("链接返回数据",magiclink)
- var model = response.data.data.model;
- console.log("model是什么",model)
- if(model.mode_type == 1){
- this.editmacform.marginaddress = "javascript:;";
- }
- if(model.mode_type == 2){
- this.editmarginform.marginaddress = "http://microweb.kuyicloud.com/#/hospitalIntroduction?id="+model.id+"&orgid="+this.$store.getters.xt_user.org_id;
-
- }
- if(model.mode_type == 3){
- this.editmarginform.marginaddress = "http://microweb.kuyicloud.com/#/officeIntroduction?id="+model.id+"&orgid="+this.$store.getters.xt_user.org_id;
- }
- if(model.mode_type == 4){
- this.editmarginform.marginaddress = "http://microweb.kuyicloud.com/#/medicalTeam?id="+model.id+"&orgid="+this.$store.getters.xt_user.org_id;
- }
- if(model.mode_type == 5){
- this.editmacform.marginaddress = "javascript:;";
- }
- if(model.mode_type == 6){
- this.editmarginform.marginaddress = "http://microweb.kuyicloud.com/#/news?id="+model.id+"&orgid="+this.$store.getters.xt_user.org_id;
- }
- if(model.mode_type == 7){
- this.editmarginform.marginaddress = "http://microweb.kuyicloud.com/#/activity?id="+model.id+"&orgid="+this.$store.getters.xt_user.org_id;
- }
- if(model.mode_type == 8){
- this.editmacform.marginaddress = "javascript:;";
- }
-
- if(magiclink.linktype ==3 && magiclink.phone != ""){
- this.editmacform.marginaddress = magiclink.phone;
- }
-
- if(magiclink.linktype == 4 && magiclink.outstationlink != ""){
- this.editmacform.marginaddress = magiclink.outstationlink;
- }
- this.editmarginform.linkid = magiclink.id
- this.maclinkform.instationlink = "";
- this.maclinkform.phone = "";
- this.maclinkform.outstationlink = "";
- this.magicVisible = false;
-
- }
- })
- }
- })
- },
- getMacLinkAddress(){
- getMacLinkAddress().then(response=>{
- if(response.data.state ==1){
- var magiclink = response.data.data.magiclink;
- // this.editmarginform.marginaddress = magiclink.linkaddress;
- console.log("返回链接数据",magiclink)
- }
- })
- },
- // getCountImages(){
- // getCountImages().then(response=>{
- // if(response.data.state == 1){
- // var total = response.data.data.total;
- // this.totalImages = total;
- // console.log("total是什么",total)
- // }
- // })
- // },
- getAllModelTitle(){
- getAllModelTitle().then(response=>{
- if(response.data.state == 1){
- var patientModels = response.data.data.patientModels;
- this.modelTtile = patientModels;
- console.log("模块标题是什么",patientModels)
- }
- })
- },
- GetMagicLinkAddressByID(id){
- GetMagicLinkAddressByID(id).then(response=>{
- if(response.data.state == 1){
- var magiclink = response.data.data.magiclink;
- console.log("magiclink",magiclink)
- this.modelTtile.id = magiclink.linkaddress;
- }
- })
- },
-
- GetRotationVisibleByLinkId(id){
- GetRotationVisibleByLinkId(id).then(response=>{
- if(response.data.state == 1){
- var conlinkaddress = response.data.data.conlinkaddress;
- console.log("conlikaddress",conlinkaddress)
- this.rotationvisibleform = conlinkaddress;
- }
- })
- },
- AddRotationVisibleForm(formName){
- this.$refs[formName].validate((valid)=>{
- if(valid){
- AddRotationVisibleForm(this.rotationvisibleform.id,this.rotationvisibleform).then(response=>{
- if(response.data.state == 1){
- this.rotationVisible = false;
- var linkaddress = response.data.data.linkaddress;
- console.log("linkaddress",linkaddress);
- this.editrotationform.linkaddress = linkaddress.defineaddress;
- }
- })
- }
- })
- }
- },
-
- created(){
- this.getQueryDocInfo();
- this.getQueryDoCHead();
- this.getEditImages();
- this.getMagicImages();
- this.getArticleType();
- this.getEnImages();
- this.getMacLinkAddress();
- // this.getCountImages();
- this.getAllModelTitle();
- },
-
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss">
-
- .tpic{
- margin-left: 50px;
- }
-
- .eidtRotationimages{
- text-align: center;
- margin-bottom: 12px;
- }
-
- .clearfix {
- clear: both;
- }
-
- .el-upload--picture-card {
- width: 80px !important;
- height: 80px !important;
- line-height: 80px !important;
- }
- .tips {
- font-size: 12px;
- line-height: 18px;
- }
- .adddoc{
- font-size: 14px;
- }
-
- //上传样式
- .uploadfont{
- font-size: 14px;
- margin-left: 75px;
- }
- // 名医介绍样式
- .flex-img {
- display: flex;
- }
-
- .image-uploader {
- background-color: #fbfdff;
- border: 1px dashed #c0ccda;
- width: 148px;
- height: auto;
- cursor: pointer;
- line-height: 146px;
- text-align: center
- }
-
- .image-uploader {
- font-size: 28px;
- color: #8c939d;
- }
-
- //编辑名医样式
- .avatar-uploader{
- border: 1px dashed #d9d9d9;
- border-radius: 6px;
- cursor: pointer;
- position: relative;
- overflow: hidden;
- width: 100px;
- height: 100px;
- }
- .avatar-uploader{
- border-color: #409EFF;
- }
- .avatar-uploader-icon {
- font-size: 28px;
- color: #8c939d;
- width: 50px;
- height: 50px;
- line-height: 50px;
- margin-left: 25px;
- margin-top: 25px;
- text-align: center;
- }
-
- .upic{
- width: 100px;
- height:100px;
- border: dashed 1px #409EFF;
- background-color: white;
- font-size: 30px;
- }
- .icon{
- width: 40px;
- height: 40px;
- // border: solid 1px red;
- margin-left: 30px;
- margin-top: 30px;
- }
- .ufont{
- width:80px;
- height: 28px;
- // border:solid 1px red;
- margin-left: 20px;
- margin-top: -20px;
- font-size: 14px;
- }
-
- .addrot{
- width:100px;
- height: 100px;
- border: dashed 1px #409EFF;
- margin-left: 10px;
- background-color: white;
- }
- .addrotone{
- font-size: 30px;
- width:50px;
- height: 50px;
- // border: solid 1px red;
- margin-left: 35px;
- margin-top: 35px;
- }
- .addrotwo{
- width:60px;
- height: 30px;
- // border: solid 1px #409EFF;
- margin-left: 25px;
- margin-top: -25px;
- }
-
- .doc{
- width: 100px;
- height:100px;
- border: dashed 1px #409EFF;
- }
-
- .docone{
- width: 50px;
- height: 50px;
- // border: solid 1px red;
- margin-top: 30px;
- margin-left: 30px;
- font-size: 30px;
- }
- .doctwo{
- width: 60px;
- height: 30px;
- margin-left: 20px;
- // border: solid 1px red;
- margin-top: -30px;
- }
-
- .el-upload-list--picture-card .el-upload-list__item {
- overflow: hidden;
- background-color: #fff;
- border: 1px solid #c0ccda;
- border-radius: 6px;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- width: 100px;
- height: 100px;
- margin: 0 8px 8px 0;
- display: inline-block;
- }
-
- .flex-img__image{
- width: 100%;
- height: 100%;
- }
- .el-upload-list--picture-card .el-upload-list__item-thumbnail {
- width: 100%;
- height: 200px;
- }
- .avatar{
- width:100%;
- height: 100px;
- }
-
- .yangshi{
- font-size: 14px;
- margin-top: 25px;
- }
- .el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-delete {
- position: static;
- font-size: inherit;
- color: inherit;
- margin-top: 30px;
- }
-
- .el-dialog__wrapper {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- overflow: auto;
- margin: 0;
- z-index: 1000 !important;
- }
- </style>
-
|