123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617 |
- <template>
- <div>
- <fullscreen
- :fullscreen.sync="fullscreen"
- class="container structure-l mc-style"
- style="margin: 0; width: calc(75% - 15px)"
- >
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="友商竞争信息" name="first">
- <div class="container-box">
- <!-- <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList> -->
- <div class="checknum">
- <span>全部({{ total }}) | 已选</span>
- <span class="c-188ACF">({{ totalcheck }})</span>
- </div>
- <div class="titbtn-box">
- <el-button
- size="medium"
- type="success"
- icon="el-icon-s-order"
- @click="outExe(1)"
- >汇总Excel报表</el-button
- >
- <el-button
- size="medium"
- type="primary"
- icon="el-icon-plus"
- @click="addinfo"
- >新建</el-button
- >
- </div>
- <div class="search">
- <mySearch
- :searchList="searchList"
- @searchInfo="searchInfo"
- ></mySearch>
- </div>
- <div class="tabbox">
- <el-table
- height="calc(50vh - 100px)"
- @select="checkNum"
- @select-all="checkNum"
- class="com-table"
- ref="multipleTable"
- :data="tableData"
- tooltip-effect="dark"
- size="small"
- border
- style="width: 100%"
- v-loading="loading"
- >
- <el-table-column type="selection" width="55"> </el-table-column>
- <el-table-column
- prop="violationCateName"
- label="违规类别"
- width="100"
- >
- </el-table-column>
- <el-table-column prop="provinceName" label="省份">
- </el-table-column>
- <el-table-column
- width="100"
- prop="recordRegionName"
- label="违规地市"
- >
- </el-table-column>
- <el-table-column prop="operatorName" label="运营商">
- </el-table-column>
- <el-table-column prop="violationItemName" label="违规项目">
- </el-table-column>
- <el-table-column width="120" label="违规内容">
- <template slot-scope="scope">
- <el-tooltip
- class="item"
- effect="light"
- :content="scope.row.violationContent"
- placement="bottom"
- >
- <span
- class="tab-long"
- v-show="scope.row.violationContent.length > 7"
- >{{ scope.row.violationContent }}</span
- >
- </el-tooltip>
- <span v-show="scope.row.violationContent.length <= 7">{{
- scope.row.violationContent
- }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="tariffName" label="资费名称">
- </el-table-column>
- <el-table-column width="120" label="资费内容">
- <template slot-scope="scope">
- <el-tooltip
- class="item"
- effect="light"
- :content="scope.row.taffiffContent"
- placement="bottom"
- >
- <span
- class="tab-long"
- v-show="scope.row.taffiffContent.length > 7"
- >{{ scope.row.taffiffContent }}</span
- >
- </el-tooltip>
- <span v-show="scope.row.taffiffContent.length <= 7">{{
- scope.row.taffiffContent
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="monthFee"
- sortable
- width="100"
- label="月费(元)"
- >
- </el-table-column>
- <el-table-column
- prop="preFee"
- width="110"
- sortable
- label="预存款(元)"
- >
- </el-table-column>
- <el-table-column prop="remFee" width="100" label="酬金">
- </el-table-column>
- <el-table-column prop="saleChnl" label="渠道">
- </el-table-column>
- <el-table-column prop="saleScope" label="范围">
- </el-table-column>
- <el-table-column prop="monthSale" label="月销量">
- </el-table-column>
- <el-table-column label="上报时间" width="140">
- <template slot-scope="scope" class="tab-btn">
- <span>{{ scope.row.opTime }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="opName" label="上报人">
- <template slot-scope="scope">
- <span>{{ $desensitization(scope.row.opName, 1) }}</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="contactPhone"
- width="100"
- label="联系电话"
- >
- </el-table-column>
- <el-table-column label="审核状态">
- <template slot-scope="scope" class="tab-btn">
- <span
- :class="
- scope.row.sts * 1 === 2
- ? 'pass'
- : scope.row.sts * 1 === 1
- ? 'nopass'
- : ''
- "
- >{{ scope.row.stsDesc }}</span
- >
- </template>
- </el-table-column>
- <el-table-column
- prop="evidenceType"
- label="证据类型"
- width="100"
- >
- </el-table-column>
- <el-table-column
- prop="fixFlagDesc"
- label="是否已解决"
- width="100"
- >
- </el-table-column>
- <el-table-column
- prop="groupFlagDesc"
- label="是否反馈总部"
- width="100"
- >
- </el-table-column>
- <el-table-column
- prop="wwFlagDesc"
- label="是否返回竞合"
- width="100"
- >
- </el-table-column>
- <el-table-column
- prop="admFlagDesc"
- label="是否反馈总局"
- width="100"
- >
- </el-table-column>
- <el-table-column
- label="操作"
- width="120"
- align="center"
- fixed="right"
- >
- <template slot-scope="scope" class="tab-btn">
- <el-dropdown @command="outlineinfo">
- <i class="el-icon-download"></i>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item :command="scope"
- ><i class="el-icon-picture"></i
- >对外导出图片</el-dropdown-item
- >
- <el-dropdown-item :command="scope.row"
- ><i class="el-icon-folder-opened"></i
- >对内导出word</el-dropdown-item
- >
- </el-dropdown-menu>
- </el-dropdown>
- <el-tooltip
- class="item"
- effect="light"
- content="详情"
- placement="bottom-end"
- >
- <i
- class="el-icon-view"
- @click="checkInfo(scope.row.id)"
- ></i>
- </el-tooltip>
- <el-tooltip
- class="item"
- effect="light"
- content="删除"
- placement="bottom-end"
- >
- <i class="el-icon-delete" @click="delLine(scope.row)"></i>
- </el-tooltip>
- <el-tooltip
- class="item"
- effect="light"
- content="修改"
- placement="bottom-end"
- >
- <i
- class="el-icon-edit"
- @click="changeInfo(scope.row)"
- v-if="scope.row.sts !== 1"
- ></i>
- </el-tooltip>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- class="pageBox"
- @current-change="currchange"
- layout="prev, pager, next"
- background
- :total="total"
- >
- </el-pagination>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane label="友商在售信息" name="second">
- <el-dialog
- style="margin-top: 0"
- title="上报excel"
- :modal="false"
- :visible.sync="dialogTableVisible"
- :close="clickClose"
- :destroy-on-close="true"
- >
- <div class="container-box">
- <simple-sheet @save="save" :excel="excelList" />
- </div>
- </el-dialog>
- </el-tab-pane>
- </el-tabs>
- <myMessage
- :messTit="messTit"
- @closeMessage="closeMessage"
- :centerDialogVisible="centerDialogVisible"
- v-if="centerDialogVisible"
- ></myMessage>
- <myMessage
- :messTit="messTit"
- @closeMessage="closeMessagedel"
- :centerDialogVisible="centerDialogVisibledel"
- v-if="centerDialogVisibledel"
- ></myMessage>
- </fullscreen>
- <competeRight></competeRight>
- </div>
- </template>
- <script>
- import competeRight from "../../../components/competeRight";
- import mySearch from "../../../components/search";
- import toolList from "../../../components/toolList.vue";
- import myMessage from "../../../components/myMessage.vue";
- import simpleSheet from "./components/sheet.vue";
- export default {
- components: {
- simpleSheet,
- competeRight,
- mySearch,
- toolList,
- myMessage,
- },
- data() {
- return {
- celldata: [
- { r: 0, c: 0, v: { v: "运营商", bl: 1, ht: 0, vt: 0 } },
- {
- r: 0,
- c: 1,
- tb: 2,
- v: {
- tb: 2,
- fs: 11,
- ht: 0,
- vt: 0,
- v: "套餐档位(从低到高进行填写)低档:58元以下套餐中档:58元(含)-128元套餐(不含)高档:128元及以上套餐",
- ct: { fa: "General", t: "n" },
- m: "2",
- },
- },
- {
- r: 0,
- c: 2,
- v: {
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- v: "套餐名称",
- ct: { fa: "General", t: "n" },
- m: "3",
- },
- },
- {
- r: 0,
- c: 3,
- v: {
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- v: "是否为主推套餐",
- ct: { fa: "General", t: "n" },
- m: "0",
- },
- },
- {
- r: 0,
- c: 4,
- v: {
- v: "月费(元)",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 5,
- v: {
- v: "优惠价",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 6,
- v: {
- v: "预存款(元)",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 7,
- v: {
- v: "套餐内容",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 8,
- v: {
- v: "酬金",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 9,
- v: {
- v: "在售区域",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 10,
- v: {
- v: "在售渠道",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 11,
- v: {
- v: "月销量",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 12,
- v: {
- v: "是否包含宽带",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 13,
- v: {
- v: "宽带具体内容",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 14,
- v: {
- v: "是否包括电视",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 15,
- v: {
- v: "是否包括副卡",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 16,
- v: {
- v: "是否包括亲情网",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 17,
- v: {
- v: "是否包括v网产品",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 18,
- v: {
- v: "其他补充信息",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 19,
- v: {
- v: "上报人",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- {
- r: 0,
- c: 20,
- v: {
- v: "联系电话",
- bl: 0,
- it: 0,
- ff: 0,
- fs: 11,
- fc: "rgb(51, 51, 51)",
- ht: 0,
- vt: 0,
- },
- },
- ],
- excelList: [],
- dialogTableVisible: false,
- exportType: "1", // 1是违规 2是正常
- activeName: "first",
- tooltit: "",
- fullscreen: false,
- total: 0,
- total1: 0,
- totalcheck: 0,
- totalcheck1: 0,
- pageSize: 1,
- pageSize1: 1,
- tableData: [],
- tableData1: [],
- outList: [],
- outList1: [],
- searchList: [
- {
- type: "sel",
- tit: "类别",
- value: "",
- width: "19%",
- options: [],
- },
- {
- type: "sel",
- tit: "运营商",
- value: "",
- width: "19%",
- options: [],
- },
- {
- type: "date",
- tit: "开始时间",
- value: "",
- width: "19%",
- },
- {
- type: "date",
- tit: "结束时间",
- value: "",
- width: "19%",
- },
- {
- type: "input",
- tit: "请输入违规内容",
- value: "",
- width: "19%",
- },
- ],
- searchList1: [
- {
- type: "sel",
- tit: "类别",
- value: "",
- width: "19%",
- options: [],
- },
- {
- type: "sel",
- tit: "运营商",
- value: "",
- width: "19%",
- options: [],
- },
- {
- type: "date",
- tit: "开始时间",
- value: "",
- width: "19%",
- },
- {
- type: "date",
- tit: "结束时间",
- value: "",
- width: "19%",
- },
- ],
- params: {},
- centerDialogVisible: false,
- centerDialogVisibledel: false,
- messTit: "",
- delid: "",
- loading: false,
- };
- },
- methods: {
- save(val) {
- if (val) {
- this.getExcelList();
- }
- },
- getExcelList() {
- let name = JSON.parse(window.sessionStorage.getItem("userInfo")).cityName;
- this.$http({
- url: "/market/mkCompetitor/load",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- }).then((res) => {
- // console.log(res)
- // res.data.body[0].data.map((item) =>{
- // item.map((items) =>{
- // console.log(items)
- // })
- // })
- if (res.data.body != null ) {
- // let data = res.data.body[0].data;
- // res.data.body[0].data = [];
- // for (let i = 0; i <= data.length - 1; i++) {
- // if (i <= 79) {
- // res.data.body[0].data.push(data[i]);
- // }
- // }
- if (name == null) {
- this.getSheetList(res.data.body);
- // this.excelList = res.data.body
- } else {
- this.excelList = res.data.body;
- }
- } else {
- let titleList = [
- {
- name: "哈尔滨",
- order: 0,
- index: 0,
- cloumn: 10,
- row: 10,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //
- },
- },
- {
- name: "哈尔滨",
- order: 1,
- index: 1,
- column: 22,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //工作表保护
- },
- },
- {
- name: "鸡西",
- order: 2,
- index: 2,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //工作表保护
- },
- },
- {
- name: "友商在售信息",
- order: 0,
- index: 0,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //工作表保护
- },
- },
- {
- name: "友商在售信息",
- order: 0,
- index: 0,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //工作表保护
- },
- },
- {
- name: "友商在售信息",
- order: 0,
- index: 0,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //工作表保护
- },
- },
- {
- name: "友商在售信息",
- order: 0,
- index: 0,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //工作表保护
- },
- },
- {
- name: "友商在售信息",
- order: 0,
- index: 0,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //工作表保护
- },
- },
- {
- name: "友商在售信息",
- order: 0,
- index: 0,
- defaultRowHeight: 50, //自定义行高
- defaultColWidth: 120, //自定义列宽
- celldata: [...this.celldata],
- config: {
- merge: {}, //合并单元格
- rowlen: { 0: 100 }, //表格行高
- columnlen: { 1: 200 }, //表格列宽
- rowhidden: {}, //隐藏行
- colhidden: {}, //隐藏列
- borderInfo: {}, //边框
- authority: {}, //工作表保护
- },
- },
- ];
- this.excelList = titleList;
- }
- });
- },
- //判断数组是否有值
- getSheetList(data) {
- let name = JSON.parse(window.sessionStorage.getItem("userInfo")).cityName;
- if (name) {
- if (name.length === 5) {
- name.substring(0, 1);
- } else if (name.length === 6) {
- name.substring(0, 2);
- } else {
- name.substring(0, 3);
- }
- }
- const form = new FormData();
- form.append("name", name);
- this.$http({
- url: "/market/mkCompetitor/getSheet",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: form,
- }).then((res) => {
- res.data.body.map((item) => {
- data.push(item[0]);
- });
- for (let y = data[0].data.length - 1; y >= 3; y--) {
- if (data[0].data[y][0] === null || !data[0].data[y][0].v) {
- data[0].data.splice(y, 1);
- }
- }
- console.log(this.data);
- this.excelList = data;
- });
- },
- // 接口调用
- getSecondList(v, n) {
- this.pageSize = n;
- this.loading = true;
- this.totalcheck = 0;
- v.type = "正规";
- this.tableData1 = [];
- this.$http({
- url: "/market/swcompetitor/queryPage",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + n + '","pageSize":"10"}',
- },
- data: v,
- }).then((res) => {
- this.tableData1 = res.data.data;
- this.total1 = res.data.totalRecord;
- this.loading = false;
- });
- },
- handleClick() {
- if (this.activeName == "first") {
- this.getList(this.params, this.pageSize);
- } else {
- this.dialogTableVisible = true;
- this.getExcelList();
- }
- },
- clickClose() {
- console.log(123);
- },
- //查询处理
- searchInfo(v) {
- this.params = {};
- v[0] ? (this.params.violationCate = v[0]) : "";
- v[1] ? (this.params.operatorCode = v[1]) : "";
- v[2] ? (this.params.opTimeFrom = v[2]) : "";
- v[3] ? (this.params.opTimeTo = v[3]) : "";
- v[4] ? (this.params.violationContent = v[4]) : "";
- this.getList(this.params, this.pageSize);
- },
- //查询处理
- searchInfo1(v) {
- this.params = {};
- v[0] ? (this.params.violationCate = v[0]) : "";
- v[1] ? (this.params.operatorCode = v[1]) : "";
- v[2] ? (this.params.opTimeFrom = v[2]) : "";
- v[3] ? (this.params.opTimeTo = v[3]) : "";
- v[4] ? (this.params.violationContent = v[4]) : "";
- this.getSecondList(this.params, this.pageSize);
- },
- //获取列表
- getList(v, n) {
- let _this = this;
- this.pageSize = n;
- this.loading = true;
- this.tableData = [];
- this.totalcheck = 0;
- v.type = "违规";
- this.$http({
- url: "/market/swcompetitor/queryPage",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + n + '","pageSize":"10"}',
- },
- data: v,
- }).then((res) => {
- this.tableData = res.data.data;
- this.total = res.data.totalRecord;
- for (let i = 0; i < this.tableData.length; i++) {
- _this.tableData[i].preFee = _this.tableData[i].preFee * 1;
- _this.tableData[i].monthFee = _this.tableData[i].monthFee * 1;
- if (_this.tableData[i].contactPhone) {
- _this.tableData[i].contactPhone =
- _this.tableData[i].contactPhone.split("");
- _this.tableData[i].contactPhone[3] = "*";
- _this.tableData[i].contactPhone[4] = "*";
- _this.tableData[i].contactPhone[5] = "*";
- _this.tableData[i].contactPhone[6] = "*";
- let phone = "";
- for (let j = 0; j < _this.tableData[i].contactPhone.length; j++) {
- phone += _this.tableData[i].contactPhone[j];
- }
- _this.tableData[i].contactPhone = phone;
- }
- }
- this.loading = false;
- });
- },
- //获取字典
- getListwglb() {
- this.$http({
- url: "/market/cfgDataDict/queryList",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- dictCode: "wglb",
- },
- }).then((res) => {
- this.searchList[0].options = res.data;
- });
- },
- //获取字典
- getListsf() {
- this.$http({
- url: "/market/cfgDataDict/queryList",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- dictCode: "yys",
- },
- }).then((res) => {
- this.searchList[1].options = res.data;
- });
- },
- // 分页
- currchange(v) {
- this.pageSize = v;
- this.getList(this.params, this.pageSize);
- },
- // 分页
- currchange1(v) {
- this.pageSize1 = v;
- this.getSecondList(this.params, this.pageSize);
- },
- closeMessagedel(v) {
- let _this = this;
- this.centerDialogVisibledel = false;
- if (v === 1) {
- this.$http({
- url: "/market/swcompetitor/del",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- id: this.delid,
- },
- }).then((res) => {
- if (res.data.result === 1) {
- _this.$message({
- message: res.data.desc,
- type: "error",
- });
- } else {
- _this.$message({
- message: "删除成功",
- type: "success",
- });
- _this.getList(this.params, this.pageSize);
- }
- });
- }
- },
- //删除
- delLine(v) {
- this.delid = v.id;
- this.centerDialogVisibledel = true;
- this.messTit = "即将删除此条数据, 是否删除?";
- },
- //跳添加页
- addinfo() {
- this.$router.push("/addCompetitor");
- this.setabList("新增竞争对手信息", "/addCompetitor");
- },
- //跳添加页
- addinfo1() {
- this.$router.push("/addCompetitorNew");
- this.setabList("新增竞争对手信息", "/addCompetitorNew");
- },
- //详情页
- checkInfo(v) {
- this.$router.push({
- path: "/competitorInfo",
- query: {
- id: v,
- type: 1,
- },
- });
- this.setabList("竞争对手信息详情", "/competitorInfo?id=" + v + "&type=1");
- },
- //详情页
- checkInfo1(v) {
- this.$router.push({
- path: "/competitorInfoNew",
- query: {
- id: v,
- type: 1,
- },
- });
- this.setabList(
- "竞争对手信息详情",
- "/competitorInfoNew?id=" + v + "&type=1"
- );
- },
- changeInfo(v) {
- this.$router.push({
- path: "/changeCompet",
- query: {
- id: v.id,
- },
- });
- this.setabList("竞争对手信息修改", "/changeCompet?id=" + v.id);
- },
- changeInfo1(v) {
- this.$router.push({
- path: "/changeCompetNew",
- query: {
- id: v.id,
- },
- });
- this.setabList("竞争对手信息修改", "/changeCompetNew?id=" + v.id);
- },
- setabList(n, p) {
- let params = {
- children: "",
- name: n,
- rountPath: p,
- target: "_self",
- };
- for (let i = 0; i < this.$store.state.tabList.length; i++) {
- if (this.$store.state.tabList[i].name === params.name) {
- this.$store.state.tabList[i] = params;
- }
- }
- let set = new Set([...this.$store.state.tabList, params]);
- set.add(params);
- this.$store.commit("setDefaultActive", params.rountPath);
- this.$store.commit("setTabList", Array.from(set));
- },
- //功能栏
- iconCli(v) {
- if (v === 1) {
- this.getList(this.params, this.pageSize);
- }
- if (v === 2) {
- this.fullscreen = !this.fullscreen;
- }
- },
- //列表选择
- checkNum1(v) {
- this.totalcheck1 = v.length;
- this.outList1 = v;
- },
- //列表选择
- checkNum(v) {
- this.totalcheck = v.length;
- this.outList = v;
- },
- //导出
- outlineinfo(v) {
- if (v.row) {
- let data = {
- provinceName: v.row.provinceName,
- operatorName: v.row.operatorName,
- violationCateName: v.row.violationCateName,
- violationItemName: v.row.violationItemName,
- violationItem: v.row.violationItemName,
- monthFee: v.row.monthFee,
- tariffName: v.row.tariffName,
- taffiffContent: v.row.taffiffContent,
- remFee: v.row.remFee,
- preFee: v.row.preFee,
- saleScope: v.row.saleScope,
- saleChnl: v.row.saleChnl,
- monthSale: v.row.monthSale,
- violationContent: v.row.violationContent,
- recordRegionName: v.row.recordRegionName,
- };
- this.$http({
- url: "/market/cwcompetitor/writeImg",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- responseType: "blob",
- data: data,
- }).then((response) => {
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- let blob = new Blob([response.data], {
- type: "application/vnd.ms-excel",
- });
- window.navigator.msSaveOrOpenBlob(
- blob,
- new Date().getTime() + ".png"
- );
- } else {
- /* 火狐谷歌的文件下载方式 */
- var blob = new Blob([response.data]);
- var downloadElement = document.createElement("a");
- var href = window.URL.createObjectURL(blob);
- downloadElement.href = href;
- downloadElement.download = new Date().getTime() + ".png";
- document.body.appendChild(downloadElement);
- downloadElement.click();
- document.body.removeChild(downloadElement);
- window.URL.revokeObjectURL(href);
- }
- });
- } else {
- let data = {
- provinceName: v.provinceName,
- operatorName: v.operatorName,
- violationCateName: v.violationCateName,
- violationItemName: v.violationItemName,
- violationItem: v.violationItemName,
- monthFee: v.monthFee,
- tariffName: v.tariffName,
- taffiffContent: v.taffiffContent,
- remFee: v.remFee,
- preFee: v.preFee,
- saleScope: v.saleScope,
- saleChnl: v.saleChnl,
- monthSale: v.monthSale,
- violationContent: v.violationContent,
- recordRegionName: v.recordRegionName,
- id: v.id,
- };
- this.$http({
- url: "/market/cwcompetitor/write2Doc",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- responseType: "blob",
- data: data,
- }).then((response) => {
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- let blob = new Blob([response.data], {
- type: "application/vnd.ms-excel",
- });
- window.navigator.msSaveOrOpenBlob(
- blob,
- new Date().getTime() + ".docx"
- );
- } else {
- /* 火狐谷歌的文件下载方式 */
- var blob = new Blob([response.data]);
- var downloadElement = document.createElement("a");
- var href = window.URL.createObjectURL(blob);
- downloadElement.href = href;
- downloadElement.download = new Date().getTime() + ".docx";
- document.body.appendChild(downloadElement);
- downloadElement.click();
- document.body.removeChild(downloadElement);
- window.URL.revokeObjectURL(href);
- }
- });
- }
- },
- //导出
- outlineinfo1(v) {
- if (v.row) {
- let data = {
- provinceName: v.row.provinceName,
- operatorName: v.row.operatorName,
- violationCateName: v.row.violationCateName,
- violationItemName: v.row.violationItemName,
- violationItem: v.row.violationItemName,
- monthFee: v.row.monthFee,
- tariffName: v.row.tariffName,
- taffiffContent: v.row.taffiffContent,
- remFee: v.row.remFee,
- preFee: v.row.preFee,
- saleScope: v.row.saleScope,
- saleChnl: v.row.saleChnl,
- monthSale: v.row.monthSale,
- violationContent: v.row.violationContent,
- recordRegionName: v.row.recordRegionName,
- };
- this.$http({
- url: "/market/cwcompetitor/writeImg1",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- responseType: "blob",
- data: data,
- }).then((response) => {
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- let blob = new Blob([response.data], {
- type: "application/vnd.ms-excel",
- });
- window.navigator.msSaveOrOpenBlob(
- blob,
- new Date().getTime() + ".png"
- );
- } else {
- /* 火狐谷歌的文件下载方式 */
- var blob = new Blob([response.data]);
- var downloadElement = document.createElement("a");
- var href = window.URL.createObjectURL(blob);
- downloadElement.href = href;
- downloadElement.download = new Date().getTime() + ".png";
- document.body.appendChild(downloadElement);
- downloadElement.click();
- document.body.removeChild(downloadElement);
- window.URL.revokeObjectURL(href);
- }
- });
- } else {
- let data = {
- provinceName: v.provinceName,
- operatorName: v.operatorName,
- violationCateName: v.violationCateName,
- violationItemName: v.violationItemName,
- violationItem: v.violationItemName,
- monthFee: v.monthFee,
- tariffName: v.tariffName,
- taffiffContent: v.taffiffContent,
- remFee: v.remFee,
- preFee: v.preFee,
- saleScope: v.saleScope,
- saleChnl: v.saleChnl,
- monthSale: v.monthSale,
- violationContent: v.violationContent,
- recordRegionName: v.recordRegionName,
- id: v.id,
- };
- this.$http({
- url: "/market/cwcompetitor/write2Doc1",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- responseType: "blob",
- data: data,
- }).then((response) => {
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- let blob = new Blob([response.data], {
- type: "application/vnd.ms-excel",
- });
- window.navigator.msSaveOrOpenBlob(
- blob,
- new Date().getTime() + ".docx"
- );
- } else {
- /* 火狐谷歌的文件下载方式 */
- var blob = new Blob([response.data]);
- var downloadElement = document.createElement("a");
- var href = window.URL.createObjectURL(blob);
- downloadElement.href = href;
- downloadElement.download = new Date().getTime() + ".docx";
- document.body.appendChild(downloadElement);
- downloadElement.click();
- document.body.removeChild(downloadElement);
- window.URL.revokeObjectURL(href);
- }
- });
- }
- },
- //导出表格---------------------------------------------------------------------------------------------------
- closeMessage(v) {
- this.centerDialogVisible = false;
- if (v === 1) {
- this.export2Excel(v);
- }
- },
- outExe(val) {
- // 1违规 2正常
- if (val == 1) {
- if (this.outList.length > 0) {
- this.centerDialogVisible = true;
- this.messTit = "此操作将导出excel文件, 是否继续?";
- this.exportType = val;
- }
- } else {
- if (this.outList1.length > 0) {
- this.centerDialogVisible = true;
- this.messTit = "此操作将导出excel文件, 是否继续?";
- this.exportType = val;
- }
- }
- },
- export2Excel() {
- var that = this;
- console.log("=============================================");
- console.log("violationContent");
- if (this.exportType === 1) {
- require.ensure([], () => {
- const { export_json_to_excel } = require("../vendor/Export2Excel");
- console.log("violationContent");
- const tHeader = [
- "违规类别",
- "省份",
- "违规地市",
- "运营商",
- "违规项目",
- "违规内容",
- "资费名称",
- "资费内容",
- "月费",
- "预存款",
- "酬金",
- "渠道",
- "范围",
- "月销量",
- "上报时间",
- "上报人",
- "联系电话",
- "审核状态",
- "证据类型",
- "是否已解决",
- "是否反馈总部",
- "是否返回竞合",
- "是否反馈总局",
- ]; // 导出的表头名
- const filterVal = [
- "violationCateName",
- "provinceName",
- "recordRegionName",
- "operatorName",
- "violationItemName",
- "violationContent",
- "tariffName",
- "taffiffContent",
- "monthFee",
- "preFee",
- "remFee",
- "saleChnl",
- "saleScope",
- "monthSale",
- "opTime",
- "opName",
- "contactPhone",
- "stsDesc",
- "evidenceType",
- "fixFlagDesc",
- "groupFlagDesc",
- "wwFlagDesc",
- "admFlagDesc",
- ]; // 导出的表头字段名
- const list = that.outList;
- const data = that.formatJson(filterVal, list);
- export_json_to_excel(tHeader, data, `竞争对手excel`); // 导出的表格名称,根据需要自己命名
- });
- return;
- }
- if (this.exportType === 2) {
- require.ensure([], () => {
- const { export_json_to_excel } = require("../vendor/Export2Excel");
- const tHeader = [
- "类别",
- "省份",
- "地市",
- "套餐档位",
- "套餐名称",
- "运营商",
- "套餐内容",
- "月费(元)",
- "优惠价",
- "预存款(元)",
- "酬金",
- "渠道",
- "范围",
- "月销量",
- "是否包含宽带",
- "宽带具体内容",
- "上报时间",
- "上报人",
- "联系电话",
- "审核状态",
- "是否已解决",
- "是否反馈总部",
- "是否返回竞合",
- "是否反馈总局",
- ]; // 导出的表头名
- const filterVal = [
- "violationCateName",
- "provinceName",
- "recordRegionName",
- "packageGear",
- "tariffName",
- "operatorName",
- "taffiffContent",
- "monthFee",
- "concessionalRate",
- "preFee",
- "remFee",
- "saleChnl",
- "saleScope",
- "monthSale",
- "isDb",
- "dbContent",
- "opTime",
- "opName",
- "contactPhone",
- "stsDesc",
- "fixFlagDesc",
- "groupFlagDesc",
- "wwFlagDesc",
- "admFlagDesc",
- ]; // 导出的表头字段名
- const list = that.outList1;
- const data = that.formatJson(filterVal, list);
- export_json_to_excel(tHeader, data, `竞争对手excel`); // 导出的表格名称,根据需要自己命名
- });
- return;
- }
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map((v) => filterVal.map((j) => v[j]));
- },
- },
- mounted() {
- let type = this.$route.query.type;
- if (type == "1") {
- this.activeName = "second";
- this.getSecondList(this.params, this.pageSize);
- } else {
- this.getList(this.params, this.pageSize);
- }
- },
- created() {
- this.getListwglb();
- this.getListsf();
- },
- };
- </script>
- <style lang="css">
- .mc-style .el-tabs__content {
- display: block !important;
- }
- </style>
- <style scoped lang="scss">
- .el-dropdown-link {
- cursor: pointer;
- color: #409eff;
- }
- .el-icon-arrow-down {
- font-size: 12px;
- }
- .tabbox {
- /*float: left;*/
- /*max-width: 900px;*/
- .pass {
- color: #e4393c;
- }
- .nopass {
- color: #00b83f;
- }
- }
- .tab-long {
- height: 22px;
- float: left;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- /* 将对象作为弹性伸缩盒子模型显示 */
- -webkit-line-clamp: 1;
- /* 控制最多显示几行 */
- -webkit-box-orient: vertical;
- /* 设置或检索伸缩盒对象的子元素的排列方式 */
- }
- .checknum {
- font-size: 13px;
- margin-top: 10px;
- color: #b2b2b2;
- .c-188ACF {
- color: #188acf;
- }
- }
- .titbtn-box {
- text-align: right;
- }
- .com-table {
- margin-top: 16px;
- }
- .cell {
- i {
- padding: 0 5px;
- display: inline-block;
- cursor: pointer;
- }
- }
- .pageBox {
- text-align: right;
- margin-top: 10px;
- }
- </style>
|