| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910 |
- <template>
- <div style="height:100%;width:100%">
- <el-container>
- <el-aside
- width="250px"
- style="border-right:2px solid #d5d5ff;float:left;text-align: center;"
- :style="{'max-height':testHeight+'px','height':testHeight+'px'}">
- <span style="display: flex;justify-content: center;align-items: center;border-bottom: 1px solid #ebeef5;">
- <el-button size="mini" :class="tabType==1 ? 'skactive' : 'sknormal'" @click="tabChange('1')">当前数据</el-button>
- <!-- <el-button size="mini" :class="tabType==2 ? 'skactive' : 'sknormal'" @click="tabChange('2')">历史数据-->
- <!-- </el-button>-->
- <el-button size="mini" :class="tabType==0 ? 'skactive' : 'sknormal'" @click="tabChange('0')">全部数据</el-button>
- </span>
- <div class="tree" style="
- height: calc(100% - 50px);
- width: 100%;
- overflow: auto;
- display: inline-flex;">
- <el-tree
- :highlight-current="true"
- style="height:100%;"
- :data="treeData"
- node-key="id"
- show-checkbox
- @check-change="handleCheckChange"
- ref="jigou_tree"
- >
- <div class="custom-tree-node" slot-scope="{ node, data }">
- <span style="float:left;">
- {{ data.pnm}}
- <!-- <el-button v-if="data.type == '2'"
- type="text danger"
- icon="el-icon-circle-close"
- size="mini"
- style='color:red'
- @click="() => deletePICI(node, data)">
- </el-button>-->
- <!-- <el-button v-if="data.type == '4'"
- type="text danger"
- icon="el-icon-circle-close"
- size="mini"
- style='color:red'
- @click="() => deleteZU(node, data)">-->
- <!-- </el-button> -->
- </span>
- <div
- style="float:right;display: flex;justify-content: flex-end;align-items: center;width:50%;"
- >
- <!-- <span style="color:blue;margin-right:20%;" v-show="data.sttm!=''&&data.entm!=''">{{data.sttm}}/{{data.entm}}
- </span>-->
- <span style="color:blue;width:80px;">
- <!-- <el-button v-if="data.type == '1' && data.code != '100'"
- type="text"
- icon="el-icon-circle-plus"
- size="mini"
- @click="() => addPICI(node,data,'计划')">
- 新建计划
- </el-button>-->
- <!-- <el-button v-if="data.type == '3'"
- type="text"
- icon="el-icon-circle-plus"
- size="mini"
- @click="() => addZU(node,data)">
- 添加督查组
- </el-button>-->
- </span>
- </div>
- </div>
- </el-tree>
- </div>
- </el-aside>
- <el-main style="margin:0px;padding:0px;overflow-y:hidden;" class="shuihui" v-loading="exportLoading">
- <!-- <el-card> -->
- <div class="pages" :style="{'max-height':testHeight+'px'}">
- <div class="search">
- <el-row type="flex" justify="space-between">
- <el-col :span="24">
- <el-form :inline="true" size="mini" class="demo-form-inline"
- style="padding-left: 10px;">
- <el-form-item label="行政区划:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- clearable
- placeholder="请输入行政区划名称"
- v-model.trim="findParams.adFullName"
- ></el-input>
- </el-form-item>
- <el-form-item label="工程名称:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- clearable
- placeholder="请输入水库名称"
- v-model.trim="findParams.nm"
- ></el-input>
- </el-form-item>
- </el-form>
- </el-col>
- </el-row>
- <el-row type="flex" justify="space-between" v-show="showExpandSearchPanel">
- <el-col :span="24">
- <el-form :inline="true" size="mini" class="demo-form-inline"
- style="padding-left: 10px;">
- <el-form-item label="问题类别:">
- <el-select v-model="findParams.inspPblmName" clearable placeholder="请选择">
- <el-option
- v-for="item in leibie"
- :key="item.guid"
- :label="item.inspPblmsName"
- :value="item.inspPblmsName"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="是否典型:">
- <el-select v-model="findParams.ifCasePblm" clearable placeholder="请选择">
- <el-option
- v-for="item in supervision"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="问题筛选:">
- <el-select v-model="pblscr" clearable placeholder="请选择">
- <el-option
- v-for="item in pblscrList"
- :key="item.value"
- :label="item.lable"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="上报人员:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- clearable
- placeholder="请输入名称"
- v-model.trim="findParams.persName"
- ></el-input>
- </el-form-item>
- <el-form-item label="发现时间:">
- <el-date-picker
- v-model="value6"
- type="daterange"
- value-format="yyyy-MM-dd"
- style="width:240px"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- ></el-date-picker>
- </el-form-item>
- <el-form-item label="所在组:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- placeholder="请输入所在组名称"
- v-model.trim="pblscrGroup"
- ></el-input>
- </el-form-item>
- <el-form-item label="是否包含多媒体文件:">
- <el-select v-model="findParams.hasVedio" clearable placeholder="请选择">
- <el-option
- v-for="item in hasVedio1"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="问题督查状态:">
- <el-select v-model="findParams.state" clearable placeholder="请选择">
- <el-option
- v-for="item in stateList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- </el-col>
- </el-row>
- <el-row type="flex" justify="space-between" style="border-top:1px solid #0014ff2e;">
- <el-col style='padding-bottom:10px;' :span="12">
- <el-button style="float:right;margin-right:10px;border: 1px solid #0014ff2e;
- border-radius: 0px 0px 5px 5px;border-top: 0px;" type="info" plain
- size="mini"
- @click="showExpandSearchPanel = !showExpandSearchPanel"
- >
- {{showExpandSearchPanel?'收起':'更多条件'}}
- <i class="el-icon-arrow-down el-icon--right" v-show="!showExpandSearchPanel"/>
- <i class="el-icon-arrow-up el-icon--right" v-show="showExpandSearchPanel"/>
- </el-button>
- </el-col>
- <el-col :span="12">
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="primary"
- icon="el-icon-search"
- @click="search"
- > 查 询
- </el-button>
- <!-- <el-button-->
- <!-- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"-->
- <!-- type="success"-->
- <!-- icon="el-icon-download"-->
- <!-- @click="exportWord"-->
- <!-- >导出WORD-->
- <!-- </el-button>-->
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- icon="el-icon-download"
- @click="exportExcel"
- >导出EXCEL
- </el-button>
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- @click="submitBtn"
- >问题提交
- </el-button>
- <el-button
- v-if="isGd"
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- icon="el-icon-download"
- @click="toForm"
- >导出一表一单
- </el-button>
- </el-col>
- </el-row>
- </div>
- <!-- 查询展示 -->
- <div class="search" style="margin-top:10px;">
- <el-table
- v-loading="loading"
- border
- ref="multipleTable"
- :height="tableHeight"
- :data="searchResult"
- tooltip-effect="dark"
- style="width: 100%"
- @row-click="openDetails"
- @selection-change="handleSelectionChange">
- <el-table-column
- type="selection"
- min-width="55">
- </el-table-column>
- <!-- <el-table-column align="center" type="index" label="序号" min-width="50">-->
- <!-- <template slot-scope="scope">{{ (currentPage - 1) * pageSize + (scope.$index + 1) }}-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column header-align="center" align="center" min-width="140" prop="inspPblmName" label="小水库问题类别"></el-table-column> -->
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="province"
- label="省" v-if="isXj"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="city"
- :label="ownAdName"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="country"
- label="县"
- v-if="isXj"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="nm"
- label="水毁工程名称"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="inspPblmName"
- label="问题类别"
- show-overflow-tooltip
- ></el-table-column>
- <!-- <el-table-column
- header-align="center"
- align="center"
- min-width="260"
- prop="inspPblmDesc"
- label="问题描述"
- show-overflow-tooltip
- ></el-table-column> -->
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="state"
- label="问题督查状态">
- <template slot-scope="scope">
- <p v-if="Number(scope.row.state) === 0"><span class="inspPblmCate"
- style="background: #F56C6C;">未提交</span>
- </p>
- <p v-if="scope.row.state == 2"><span class="inspPblmCate"
- style="background: #409EFF;">已提交</span>
- </p>
- <p v-if="scope.row.state == 3"><span class="inspPblmCate"
- style="background: #67C23A;">已发布</span>
- </p>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="50"
- prop="ifCasePblm"
- label="典型"
- >
- <template slot-scope="scope">
- <p v-if="scope.row.ifCasePblm == 1">是</p>
- <p v-if="scope.row.ifCasePblm == 0">否</p>
- </template>
- </el-table-column>
- <!-- <el-table-column header-align="center" align="center" min-width="45" prop="inspPblmCate" label="程度">
- <template slot-scope="scope">
- <p
- style="color:#27C19F;"
- v-if="scope.row.inspPblmCate == 0"
- >一般</p>
- <p
- style="color:#E6A23C;"
- v-if="scope.row.inspPblmCate == 1"
- >较重</p>
- <p
- style="color:#F56C6C;"
- v-if="scope.row.inspPblmCate == 2"
- >严重</p>
- </template>
- </el-table-column>-->
- <!-- <el-table-column header-align="center" align="center" min-width="180" prop="inspPblmDesc" label="问题描述"></el-table-column> -->
- <!-- <el-table-column header-align="center" align="center" min-width="180" prop="inspAddDesc" label="问题地址"></el-table-column> -->
- <el-table-column
- header-align="center"
- align="center"
- min-width="60"
- prop="persName"
- label="上报人"
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- show-overflow-tooltip
- prop="orgNm"
- label="所在组"
- ></el-table-column>
- <!-- <el-table-column header-align="center" align="center" min-width="120" prop="recPers" label="操作记录人">
- </el-table-column>-->
- <el-table-column
- prop="collTime"
- label="上报时间"
- sortable
- align="center"
- min-width="100"
- show-overflow-tooltip>
- <template slot-scope="scope">
- {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="hasVedio"
- label="是否包含多媒体文件"
- >
- <template slot-scope="scope">
- <p v-if="scope.row.hasVedio == 1">是</p>
- <p v-if="scope.row.hasVedio == 0">否</p>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop
- min-width="100"
- label="操作"
- show-overflow-tooltip
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button icon="el-icon-view" title="查看详情" type="text"
- @click.native.stop="showDetails(scope.row.pblmId)"></el-button>
- <el-button icon="el-icon-edit" title="修改问题" type="text" v-if="isMine(scope.row) && ownPriv('manage')"
- @click.native.stop="changeSup(scope.row.pblmId)"></el-button>
- <el-button
- icon="el-icon-delete"
- v-if="isMine(scope.row) && ownPriv('manage')"
- title="删除问题" @click.native.stop="removeSuperviseOne(scope.row.pblmId)"
- type="text"
- ></el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- 分页 -->
- <div class="paginationWarpper">
- <el-pagination
- class="paginationCenter"
- background
- @size-change="handleSizeChange"
- @current-change="search"
- :current-page.sync="currentPage"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- ></el-pagination>
- </div>
- </div>
- <!-- 详情弹框 -->
- <el-dialog
- class="outerDialog custom_dialog"
- title="问题详情"
- width="60%"
- v-if="supervisionDetailsVisible"
- :visible.sync="supervisionDetailsVisible"
- >
- <supervision-details ref="xianqing" :problemId="currentProblemId"></supervision-details>
- <span slot="footer">
- <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
- </span>
- </el-dialog>
- <!-- 删除的弹窗 -->
- <el-dialog class="deleteDialog" title="问题删除描述" :visible.sync="problemDeleteVisible">
- <Problem-delete
- ref="deleteMiaoShu"
- :deleteProblemId="deleteId"
- @deleteSuccess="deleteSuccess"
- ></Problem-delete>
- <span slot="footer">
- <el-button @click="problemDeleteVisible = false">返回</el-button>
- </span>
- </el-dialog>
- <!-- 修改弹框 -->
- <el-dialog
- class="outerDialog custom_dialog"
- title="修改督查问题"
- width="60%"
- :close-on-click-modal="false"
- :visible.sync="changeSupervisionVisible"
- >
- <div class="scroll300">
- <div
- style="width:49%;overflow-y:auto;max-height:48vh;float:left;border:1px solid #d5d5ff;margin-right:5px;"
- >
- <p
- style="font-weight:bolder;background-color:#d5d5ff;padding:3px;marign-bottom:5px"
- >基本信息</p>
- <el-form
- ref="changeSupFrom"
- :rules="rules1"
- :model="changeSupervision"
- label-width="120px"
- >
- <el-form-item label="水毁工程名称" prop="nm">
- <el-input v-model="changeSupervision.nm" clearable readonly></el-input>
- </el-form-item>
- <el-form-item label="督查问题类别" prop="inspPblmName">
- <!-- <el-input v-model="changeSupervision.inspPblmName" clearable readonly></el-input> -->
- <el-select v-model="changeSupervision.inspPblmName" clearable placeholder="请选择">
- <el-option
- v-for="item in leibie"
- :key="item.inspPblmsName"
- :label="item.inspPblmsName"
- :value="item.inspPblmsName"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="是否为典型问题:">
- <el-radio v-model="changeSupervision.ifCasePblm" label="1">典型</el-radio>
- <el-radio v-model="changeSupervision.ifCasePblm" label="0">非典型</el-radio>
- </el-form-item>
- <el-form-item label="问题描述" prop="inspPblmDesc">
- <el-input
- type="textarea"
- :rows="5"
- v-model="changeSupervision.inspPblmDesc"
- clearable
- ></el-input>
- </el-form-item>
- <el-form-item label="建议措施" prop="note">
- <el-input type="textarea" :rows="3" v-model="changeSupervision.note"
- clearable></el-input>
- </el-form-item>
- <el-form-item label="上报人" prop="persName">
- <el-input
- resize="none"
- type="input"
- readonly
- :rows="3"
- placeholder="请输入"
- v-model.trim="changeSupervision.persName"
- ></el-input>
- </el-form-item>
- <el-form-item label="采集时间" prop="collTime">
- <el-date-picker v-model="changeSupervision.collTime" readonly
- type="date"></el-date-picker>
- </el-form-item>
- </el-form>
- </div>
- <div
- style="width: 49%;float: left;border: 1px solid rgb(213, 213, 255);margin-right: 5px;overflow-y: auto;max-height: 48vh;"
- >
- <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
- <el-tabs style="margin:0px 5px;">
- <el-tab-pane :label="picturetabName" style>
- <el-row style="text-align:right;">
- <el-button
- :v-if="!addPicPanel?addPicPanel:addPicPanel"
- size="mini"
- type="text"
- :icon="!addPicPanel?'el-icon-circle-plus-outline':'el-icon-circle-close-outline'"
- @click="addPic"
- >{{!addPicPanel?"添加":"取消"}}
- </el-button>
- </el-row>
- <el-row v-show="addPicPanel">
- <upload ref="uploadFile"
- :url="`/pdcApi/file/insert?bizId=`"
- @uploadOver="removeNewSupervision">
- </upload>
- </el-row>
- <el-row>
- <div
- style="overflow-y:auto;overflow-x:hidden;max-height:30vh;padding:10px;">
- <div class="upload-container" id="imgView">
- <div
- v-for="(item, index) in pictureArray"
- :key="index"
- class="image-preview image-app-preview"
- >
- <div class="image-preview-wrapper">
- <img :src="`${hostUrl}/${item.filePath}`">
- <div class="image-preview-action">
- <i @click="removeFile(item.id)"
- class="el-icon-delete"></i>
- </div>
- </div>
- </div>
- </div>
- </div>
- </el-row>
- </el-tab-pane>
- <el-tab-pane :label="audiotabName">
- <el-table border :data="audioArray" style="width: 100%;margin: 0 auto;">
- <el-table-column header-align="center" align="center" label="音频">
- <template slot-scope="scope">
- <elaudio
- style="margin-left:15%;width:35%"
- :theUrl="`${hostUrl}/${scope.row.filePath}`"
- ></elaudio>
- </template>
- </el-table-column>
- <el-table-column header-align="center" align="center" label="操作">
- <template slot-scope="scope">
- <el-button
- size="mini"
- @click="removeFile(scope.row.id,scope.$index)"
- type="danger"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane :label="videotabName">
- <el-table border :data="videoArray" style="width: 100%;margin: 0 auto;">
- <el-table-column header-align="center" align="center" label="视频">
- <template slot-scope="scope">
- <elaudio
- style="margin-left:15%;width:100px;"
- :theUrl="`${hostUrl}/${scope.row.filePath}`"
- ></elaudio>
- </template>
- </el-table-column>
- <el-table-column header-align="center" align="center" label="操作">
- <template slot-scope="scope">
- <el-button
- size="mini"
- @click="removeFile(scope.row.id,scope.$index)"
- type="danger"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane :label="filetabName">
- <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
- <el-table-column header-align="center" align="center" label="文档">
- <template slot-scope="scope">
- <p>
- <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank"
- rel="noopener noreferrer">
- {{scope.row.fileName}}
- </a>
- </p>
- </template>
- </el-table-column>
- <el-table-column header-align="center" align="center" label="操作">
- <template slot-scope="scope">
- <el-button
- size="mini"
- @click="removeFile(scope.row.id,scope.$index)"
- type="danger"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="问题确认单">
- <pblmConfirmShett :openType="true" :currentObjectId="changeSupervision.objId" :key="changeSupervision.objId"></pblmConfirmShett>
- </el-tab-pane>
- </el-tabs>
- </div>
- <!-- <upload ref="changeUploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload> -->
- </div>
- <span slot="footer">
- <el-button
- type="primary"
- @click="changeSupervisionInfo"
- :loading="buttonLoading"
- >保存</el-button>
- <el-button @click="changeSupervisionVisiblefalse">取消</el-button>
- </span>
- </el-dialog>
- </div>
- <!-- </el-card> -->
- </el-main>
- </el-container>
- <el-dialog
- class="outerDialog custom_dialog"
- title="类型"
- width="20%"
- :visible.sync="isToFormVisible">
- <span>
- <p style="display: flex;align-items: center;">
- 类型 <el-select v-model="oneForm" placeHolder="请选择一表一单类型" style="width:calc(100% - 60px)!important;padding-left: 10px;">
- <el-option label="问题(现场)确认单" value="wtxcqrd-1"></el-option>
- <el-option label="问题提交单(流域机构督查办)" value="wttjd-2"></el-option>
- </el-select>
- </p>
- </span>
- <span slot="footer">
- <el-button type="primary" @click="toFormOk">确定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import axios from 'axios';
- import {
- deleteFileById,
- findPageInfoRenYin,
- getSHProblemNew,
- getSupervisdByID,
- showDetailsXq,
- submitUpload,
- updatelist,
- pblmSubmit
- } from "../../api/duChaAPI.js";
- import {formatDateTime2} from '@util/gw_date.js'
- import {exportModel} from "@util/gw_exportModel";
- import request from "../../utils/gw_ajax_request.js";
- import {hostUrl} from "@util/global_variable.js";
- import elaudio from "../../widgets/elAudioShort.vue";
- import inuptWithDuChaTreeNode from "../../widgets/inuptWithDuChaTreeNode.vue";
- import inputWidthDuChaNodes from "../../widgets/inputWithDuChaNodes.vue";
- import inputWidthDuChaShuiKu from "../../widgets/inputWith_sk.vue";
- import Viewer from 'viewerjs';
- import 'viewerjs/dist/viewer.css';
- import {formatDateTime2New} from "../../utils/gw_date";
- export default {
- props: ["codeId"],
- components: {
- upload: resolve => {
- require(["../../widgets/uploadFile.vue"], resolve);
- },
- //详情页
- supervisionDetails: resolve => {
- require(["./supervisionDetails_shuihui.vue"], resolve);
- },
- // 删除描述页
- ProblemDelete: resolve => {
- require(["./problemDelete.vue"], resolve);
- },
- pblmConfirmShett: resolve => {
- require(["../duChaDuiXiang/pblmConfirmShett"], resolve);
- },
- elaudio: elaudio,
- inuptWithDuChaTreeNode: inuptWithDuChaTreeNode,
- inputWidthDuChaNodes: inputWidthDuChaNodes,
- inputWidthDuChaShuiKu: inputWidthDuChaShuiKu
- },
- data() {
- var validatePass1 = (rules1, value, callback) => {
- if (this.newSupervision.startTime > this.newSupervision.endTime) {
- callback(new Error("结束时间不能早于开始时间"));
- } else {
- callback();
- }
- };
- var validatePass2 = (rules1, value, callback) => {
- let startTime = this.changeSupervision.startTime.slice(0, 10);
- if (startTime > this.changeSupervision.endTime) {
- callback(new Error("结束时间不能早于开始时间"));
- } else {
- callback();
- }
- };
- var divisionList = (rules1, value, callback) => {
- if (this.newGroup.divisionList.length) {
- callback();
- } else {
- callback(new Error("至少要添加一个地区"));
- }
- };
- return {
- oneForm:"wtxcqrd-1",
- isToFormVisible:false,
- ids:"",
- tabType: "0",//0全部数据,1当前数据,2历史数据
- showExpandSearchPanel: false,
- deleteId: "",
- addPicPanel: false,
- treeNodeArray: [],
- treeNodeSelectVisible: false,
- adNodeArray: [],
- adNodeSelectVisible: false,
- areaSelectVisible: false,
- rsvrNodeArray: [],
- rsvrNodeSelectVisible: false,
- skSelectVisible: false,
- currentProblemId: "",
- updateIdXiuGai: "",
- rules1: {
- inspPblmName: [
- {
- required: true,
- message: "请输入问题名称",
- trigger: "blur"
- },
- {
- min: 1,
- max: 999,
- message: "不超过100字符",
- trigger: "blur"
- }
- ],
- inspPblmDesc: [
- {
- required: true,
- message: "请输入问题描述",
- trigger: "blur"
- }
- ],
- recPers: [
- {
- required: true,
- message: "请输入记录人",
- trigger: "blur"
- },
- {
- min: 1,
- max: 999,
- message: "不超过100字符",
- trigger: "blur"
- }
- ],
- objType: [
- {
- required: true,
- message: "请选择督查对象类型",
- trigger: "change"
- }
- ],
- objId: [
- {
- required: true,
- message: "请选择督查对象类型",
- trigger: "change"
- }
- ],
- inspPblmType: [
- {
- required: true,
- message: "请选择督查问题类型",
- trigger: "change"
- }
- ],
- dataStat: [
- {
- required: true,
- message: "请选择数据状态",
- trigger: "change"
- }
- ],
- collTime: [
- {
- required: true,
- message: "请选择采集时间",
- trigger: "change"
- }
- ],
- ifCasePblm: [
- {
- required: true,
- message: "请选择是否典型",
- trigger: "change"
- }
- ],
- pblmStat: [
- {
- required: true,
- message: "请选择问题类型",
- trigger: "change"
- }
- ],
- inspPblmCate: [
- {
- required: true,
- message: "请选择问题程度",
- trigger: "change"
- },
- {
- trigger: "change"
- }
- ]
- },
- dxdcAsideHeight: window.innerHeight - 220,
- maxHeight: window.innerHeight - 300,
- testHeight: window.innerHeight - 111,
- supervisionStateList: [
- {
- value: "0",
- label: "暂存"
- },
- {
- value: "1",
- label: "上报"
- }
- ],
- supervisionState: [
- {
- value: "0",
- label: "一般"
- },
- {
- value: "1",
- label: "较重"
- },
- {
- value: "2",
- label: "严重"
- }
- ],
- supervision: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ],
- findUseOrgArray: [],
- areaInputValue: {},
- memberInputValue: {},
- multipleSelection: [], // 已选
- selectionType: {
- remove: 0,
- befor: 0,
- now: 0,
- after: 0
- },
- // 根据客户点击的督查类型查找督查对象ID
- // 新增
- listobjId: [],
- userId: localStorage.getItem("userid"),
- // 修改督查
- pictureArray: [],
- audioArray: [],
- videoArray: [],
- fileArray: [],
- audiotabName: "",
- videotabName: "",
- picturetabName: "",
- filetabName: "",
- playerOptions: {
- height: "120",
- autoplay: true,
- muted: true,
- language: "en",
- playbackRates: [0.7, 1.0, 1.5, 2.0],
- sources: [
- {
- type: "video/mp4",
- // mp4
- src: "http://vjs.zencdn.net/v/oceans.mp4"
- // webm
- // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
- },
- {
- type: "video/mp4",
- // mp4
- src: "http://vjs.zencdn.net/v/oceans.mp4"
- // webm
- // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
- },
- {
- type: "video/mp4",
- // mp4
- src: "http://vjs.zencdn.net/v/oceans.mp4"
- // webm
- // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
- },
- {
- type: "video/mp4",
- // mp4
- src: "http://vjs.zencdn.net/v/oceans.mp4"
- // webm
- // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
- }
- ]
- },
- changeSupervisionVisible: false,
- changeSupervisionLoading: false,
- changeSupervision: {
- nm: "",
- presId: localStorage.getItem("userid"),
- endTime: "",
- pblmId: "",
- objId: "",
- objType: "",
- inspGroupId: "",
- inspPblmName: "",
- inspPblmDesc: "",
- pblmLong: "",
- pblmLat: "",
- pblmStat: "",
- ifCasePblm: "",
- inspPblmOrgName: "",
- pblmPersName: "",
- inspPblmCate: "",
- reviOpin: "",
- reviConc: "",
- reviOrgGuid: "",
- collTime: "",
- recPers: "",
- gwComFiles: [
- {
- id: "",
- filePath: "",
- bizId: ""
- }
- ]
- },
- // 文件弹框
- fileList: [], // 当前文件列表
- flash: false,
- // 督查类型
- supervisionTypeList: [
- {
- value: "1",
- label: "小水库"
- }
- ],
- leibie: [],
- // 查询
- value6: [],
- hasVedio1: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ],
- findParams: {
- hasVedio: "",
- adCode: "",
- pblmStat: "",
- inspPblmCate: "",
- inspPblmName: "",
- ifCasePblm: "",
- nm: "",
- adFullName: "",
- startTime: "",
- endTime: "",
- objType: 3,
- pType:3,
- persId: localStorage.getItem("userid"),
- state: ''
- },
- stateList: [
- {
- label: '未提交',
- value: '0'
- },
- {
- label: '已提交',
- value: '2'
- },
- {
- label: '已发布',
- value: '3'
- }
- ],
- currentPage: 1, // 页码
- pageSize: 20, // 条数
- loading: false,
- total: 0, // 总数
- searchResult: [], // 结果
- crId: "", // 当前督查id
- // 督查详情
- userid: localStorage.getItem("userid"),
- supervisionDetailsVisible: false,
- problemDeleteVisible: false,
- supervisionDetails: {},
- pblmId: "",
- gwComFiles: [],
- treeData: [],
- pblscr: "",
- pblscrList: [
- {
- lable: "我的问题",
- value: localStorage.getItem("userid")
- }
- ],
- pblscrGroup: "",
- tableHeight: window.innerHeight - 290,
- header: {
- 'persId': localStorage.getItem('userid'),
- 'orgId': localStorage.getItem('currentOrgId'),
- 'accessToken': localStorage.getItem('accessToken')
- },
- fileListLength: 0,
- exportLoading: false,
- datas: {},
- buttonLoading: false
- };
- },
- computed: {
- persId() {
- return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
- },
- hostUrl() {
- return hostUrl
- },
- formatDateTime() {
- return formatDateTime2New
- },
- isGd(){
- if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
- return true;
- }else{
- return false;
- }
- }
- },
- created() {
- if (this.userId) {
- console.log("已经登录");
- this.search();
- } else {
- this.$router.push("/login");
- }
- let type = "3";
- let pguid = "";
- this.getLeftTreeData();
- this.addPicPanel = false;
- findPageInfoRenYin(type, pguid).then(res => {
- this.leibie = res.data;
- // console.log(this.leibie)
- });
- },
- watch: {
- codeId: function () {
- this.search();
- },
- showExpandSearchPanel: function (val) {
- if (val) {
- this.tableHeight = window.innerHeight - 389;
- } else {
- this.tableHeight = window.innerHeight - 290;
- }
- }
- },
- methods: {
- isMine(row){
- return row.recPers == this.persId;
- },
- openDetails(row) {
- this.currentProblemId = row.pblmId;
- this.supervisionDetailsVisible = true;
- },
- tabChange(tabType) {
- this.tabType = tabType;
- this.getLeftTreeData();
- this.search();
- },
- handleCheckChange(data, checked, indeterminate) {
- let cNarray = this.$refs["jigou_tree"].getCheckedNodes();
- console.log(cNarray);
- this.treeNodeArray = cNarray;
- },
- getLeftTreeData() {
- var _self = this;
- request
- .get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.userId,
- orgType: "003",
- tabType: this.tabType
- }
- })
- .then(res => {
- let data = res.data;
- data.forEach(ele => {
- if (ele.pid == null || ele.pid == "") {
- ele.pid = "001";
- }
- });
- data = _self.getTrees(data);
- _self.treeData = data;
- console.log(data);
- // _self.duChaType = _self.treeData[0].id.substring(2,3);
- });
- },
- //格式化树形数据
- getTrees(list) {
- //@wxcwater重写方法 适应多个树
- let highLevelLength = 99; //预设最大节点id长度,目前最大应该为12,所以设置为99保证正常
- let _self = this;
- list.forEach((item, index) => {
- item["pidLength"] = item.pid && item.pid != "" ? item.pid.length : 0;
- if (highLevelLength > item.pidLength) {
- highLevelLength = item.pidLength;
- }
- });
- console.log(highLevelLength);
- let heightLevelNode = [];
- list.forEach((item, index) => {
- if (highLevelLength >= item.pidLength) {
- heightLevelNode.push(item);
- }
- });
- list.forEach((item, index) => {
- heightLevelNode.forEach(pItem => {
- _self.addTreeNode(pItem, item);
- });
- });
- console.log(heightLevelNode);
- return heightLevelNode;
- },
- addTreeNode: function (treeNode, leafNode) {
- let _self = this;
- if (!treeNode.hasOwnProperty("children")) {
- treeNode["children"] = [];
- }
- if (leafNode.pid == treeNode.id) {
- treeNode.children.push(leafNode);
- return;
- }
- treeNode.children.forEach(item => {
- _self.addTreeNode(item, leafNode);
- });
- },
- // 查询参数逻辑
- insertTreeNode: function (params) {
- this.treeNodeArray.push({
- name: params.name,
- code: params.code
- });
- this.treeNodeSelectVisible = false;
- this.areaSelectVisible = false;
- this.skSelectVisible = false;
- },
- deleteTreeNode: function (tag) {
- let deleteIndex;
- this.treeNodeArray.forEach((item, index) => {
- if (item.code == tag.code) {
- deleteIndex = index;
- }
- });
- this.treeNodeArray.splice(deleteIndex, 1);
- },
- selectDuChaAreaNode(params) {
- this.adNodeArray.push(params);
- this.areaSelectVisible = false;
- this.skSelectVisible = false;
- },
- deleteAreaNode(tag) {
- let deleteIndex;
- this.adNodeArray.forEach((item, index) => {
- if (item.adCode == tag.adCode) {
- deleteIndex = index;
- return;
- }
- });
- this.adNodeArray.splice(deleteIndex, 1);
- },
- selectSkNode(params) {
- this.rsvrNodeArray.push(params);
- this.skSelectVisible = false;
- },
- deleteSkNode(tag) {
- let deleteIndex;
- this.rsvrNodeArray.forEach((item, index) => {
- if (item.rsCode == tag.rsCode) {
- deleteIndex = index;
- return;
- }
- });
- this.rsvrNodeArray.splice(deleteIndex, 1);
- },
- // end
- handleClose(tag) {
- this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
- },
- showInput() {
- this.inputVisible = true;
- this.$nextTick(_ => {
- this.$refs.saveTagInput.$refs.input.focus();
- });
- },
- handleInputConfirm() {
- // let inputValue = this.inputValue;
- // if (inputValue) {
- // this.dynamicTags.push(inputValue);
- // }
- // this.inputVisible = false;
- // this.inputValue = '';
- },
- // 操作成功反馈
- successInfo() {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- },
- // 操作失败反馈
- failInfo(val) {
- this.$message.error(val);
- },
- // 清空选择
- toggleSelection(rows) {
- this.$refs.multipleTable.clearSelection();
- },
- // 已选择项
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- toForm(){
- var idArr = [];
- if(this.multipleSelection && this.multipleSelection.length==0){
- this.$message.warning("请选择数据");
- return false;
- }else{
- this.multipleSelection.forEach((item)=>{
- idArr.push(item.pblmId);
- })
- }
- this.ids = idArr.join(",");
- this.isToFormVisible = true;
- },
- toFormOk(){
- let host = hostUrl;
- let nginx = '/pageofficePath/';
- var params = {
- ids:this.ids
- }
- axios.post('/pageofficePath/pageoffice/pblm/list/sendIds',params).then((res)=> {
- if(res.status==200){
- let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?filename='+this.oneForm+'|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
- let a = document.createElement('a'); // 创建a标签
- a.setAttribute('href', href);// href链接
- a.click();// 自执行点击事件
- }
- })
- },
- // 查询
- async exportExcel() {
- let _self = this;
- _self.exportLoading = true;
- await request.get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.userId,
- orgType: "003"
- }
- }).then(res => {
- let orgAllNode = res.data;
- let data = _self.findParams;
- data.pageNum = _self.currentPage;
- data.pageSize = _self.pageSize;
- data.villType = "0";
- this.datas = JSON.stringify(data);
- _self.findUseOrgArray = [];
- _self.treeNodeArray.forEach(item => {
- if (item.id.length < 12) {
- orgAllNode.forEach(orgItem => {
- if (orgItem.id.startsWith(item.id)) {
- _self.findUseOrgArray.push(orgItem.id);
- }
- });
- } else {
- _self.findUseOrgArray.push(item.id);
- }
- });
- if (_self.findUseOrgArray.length > 0) {
- data["orgIds"] = _self.findUseOrgArray.join(",");
- } else {
- data["orgIds"] = "";
- }
- });
- let url = "/pdcApi/dc/insp/pblm/page/export";
- let type = "post";
- let exportName = "水毁工程问题列表.xls";
- let result = await exportModel(type, url, exportName, this.datas);
- _self.exportLoading = result;
- },
- async exportWord() {
- let _self = this;
- _self.exportLoading = true;
- await request.get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.userId,
- orgType: "001"
- }
- }).then(res => {
- let orgAllNode = res.data;
- let data = _self.findParams;
- data.pageNum = _self.currentPage;
- data.pageSize = _self.pageSize;
- data.villType = "0";
- this.datas = data;
- _self.findUseOrgArray = [];
- _self.treeNodeArray.forEach(item => {
- if (item.id.length < 12) {
- orgAllNode.forEach(orgItem => {
- if (orgItem.id.startsWith(item.id)) {
- _self.findUseOrgArray.push(orgItem.id);
- }
- });
- } else {
- _self.findUseOrgArray.push(item.id);
- }
- });
- if (_self.findUseOrgArray.length > 0) {
- data["orgIds"] = _self.findUseOrgArray.join(",");
- } else {
- data["orgIds"] = "";
- }
- });
- await request.post('/track/doc', this.datas).then(res => {
- if (res.success) {
- _self.exportLoading = false;
- console.log(this.response)
- var a = document.createElement('a');
- a.href = `${this.hostUrl}${res.data.downloadPath}`;
- //设置文件名称
- a.download = '水毁工程问题详情.doc';
- a.click();
- // window.open(`${this.hostUrl}${res.data.downloadPath}`)
- } else {
- _self.$mesage.error(res.message)
- }
- }).catch(res => {
- _self.$mesage.error(res.message)
- })
- },
- search() {
- this.loading = true;
- let _self = this;
- request
- .get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.userId,
- orgType: "003",
- tabType: this.tabType
- }
- })
- .then(res => {
- let orgAllNode = res.data;
- _self.loading = true;
- let data = _self.findParams;
- data.startTime = _self.value6 && _self.value6.length > 0 ? _self.value6[0] : '';
- data.endTime = _self.value6 && _self.value6.length > 0 ? _self.value6[1] : '';
- data.pageNum = _self.currentPage;
- data.recPers = _self.pblscr;
- data.orgNm = _self.pblscrGroup;
- // data.recPers = localStorage.getItem('userid');
- data.pageSize = _self.pageSize;
- // data.adCode = this.codeId;
- _self.findUseOrgArray = [];
- _self.treeNodeArray.forEach(item => {
- if (item.id.length < 12) {
- // orgAllNode.forEach((orgItem) => {
- // if(orgItem.id.startsWith(item.code)){
- // _self.findUseOrgArray.push(orgItem.id);
- // }
- // });
- } else {
- _self.findUseOrgArray.push(item.id);
- }
- });
- if (_self.findUseOrgArray.length > 0) {
- data["orgIds"] = _self.findUseOrgArray.join(",");
- } else {
- data["orgIds"] = "";
- }
- data.tabType = this.tabType;
- getSHProblemNew(data).then(res => {
- _self.loading = false;
- _self.multipleSelection = [];
- if (res.success) {
- _self.searchResult = res.data.list;
- // console.log( "绝对是"+searchResult)
- _self.total = res.data.total;
- } else {
- _self.failInfo();
- }
- });
- });
- },
- async submitBtn() {
- if (this.multipleSelection.length === 0) {
- this.$message.warning('请至少选择一条问题');
- return;
- }
- let newArray = this.multipleSelection.map((item) => {
- return {
- "objId": item.objId,
- "objType": item.objType,
- "state": "3"
- }
- });
- const {success, message} = await pblmSubmit(newArray);
- if (success) {
- this.$message.success('问题发布成功');
- this.search();
- } else {
- this.$message.warning(message);
- }
- },
- handleSizeChange(pageSize) {
- this.pageSize = pageSize;
- this.search();
- },
- // 新增
- getDuChaId() {
- //新增中 获取督查对象id
- getSupervisdByID(this.userid, 1).then(res => {
- if (res.success) {
- // alert(1)
- this.listobjId = res.data;
- } else {
- this.failInfo();
- }
- });
- },
- // 取消
- removeNewSupervision(arg) {
- this.gwComFiles = [];
- if (arg) {
- this.gwComFiles = arg;
- this.$refs.uploadFile.init();
- }
- },
- // 详情弹框
- showDetails(id) {
- this.currentProblemId = id;
- this.supervisionDetailsVisible = true;
- },
- // 删除弹窗
- removeSuperviseOne(id) {
- this.deleteId = id;
- this.problemDeleteVisible = true;
- // showDetailsXq(id).then(res => {
- // // console.log("123" + res.data)
- // this.persNameRen = res.data.persName;
- // });
- },
- deleteSuccess() {
- this.problemDeleteVisible = false;
- this.search();
- this.$emit("problemCount");
- },
- // 修改弹窗显示
- changeSup(id) {
- this.currentProblemId = '';
- this.pictureArray = [];
- this.audioArray = [];
- this.videoArray = [];
- this.fileArray = [];
- this.updateIdXiuGai = id;
- var _this = this;
- showDetailsXq(this.updateIdXiuGai).then(res => {
- // if(this.usersId==)
- this.changeSupervision = res.data;
- this.fileList = this.changeSupervision.gwComFiles;
- this.changeSupervisionVisible = true;
- res.data.gwComFiles.forEach(item => {
- if (
- item.fileExt == "mp3" ||
- item.fileExt == "MP3" ||
- item.fileExt == "m4a"
- ) {
- this.audioArray.push(item);
- } else if (
- item.fileExt == "jpg" ||
- item.fileExt == "JPG" ||
- item.fileExt == "png" ||
- item.fileExt == "PNG" ||
- item.fileExt == "JPEG" ||
- item.fileExt == "jpeg"
- ) {
- this.pictureArray.push(item);
- } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
- this.videoArray.push({
- id: item.id,
- bizId: item.bizId,
- width: "130",
- height: "130",
- autoplay: false,
- muted: true,
- language: "en",
- playbackRates: [0.7, 1.0, 1.5, 2.0],
- sources: [
- {
- type: "video/mp4",
- // mp4
- src: this.hostUrl + item.filePath
- // webm
- // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
- }
- ]
- });
- } else {
- this.fileArray.push(item);
- }
- });
- _this.$nextTick(function(){
- var ViewerDom = document.getElementById('imgView');
- var viewer = new Viewer(ViewerDom, {})
- });
- this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
- this.audiotabName = "音频资料(" + this.audioArray.length + ")";
- this.videotabName = "视频资料(" + this.videoArray.length + ")";
- this.filetabName = "其它资料(" + this.fileArray.length + ")";
- });
- },
- // 提交修改信息
- changeSupervisionInfo() {
- this.$refs.changeSupFrom.validate(valid => {
- if (valid) {
- this.$nextTick(() => {
- this.changeSupervisionVisible = true;
- this.buttonLoading = true;
- if (this.$refs.uploadFile.submitUpload(this.changeSupervision.pblmId)) {
- this.removeNewSupervision();
- }
- setTimeout(() => {
- this.changeSupervisionLoading = true;
- this.changeSupervision.gwComFiles = this.gwComFiles;
- let data = this.changeSupervision;
- updatelist(data).then(res => {
- this.pblmId = res.data.pblmId;
- this.gwComFiles = res.data.gwComFiles;
- this.changeSupervisionLoading = false;
- if (res.success) {
- this.buttonLoading = false;
- this.search();
- this.changeSupervisionVisible = false;
- this.addPicPanel = false;
- } else {
- this.failInfo();
- }
- });
- }, 1000)
- })
- }
- });
- },
- // 删除图片文件
- removeFile(id, index) {
- var _self = this;
- this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "返回",
- type: "warning"
- }).then(
- res => {
- if (res === "confirm") {
- deleteFileById(id, this.userId).then(res => {
- if (res.success) {
- this.fileListLength = 0;
- this.fileList.forEach(item => {
- if (
- item.fileExt == "mp3" ||
- item.fileExt == "MP3" ||
- item.fileExt == "m4a"
- ) {
- this.audioArray.splice(index, 1);
- } else if (
- item.fileExt == "jpg" ||
- item.fileExt == "JPG" ||
- item.fileExt == "png" ||
- item.fileExt == "PNG" ||
- item.fileExt == "JPEG" ||
- item.fileExt == "jpeg"
- ) {
- this.pictureArray.splice(index, 1);
- } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
- this.videoArray.splice(index, 1);
- }
- });
- _self.changeSup(this.updateIdXiuGai);
- } else {
- this.failInfo();
- }
- });
- }
- },
- res => {
- console.log("返回");
- }
- );
- },
- changeSupervisionVisiblefalse() {
- this.$nextTick(() => {
- if (this.flash) {
- this.flash = false;
- this.search();
- }
- });
- this.changeSupervisionVisible = false;
- this.changeSupervision = {
- dataStat: "",
- nm: "",
- endTime: "",
- pblmId: "",
- objId: "",
- objType: "",
- inspGroupId: "",
- inspPblmCate: "",
- inspPblmName: "",
- inspPblmDesc: "",
- pblmLong: "",
- pblmLat: "",
- pblmStat: "",
- ifCasePblm: "",
- inspPblmOrgName: "",
- pblmPersName: "",
- reviOpin: "",
- reviConc: "",
- reviOrgGuid: "",
- collTime: "",
- recPers: "",
- note: "",
- gwComFiles: [
- {
- id: "",
- filePath: "",
- bizId: ""
- }
- ]
- };
- this.$refs.changeUploadFile.init();
- this.addPicPanel = false;
- },
- addPic() {
- this.addPicPanel = !this.addPicPanel;
- },
- //水库查询下拉框数据 wby
- },
- activated() {
- this.findParams = {
- hasVedio: "",
- adCode: "",
- pblmStat: "",
- inspPblmCate: "",
- inspPblmName: "",
- ifCasePblm: "",
- nm: "",
- adFullName: "",
- startTime: "",
- endTime: "",
- objType: 3,
- pType:3,
- inspPblmName: "",
- persId: localStorage.getItem("userid")
- }
- },
- };
- </script>
- <style rel="stylesheet/scss" lang="scss" scoped>
- @import "./base.css";
- @import url("/src/assets/iconfont/iconfont.css");
- @import url("/src/assets/css/mixin.scss");
- .upload-container {
- width: 100%;
- position: relative;
- .image-uploader {
- width: 35%;
- float: left;
- }
- .image-preview {
- width: 200px;
- height: 200px;
- position: relative;
- border: 1px dashed #d9d9d9;
- float: left;
- // margin-left: 50px;
- .image-preview-wrapper {
- position: relative;
- width: 100%;
- height: 100%;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .image-preview-action {
- position: absolute;
- width: 100%;
- height: 30px;
- left: 0;
- bottom: 0;
- cursor: default;
- text-align: center;
- color: #fff;
- opacity: 0;
- font-size: 20px;
- background-color: rgba(0, 0, 0, 0.5);
- transition: opacity 0.3s;
- cursor: pointer;
- text-align: center;
- line-height: 30px;
- .el-icon-delete {
- font-size: 25px;
- }
- }
- &:hover {
- .image-preview-action {
- opacity: 1;
- }
- }
- }
- .image-app-preview {
- margin-bottom: 10px;
- width: 40vh;
- height: 180px;
- position: relative;
- border: 1px dashed #d9d9d9;
- float: left;
- // margin-left: 50px;
- .app-fake-conver {
- height: 44px;
- position: absolute;
- width: 100%; // background: rgba(0, 0, 0, .1);
- text-align: center;
- line-height: 64px;
- color: #fff;
- }
- }
- }
- .shuihui .el-date-editor.el-input {
- min-width: 180px !important;
- }
- .shuihui .header {
- padding: 0px 10px;
- }
- .shuihui .el-row {
- margin-bottom: 5px;
- }
- .shuihui .content {
- margin: 10px;
- }
- .shuihui .search > > > .el-table .el-button:nth-child(odd) {
- margin-left: 0 !important;
- }
- .custom_dialog .el-dialog {
- width: 60% !important;
- }
- .custom_dialog .scroll300 {
- max-height: 60vh !important;
- }
- .scroll300 .el-form {
- padding-top: 5px;
- padding-right: 5px;
- }
- .shuihui .el-tag + .el-tag {
- margin-left: 10px;
- }
- .shuihui .button-new-tag {
- margin-left: 10px;
- height: 28px;
- line-height: 28px;
- padding-top: 0;
- padding-bottom: 0;
- }
- .shuihui .input-new-tag {
- width: 90px;
- margin-left: 10px;
- vertical-align: bottom;
- }
- .skactive {
- background: #3f8eff !important;
- color: white !important;
- margin-top: 5px;
- margin-bottom: 5px;
- padding: 7px 10px !important;
- }
- .sknormal {
- background: white;
- margin-top: 5px;
- margin-bottom: 5px;
- padding: 7px 10px !important;
- }
- .inspPblmCate {
- padding: 2px 10px;
- border-radius: 10px;
- color: #ffffff;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- }
- </style>
|