| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584 |
- <template>
- <div class="app-container">
- <el-row>
- <el-col :span="24">
- <div class="cell">
- <div class="cell-title">
- <div class="title-left">
- <div class="title">周边管理</div>
- </div>
- </div>
- <div class="cell-body">
- <div class="controls">
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
- <el-form-item label="">
- <el-input v-model="formInline.name" style="width: 200px;" prefix-icon="el-icon-search" clearable
- placeholder="请输入关键字"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" class="btn-search" @click="btn_search">查询</el-button>
- </el-form-item>
- <el-form-item label="周边类型">
- <el-select v-model="formInline.type" clearable placeholder="全部">
- <el-option v-for="item in formInline.typeOptions" :key="item.type" :label="item.label" :value="item.type">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="所在乡镇">
- <el-select v-model="formInline.status" clearable placeholder="全部">
- <el-option v-for="item in formInline.statusOptions" :key="item.status" :label="item.label" :value="item.status">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div>
- <el-button class="export" size="small" @click="add_perimeter">
- <i class="el-icon el-icon-circle-plus-outline" style="font-size: 20px;"></i>
- <span style="font-size: 16px;">新增周边</span>
- </el-button>
- </div>
- </div>
- <el-table ref="multipleTable" :data="tableData" height="558" style="width: 100%" :cell-style="cell_style" v-loading="loading"
- :header-cell-style="header_cell_style" @selection-change="handleSelectionChange">
- <el-table-column label="序号" align="center" width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.xuhao }}</span>
- </template>
- </el-table-column>
- <el-table-column label="类型" align="center" width="88">
- <template slot-scope="scope">
- <span v-if="scope.row.type == 1">代金券</span>
- <span v-else-if="scope.row.type == 2">折扣券</span>
- </template>
- </el-table-column>
- <el-table-column label="所在乡镇" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.type == 1">{{ scope.row.deductionPrice }}</span>
- <span v-else-if="scope.row.type == 2">{{ scope.row.maxDeduction }}</span>
- </template>
- </el-table-column>
- <el-table-column label="名称" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.name }}</span>
- </template>
- </el-table-column>
- <el-table-column label="联系电话" align="center" width="90">
- <template slot-scope="scope">
- <span>{{ scope.row.grantNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column label="地址" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.grantNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column label="产品数量" align="center" width="90">
- <template slot-scope="scope">
- <span>{{ scope.row.remainderNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="180">
- <template slot-scope="scope">
- <el-button @click="handleModifyClick(scope.row)" type="text" size="small">编辑</el-button>
- <el-button @click="handleDelClick(scope.row)" type="text" size="small">删除</el-button>
- <el-button @click="handleDetailClick(scope.row)" type="text" size="small">查看详情</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="pagination-table">
- <el-pagination @current-change="currentPageChange" :current-page.sync="pagination.currentPage" :page-size="pagination.pageSize"
- layout="prev, pager, next, jumper" :total="pagination.total">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-col>
- </el-row>
- <!-- 新增周边 -->
- <el-dialog title="新增周边" custom-class="add-dlg-class" :visible.sync="dialogAddVisible" :close-on-click-modal="false" :close-on-press-escape="false"
- @close="dialogAddVisible = false">
- <el-form :model="formAddHostel" ref="addHostelForm" :rules="addHostelFormRules">
- <el-row>
- <el-col :span="12">
- <el-form-item label="周边类型" :label-width="formLabelWidth" :required="true" prop="jibieId">
- <el-select v-model="formAddHostel.jibieId" clearable placeholder="请选择类型" style="width: 100%;">
- <el-option v-for="item in formAddHostel.jibie" :key="item.id" :label="item.jibieName" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="名称" :label-width="formLabelWidth" :required="true" prop="adminName">
- <el-input v-model="formAddHostel.adminName" autocomplete="off" placeholder="请输入名称" maxlength="16">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="所在乡镇" :label-width="formLabelWidth" :required="true" prop="id">
- <el-select v-model="formAddHostel.hotelTownship" clearable placeholder="请选择乡镇" style="width: 100%;" @change="getHotelId($event)">
- <el-option v-for="item in formAddHostel.options" :key="item.id" :label="item.hotelTownship" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="联系电话" :label-width="formLabelWidth" :required="true" prop="linkproUrl">
- <el-input v-model="formAddHostel.linkproUrl" autocomplete="off" placeholder="请输入联系电话"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="24" style="margin-top: -20px;">
- <el-form-item label="详细地址" :required="true" :label-width="formLabelWidth" prop="addr">
- <el-input v-model="formAddHostel.name" placeholder="请输入地址"></el-input>
- </el-form-item>
- <el-form-item label="简介" :required="true" :label-width="formLabelWidth" prop="jianjie">
- <el-input type="textarea" v-model="formAddHostel.desc" rows="5" placeholder="请输入简介" maxlength="300" show-word-limit></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6" style="display: flex; justify-content: center;">
- <div style="display: flex; flex-direction: column; align-items: center;">
- <div style="font-size: 18px; margin-bottom: 10px;">封面图:</div>
- <div
- style="display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; border-radius: 5px;">
- <div
- style="position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; background: rgba(131, 131, 131, 1.0); border-radius: 50%; font-size: 22px; color: #e3e3e3; cursor: pointer; display: flex; justify-content: center; align-items: center;">
- ×</div>
- <viewer>
- <img src="https://via.placeholder.com/150x180" alt="" style="border-radius: 5px;">
- </viewer>
- <el-button
- style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
- size="small">上传图片</el-button>
- </div>
- </div>
- </el-col>
- <el-col :span="6" style="display: flex; justify-content: center;">
- <div style="display: flex; flex-direction: column; align-items: center;">
- <div style="font-size: 18px; margin-bottom: 10px;">介绍视频:</div>
- <div
- style="display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; border-radius: 5px;">
- <div
- style="position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; background: rgba(131, 131, 131, 1.0); border-radius: 50%; font-size: 22px; color: #e3e3e3; cursor: pointer; display: flex; justify-content: center; align-items: center;">
- ×</div>
- <img src="https://via.placeholder.com/150x180" alt="" style="border-radius: 5px;">
- <el-button
- style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
- size="small">上传视频</el-button>
- </div>
- </div>
- </el-col>
- <el-col :span="12" style="display: flex; justify-content: center;">
- <div style="display: flex; flex-direction: column; align-items: center;">
- <div style="font-size: 18px; margin-bottom: 10px;">详情图:</div>
- <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 5px;">
- <viewer :images="fileInfoListImages" style="width: 390px;">
- <el-carousel height="178px" width="100%" style="border-radius: 5px;">
- <el-carousel-item v-for="item in fileInfoList" :key="item.id">
- <!-- <img :src="item" style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;"> -->
- <img src="https://via.placeholder.com/150x180"
- style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;">
- </el-carousel-item>
- </el-carousel>
- </viewer>
- <el-button
- style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
- size="small">上传图片</el-button>
- </div>
- </div>
- </el-col>
- </el-row>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button class="add-info-cancel-btn" @click="dialogAddVisible = false">取 消</el-button>
- <el-button class="add-info-confirm-btn" @click="">确 认</el-button>
- </div>
- </el-dialog>
- <!-- 添加产品 -->
- <el-dialog title="添加产品" custom-class="add-product-class" :visible.sync="dialogAddProductVisible" :close-on-click-modal="false"
- :close-on-press-escape="false" @close="dialogAddProductVisible = false">
- <el-form :model="formAddHostel" ref="addHostelForm" :rules="addHostelFormRules">
- <el-row>
- <el-col :span="24">
- <el-form-item label="产品名称" :label-width="formLabelWidth" :required="true" prop="jibieId">
- <el-input v-model="formAddHostel.adminName" autocomplete="off" placeholder="请输入产品名称" maxlength="16">
- </el-input>
- </el-form-item>
- <el-form-item label="产品介绍" :label-width="formLabelWidth" :required="true" prop="adminName">
- <el-input type="textarea" v-model="formAddHostel.desc" rows="5" placeholder="请输入产品介绍" maxlength="300" show-word-limit></el-input>
- </el-form-item>
- <el-form-item label="产品价格" :label-width="formLabelWidth" :required="true" prop="id">
- <div style="display: flex; align-items: center;">
- <el-input v-model="formAddHostel.adminName" style="width: 180px; margin-right: 8px;" autocomplete="off" placeholder="请输入产品价格"
- maxlength="16">
- </el-input>
- <div>元</div>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button class="add-info-cancel-btn" @click="dialogAddProductVisible = false">取 消</el-button>
- <el-button class="add-info-confirm-btn" @click="">确 认</el-button>
- </div>
- </el-dialog>
- <!-- 编辑周边 -->
- <el-dialog title="编辑周边" custom-class="add-dlg-class" :visible.sync="dialogModifyVisible" :close-on-click-modal="false" :close-on-press-escape="false"
- @close="dialogModifyVisible = false">
- <el-form :model="formAddHostel" ref="addHostelForm" :rules="addHostelFormRules">
- <el-row>
- <el-col :span="12">
- <el-form-item label="周边类型" :label-width="formLabelWidth" :required="true" prop="jibieId">
- <el-select v-model="formAddHostel.jibieId" clearable placeholder="请选择类型" style="width: 100%;">
- <el-option v-for="item in formAddHostel.jibie" :key="item.id" :label="item.jibieName" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="名称" :label-width="formLabelWidth" :required="true" prop="adminName">
- <el-input v-model="formAddHostel.adminName" autocomplete="off" placeholder="请输入名称" maxlength="16">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="所在乡镇" :label-width="formLabelWidth" :required="true" prop="id">
- <el-select v-model="formAddHostel.hotelTownship" clearable placeholder="请选择乡镇" style="width: 100%;" @change="getHotelId($event)">
- <el-option v-for="item in formAddHostel.options" :key="item.id" :label="item.hotelTownship" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="联系电话" :label-width="formLabelWidth" :required="true" prop="linkproUrl">
- <el-input v-model="formAddHostel.linkproUrl" autocomplete="off" placeholder="请输入联系电话"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="24" style="margin-top: -20px;">
- <el-form-item label="详细地址" :required="true" :label-width="formLabelWidth" prop="addr">
- <el-input v-model="formAddHostel.name" placeholder="请输入地址"></el-input>
- </el-form-item>
- <el-form-item label="简介" :required="true" :label-width="formLabelWidth" prop="jianjie">
- <el-input type="textarea" v-model="formAddHostel.desc" rows="5" placeholder="请输入简介" maxlength="300" show-word-limit></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6" style="display: flex; justify-content: center;">
- <div style="display: flex; flex-direction: column; align-items: center;">
- <div style="font-size: 18px; margin-bottom: 10px;">封面图:</div>
- <div
- style="display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; border-radius: 5px;">
- <div
- style="position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; background: rgba(131, 131, 131, 1.0); border-radius: 50%; font-size: 22px; color: #e3e3e3; cursor: pointer; display: flex; justify-content: center; align-items: center;">
- ×</div>
- <viewer>
- <img src="https://via.placeholder.com/150x180" alt="" style="border-radius: 5px;">
- </viewer>
- <el-button
- style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
- size="small">上传图片</el-button>
- </div>
- </div>
- </el-col>
- <el-col :span="6" style="display: flex; justify-content: center;">
- <div style="display: flex; flex-direction: column; align-items: center;">
- <div style="font-size: 18px; margin-bottom: 10px;">介绍视频:</div>
- <div
- style="display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; border-radius: 5px;">
- <div
- style="position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; background: rgba(131, 131, 131, 1.0); border-radius: 50%; font-size: 22px; color: #e3e3e3; cursor: pointer; display: flex; justify-content: center; align-items: center;">
- ×</div>
- <img src="https://via.placeholder.com/150x180" alt="" style="border-radius: 5px;">
- <el-button
- style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
- size="small">上传视频</el-button>
- </div>
- </div>
- </el-col>
- <el-col :span="12" style="display: flex; justify-content: center;">
- <div style="display: flex; flex-direction: column; align-items: center;">
- <div style="font-size: 18px; margin-bottom: 10px;">详情图:</div>
- <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 5px;">
- <viewer :images="fileInfoListImages" style="width: 390px;">
- <el-carousel height="178px" width="100%" style="border-radius: 5px;">
- <el-carousel-item v-for="item in fileInfoList" :key="item.id">
- <!-- <img :src="item" style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;"> -->
- <img src="https://via.placeholder.com/150x180"
- style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;">
- </el-carousel-item>
- </el-carousel>
- </viewer>
- <el-button
- style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
- size="small">上传图片</el-button>
- </div>
- </div>
- </el-col>
- </el-row>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button class="add-info-cancel-btn" @click="dialogModifyVisible = false">取 消</el-button>
- <el-button class="add-info-confirm-btn" @click="">确 认</el-button>
- </div>
- </el-dialog>
- <!-- 删除确认对话框 -->
- <el-dialog custom-class="el-dialog-delete-account" :visible.sync="dialogDeleteVisible" :close-on-click-modal="false" :close-on-press-escape="false"
- :show-close="false">
- <div slot="" class="del-account-body">
- <img src="../../icons/serveAC/del_warning.png" alt="">
- <div class="del-account-body-txt">是否确定将该【】从列表中移除?</div>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button class="add-user-cancel-btn" @click="dialogDeleteVisible = false"> 否 </el-button>
- <el-button class="add-user-confirm-btn" @click=""> 是 </el-button>
- </div>
- </el-dialog>
- <!-- 周边详情 -->
- <el-dialog title="周边详情" custom-class="add-voucher-class" :visible.sync="dialogInfoVisible" :close-on-click-modal="false" :close-on-press-escape="false"
- @close="dialogInfoVisible = false">
- <div style="padding: 0; margin: 0; overflow:auto;">
- <el-row>
- <el-col :span="14">
- <div style="display: flex; align-items: center; margin-bottom: 20px; ">
- <div
- style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
- 周边类型</div>
- <div style="font-size: 16px; font-weight: 700; color: #333;">景点</div>
- </div>
- <div style="display: flex; align-items: center; margin-bottom: 20px; ">
- <div
- style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
- 名称</div>
- <div style="font-size: 16px; font-weight: 700; color: #333;">山爪仑漂流</div>
- </div>
- <div style="display: flex; align-items: center; margin-bottom: 20px; ">
- <div
- style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
- 所属乡镇</div>
- <div style="font-size: 16px; font-weight: 700; color: #333;">山爪仑</div>
- </div>
- <div style="display: flex; align-items: center; margin-bottom: 20px; ">
- <div
- style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
- 详细地址</div>
- <div style="font-size: 16px; font-weight: 700; color: #333;">详细地址详细地址详细地址详细地址详细地址详细地址</div>
- </div>
- <div style="display: flex; align-items: center; ">
- <div
- style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
- 联系电话</div>
- <div style="font-size: 16px; font-weight: 700; color: #333;">18988898898</div>
- </div>
- </el-col>
- <el-col :span="10">
- <div style="display: flex;">
- <div
- style="font-size: 16px; font-weight: 700; min-width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
- 封面图</div>
- <viewer>
- <img src="https://via.placeholder.com/160x200" alt="" srcset="" style="border-radius: 5px;" />
- </viewer>
- </div>
- </el-col>
- </el-row>
- <el-divider></el-divider>
- <el-row>
- <el-col :span="24">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="产品" name="first">
- <el-button class="export" style="margin-bottom: 10px !important;" size="small" @click="handleAddProduct">
- <i class="el-icon el-icon-circle-plus-outline" style="font-size: 16px;"></i>
- <span style="font-size: 14px;">添加产品</span>
- </el-button>
- <el-table ref="multipleTable" :data="tableData" height="220" style="width: 100%" :cell-style="cell_style" v-loading="loading"
- :header-cell-style="header_cell_style" @selection-change="handleSelectionChange">
- <el-table-column label="序号" align="center" width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.xuhao }}</span>
- </template>
- </el-table-column>
- <el-table-column label="类型" align="center" width="88">
- <template slot-scope="scope">
- <span v-if="scope.row.type == 1">代金券</span>
- <span v-else-if="scope.row.type == 2">折扣券</span>
- </template>
- </el-table-column>
- <el-table-column label="所在乡镇" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.type == 1">{{ scope.row.deductionPrice }}</span>
- <span v-else-if="scope.row.type == 2">{{ scope.row.maxDeduction }}</span>
- </template>
- </el-table-column>
- <el-table-column label="名称" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.name }}</span>
- </template>
- </el-table-column>
- <el-table-column label="联系电话" align="center" width="90">
- <template slot-scope="scope">
- <span>{{ scope.row.grantNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column label="地址" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.grantNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column label="产品数量" align="center" width="90">
- <template slot-scope="scope">
- <span>{{ scope.row.remainderNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="180">
- <template slot-scope="scope">
- <el-button @click="handleModifyClick(scope.row)" type="text" size="small">编辑</el-button>
- <el-button @click="handleDelClick(scope.row)" type="text" size="small">删除</el-button>
- <el-button @click="handleDetailClick(scope.row)" type="text" size="small">查看详情</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="简介" name="second">
- <div style="height: 264px; overflow-y: auto;">
- <div style="font-size: 16px; font-weight: bold; margin: 10px 0;">开放时间</div>
- <div style="font-size: 14px; margin: 10px 0 20px; line-height: 22px;">1月1日-12月31日 周一至周日 全天: 08:00-17:00
- 最晚入园:15:00<br>以上信息仅供参考,具体以景区当日实际公示信息为准</div>
- <div style="font-size: 16px; font-weight: bold; margin: 10px 0;">预订提示</div>
- <div style="font-size: 14px; margin: 10px 0 20px; line-height: 22px;">
- 为了保护好您的健康与安全,请您一定要做好自我防护,建议减少外出,避免去人群密集的公共场所,进入景区佩戴口罩。同时,请您配合景区做好入园体温检测以及信息登记工作。由此给您带来不便敬请谅解景区介绍:既有森林公园的野趣,又有江南园林的韵致
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane label="介绍视频" name="third">
- <div style="height: 264px; overflow-y: auto;">
- <div style="display: flex; justify-content: center; align-items: center;">
- <div v-for="(video, index) in videoList" :key="index" style="width: 464px; height: 262px;">
- <video-player class="video-player vjs-custom-skin" :ref="'videoPlayer' + index" @play="onPlayerPlay($event)"
- :playsinline="true" :options="video.playerOptions"></video-player>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane label="详情图" name="fourth">
- <div style="height: 264px; overflow-y: auto;">
- <div style="display: flex; justify-content: center; align-items: center; border-radius: 5px;">
- <viewer :images="fileInfoListImages" style="width: 600px;">
- <el-carousel height="260px" width="100%" style="border-radius: 5px;">
- <el-carousel-item v-for="item in fileInfoList" :key="item.id">
- <!-- <img :src="item" style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;"> -->
- <img src="https://via.placeholder.com/600x260"
- style="border-radius: 5px; cursor: pointer; width: 100%; height: 260px;">
- </el-carousel-item>
- </el-carousel>
- </viewer>
- </div>
- </div>
- </el-tab-pane>
- </el-tabs>
- </el-col>
- </el-row>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- getTableData,
- coupomsaveBatchLapse,
- coupominsterVoucher,
- coupominsterCoupon,
- hotelqueryAllHotel
- } from '@/api/discountCouponMgr'
- import {
- isEmpty
- } from '@/js/common'
- var townOptions = [] // 民宿列表
- var townOptions_obj = [] // 民宿列表
- export default {
- data() {
- return {
- videoList: [],
- activeName: 'second',
- fileInfoListImages: [],
- fileInfoList: [1, 2, 4],
- currentUserLevel: this.$store.state.user.level, // 当前用户的权限
- currentUserId: this.$store.state.user.user_id, // 当前用户的权限
- formLabelWidth: '100px',
- // 表格单元格样式
- cell_style: {
- color: '#1A202B',
- 'font-size': '14px',
- 'font-family': 'Microsoft YaHei-3970(82674968)'
- },
- // 表格头部样式
- header_cell_style: {
- background: '#E6ECFE',
- color: '#1A202B',
- 'font-size': '16px',
- 'font-family': 'Microsoft YaHei-3970(82674968)'
- },
- addHostelFormRules: {},
- // 查询数据
- formInline: {
- typeOptions: [{
- type: 1,
- label: '代金券'
- }, {
- type: 2,
- label: '折扣券'
- }],
- type: '',
- statusOptions: [{ // 1正常 2失效 3过期
- status: 1,
- label: '正常'
- }, {
- status: 2,
- label: '失效'
- }, {
- status: 3,
- label: '过期'
- }],
- status: '',
- search_datatime: '',
- name: ''
- },
- tableData: [],
- cond_data: {},
- // 分页参数
- pagination: {
- currentPage: 1,
- pageSize: 9,
- total: 0
- },
- loading: true,
- coupon: {},
- formAddHostel: {},
- dialogAddVisible: false, // 新增周边
- dialogInfoVisible: false, // 周边详情
- dialogModifyVisible: false, // 修改周边
- dialogDeleteVisible: false, // 删除确认对话框
- dialogAddProductVisible: false, // 添加产品对话框
- formAddVoucher: {}, // 增加代金券数据模型
- formModifyVoucher: {}, // 修改代金券数据模型
- addVoucherFormRules: {
- },
- formAddCoupon: {}, // 增加折扣券数据模型
- formModifyCoupon: {}, // 修改折扣券数据模型
- addCouponFormRules: {
- },
- voucherCheckAll: false,
- couponCheckAll: false,
- voucherModifyCheckAll: false,
- couponModifyCheckAll: false,
- towns: townOptions,
- isAddCouponIndeterminate: true,
- isAddVoucherIndeterminate: true,
- isModifyVoucherIndeterminate: true,
- isModifyCouponIndeterminate: true,
- multipleSelection: [], // 数据表的多选
- couponCheckedTowns: [], // 折扣券适用民宿
- voucherCheckedTowns: [], // 代金券适用民宿
- voucherModifyCheckedTowns: [], // 修改代金券适用民宿
- couponModifyCheckedTowns: [], // 修改折扣券适用民宿
- voucherMinSuIds: [], // 增加代金券适用民宿的ids
- couponMinSuIds: [], // 增加折扣券适用民宿的ids
- voucherModifyMinSuIds: [], // 修改代金券适用民宿的ids
- couponModifyMinSuIds: [], // 修改折扣券适用民宿的ids
- voucherMinSuIds_bool: false, // 增加代金券适用民宿:全选则为true,否则false
- couponMinSuIds_bool: false // 增加折扣券适用民宿:全选则为true,否则false
- }
- },
- created() {
- // 检测权限
- if (this.currentUserLevel !== 2) {
- this.$router.replace({
- path: '/data'
- })
- return
- }
- // 获取消费记录,表格数据
- this.get_table_data('list')
- this.videoList.push({
- playerOptions: {
- playbackRates: [0.5, 0.8, 1.0, 1.25, 1.5, 1.75, 2.0], //播放速度
- autoplay: false, // 如果true,浏览器准备好时开始回放。
- muted: false, // 默认情况下将会消除任何音频。
- loop: false, // 导致视频一结束就重新开始。
- preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
- language: "zh-CN",
- aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
- fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
- sources: [{
- withCredentials: false,
- type: "video/mp4", // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
- src: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4',
- }],
- controls: true,
- hls: true,
- poster: "", // 你的封面地址
- notSupportedMessage: "此视频暂无法播放,请稍后再试", // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
- controlBar: {
- progressControl: true,
- currentTimeDisplay: true,
- timeDivider: true,
- durationDisplay: true,
- remainingTimeDisplay: false,
- fullscreenToggle: true, // 全屏按钮
- },
- flash: {
- hls: {
- withCredentials: false
- }
- },
- html5: {
- hls: {
- withCredentials: false
- }
- }
- }
- })
- },
- mounted() {
- document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
- document.addEventListener('fullscreenchange', this.handleFullScreenChange);
- },
- beforeDestroy() {
- document.removeEventListener('fullscreenchange', this.handleFullScreenChange);
- },
- methods: {
- handleFullScreenChange() {
- if (!document.fullscreenElement) {
- // 退出全屏逻辑
- this.playering.pause()
- }
- },
- // 定义点击播放按钮,自动全屏化的方法
- full(e) {
- // 做兼容处理
- if (e.requestFullscreen) {
- e.requestFullscreen()
- } else if (e.mozRequestFullScreen) {
- e.mozRequestFullScreen()
- } else if (e.msRequestFullscreen) {
- e.msRequestFullscreen()
- } else if (e.oRequestFullscreen) {
- e.oRequestFullscreen()
- } else if (e.webkitRequestFullscreen) {
- e.webkitRequestFullScreen()
- } else {
- // var docHtml = document.documentElement;
- // var docBody = document.body;
- var videobox = document.getElementsByClassName('video-player')
- var cssText = 'width:100%;height:100%;overflow:hidden;'
- // docHtml.style.cssText = cssText;
- // docBody.style.cssText = cssText;
- videobox.style.cssText = cssText + ';' + 'margin:0px;padding:0px;'
- document.IsFullScreen = true
- }
- },
- // 定义点击播放按钮,调用全屏化的方法
- onPlayerPlay(player) {
- // console.log('player play===>>>', player)
- this.playering = player
- this.full(player)
- },
- handleClick(tab, event) {
- console.log(tab, event);
- },
- /**
- * 添加产品
- */
- handleAddProduct() {
- this.dialogAddProductVisible = true
- },
- /**
- * 分页表格勾选
- * @param {Object} val
- */
- handleSelectionChange(val) {
- var that = this
- this.multipleSelection = []
- val.forEach((e) => {
- that.multipleSelection.push(e.id)
- });
- },
- /**
- * 代金券适用民宿全选
- * @param {Object} val
- */
- handleVoucherCheckAllChange(val) {
- this.voucherCheckedTowns = val ? townOptions : [];
- this.isAddVoucherIndeterminate = false;
- // 获取代金券ids
- this.get_daijinquan_ids()
- },
- /**
- * 修改代金券适用民宿全选
- * @param {Object} val
- */
- handleModifyVoucherCheckAllChange(val) {
- this.voucherModifyCheckedTowns = val ? townOptions : [];
- this.isModifyVoucherIndeterminate = false;
- // 获取代金券ids
- this.get_modify_daijinquan_ids()
- },
- /**
- * 修改折扣券适用民宿全选
- * @param {Object} val
- */
- handleModifyCouponCheckAllChange(val) {
- this.couponModifyCheckedTowns = val ? townOptions : [];
- this.isModifyCouponIndeterminate = false;
- // 获取代金券ids
- this.get_modify_zhekouquan_ids()
- },
- /**
- * 获取增加代金券,适用民宿ids
- */
- get_daijinquan_ids() {
- if (this.voucherCheckedTowns.length == townOptions_obj.length) {
- this.voucherMinSuIds_bool = true
- } else {
- var that = this;
- this.voucherMinSuIds.length = 0;
- this.voucherCheckedTowns.forEach((item) => {
- townOptions_obj.forEach((obj) => {
- if (obj.hname === item) {
- that.voucherMinSuIds.push(obj.hid);
- }
- });
- });
- // console.log(this.voucherMinSuIds);
- this.voucherMinSuIds_bool = false
- }
- },
- /**
- * 折扣券适用民宿全选
- * @param {Object} val
- */
- handleCouponCheckAllChange(val) {
- this.couponCheckedTowns = val ? townOptions : [];
- this.isAddCouponIndeterminate = false;
- // 获取折扣券ids
- this.get_zhekouquan_ids()
- },
- /**
- * 获取折扣券ids
- */
- get_zhekouquan_ids() {
- if (this.couponCheckedTowns.length == townOptions_obj.length) {
- this.couponMinSuIds_bool = true;
- } else {
- var that = this;
- this.couponMinSuIds.length = 0;
- this.couponCheckedTowns.forEach((item) => {
- townOptions_obj.forEach((obj) => {
- if (obj.hname === item) {
- that.couponMinSuIds.push(obj.hid);
- }
- });
- });
- // console.log(this.couponMinSuIds);
- this.couponMinSuIds_bool = false;
- }
- },
- /**
- * 代金券适用民宿,勾选某一项
- * @param {Object} value
- */
- handleVoucherCheckedTownsChange(value) {
- var that = this;
- let checkedCount = value.length;
- this.voucherCheckAll = checkedCount === this.towns.length;
- this.isAddVoucherIndeterminate = checkedCount > 0 && checkedCount < this.towns.length;
- // 获取代金券ids
- this.get_daijinquan_ids()
- },
- /**
- * 修改代金券适用民宿,勾选某一项
- * @param {Object} value
- */
- handleModifyVoucherCheckedTownsChange(value) {
- var that = this;
- let checkedCount = value.length;
- this.voucherModifyCheckAll = checkedCount === this.towns.length;
- this.isModifyVoucherIndeterminate = checkedCount > 0 && checkedCount < this.towns.length;
- // 获取代金券ids
- this.get_modify_daijinquan_ids()
- },
- /**
- * 修改折扣券适用民宿,勾选某一项
- * @param {Object} value
- */
- handleModifyCouponCheckedTownsChange(value) {
- var that = this;
- let checkedCount = value.length;
- this.couponModifyCheckAll = checkedCount === this.towns.length;
- this.isModifyCouponIndeterminate = checkedCount > 0 && checkedCount < this.towns.length;
- // 获取代金券ids
- this.get_modify_zhekouquan_ids()
- },
- /**
- * 折扣券适用民宿,勾选某一项
- * @param {Object} value
- */
- handleCouponCheckedTownsChange(value) {
- let checkedCount = value.length;
- this.couponCheckAll = checkedCount === this.towns.length;
- this.isAddCouponIndeterminate = checkedCount > 0 && checkedCount < this.towns.length;
- // 获取折扣券ids
- this.get_zhekouquan_ids()
- },
- /**
- * 获取适用民宿列表
- */
- getMinSuList() {
- var that = this;
- townOptions.length = 0;
- townOptions_obj.length = 0;
- // townOptions.splice(0, townOptions.length);
- // 获取民宿列表
- hotelqueryAllHotel().then((res) => {
- // console.log(res);
- if (res.code === 200) {
- // console.log(res.data);
- if (typeof res.data === 'undefined') {
- that.$message.warning('获取适用民宿列表异常!')
- } else {
- res.data.forEach((item) => {
- townOptions.push(item.hname);
- townOptions_obj.push({
- hname: item.hname,
- hid: item.id
- });
- })
- }
- } else {
- if (typeof res.message === 'undefined') {
- that.$message.warning('获取适用民宿列表异常!')
- } else {
- that.$message.warning(res.message)
- }
- }
- }).catch((err) => {
- // console.log(err);
- that.$message.error(err.message)
- });
- },
- /**
- * 添加代金券
- */
- add_voucher_dialog_handler() {
- var that = this;
- var d = this.formAddVoucher;
- if (isEmpty(d.name)) {
- this.$message.error('请输入【优惠券名称】')
- return
- }
- if (isEmpty(d.deductionPrice)) {
- this.$message.error('请输入【减免金额】')
- return
- }
- if (isEmpty(d.grantNumber)) {
- this.$message.error('请输入【发放数量】')
- return
- }
- if (isEmpty(d.limitNumber)) {
- this.$message.error('请输入【每人限领】')
- return
- }
- if (isEmpty(d.grantTimes)) {
- this.$message.error('请选择【发放时间】')
- return
- }
- if (isEmpty(d.meetPrice)) {
- this.$message.error('请输入【订单满多少可使用】')
- return
- }
- if (d.radio == 1) {
- if (isEmpty(d.effectiveDateTime)) {
- this.$message.error('请选择【有效期时间段】')
- return
- }
- } else if (d.radio == 2) {
- if (isEmpty(d.effectiveDay)) {
- this.$message.error('请选择【多少天开始】')
- return
- }
- if (isEmpty(d.effectiveLoseDay)) {
- this.$message.error('请输入【多少天有效】')
- return
- }
- }
- if (this.voucherMinSuIds_bool) {
- this.formAddVoucher.hotelIds = -1 // 适用民宿ids
- } else {
- if (isEmpty(this.voucherMinSuIds)) {
- this.$message.error('请选择【适用民宿】')
- return
- }
- this.formAddVoucher.hotelIds = this.voucherMinSuIds // 适用民宿ids
- }
- this.formAddVoucher.createId = this.currentUserId // 创建人
- this.formAddVoucher.effectiveType = d.radio // 有效期类型(1.时间段 2.生效失效天数)
- this.formAddVoucher.type = 1 // 类型(1.代金券 2.折扣券)
- this.formAddVoucher.status = 1 // 状态(0删除 1正常)
- coupominsterVoucher(this.formAddVoucher).then((res) => {
- // console.log(res);
- if (res.code === 200) {
- that.$message.success(res.message)
- this.get_table_data('list')
- that.dialogInfoVisible = false
- that.formAddVoucher = {}
- that.voucherMinSuIds = []
- that.voucherCheckedTowns = []
- } else {
- that.$message.warning(res.message)
- }
- }).catch((err) => {
- // console.log(err);
- that.$message.error(err.message)
- });
- },
- /**
- * 添加折扣券
- */
- add_coupon_dialog_handler() {
- var that = this;
- var d = this.formAddCoupon;
- if (isEmpty(d.name)) {
- this.$message.error('请输入【优惠券名称】')
- return
- }
- if (isEmpty(d.rebatePrice)) {
- this.$message.error('请输入【折扣】')
- return
- } else {
- const regex = /^(?:[1-9](?:\.[0-9])?|9(?:\.[0-9])?)$/;
- const msg = '【折扣】只能输入1.0-9.9,仅可带有一位小数。';
- if (!regex.test(d.rebatePrice)) {
- this.$message.error(msg);
- const h = this.$createElement;
- this.$notify({
- title: '提示信息',
- message: h('i', {
- style: 'color: red'
- }, msg)
- });
- return
- }
- }
- if (isEmpty(d.maxDeduction)) {
- this.$message.error('请输入【最大抵扣金额】')
- return
- }
- if (isEmpty(d.grantNumber)) {
- this.$message.error('请输入【发放数量】')
- return
- }
- if (isEmpty(d.limitNumber)) {
- this.$message.error('请输入【每人限领】')
- return
- }
- if (isEmpty(d.grantTimes)) {
- this.$message.error('请选择【发放时间】')
- return
- }
- if (isEmpty(d.meetPrice)) {
- this.$message.error('请输入【订单满多少可使用】')
- return
- }
- if (d.radio == 1) {
- if (isEmpty(d.effectiveDateTime)) {
- this.$message.error('请选择【有效期时间段】')
- return
- }
- } else if (d.radio == 2) {
- if (isEmpty(d.effectiveDay)) {
- this.$message.error('请选择【多少天开始】')
- return
- }
- if (isEmpty(d.effectiveLoseDay)) {
- this.$message.error('请输入【多少天有效】')
- return
- }
- }
- if (this.couponMinSuIds_bool) {
- this.formAddCoupon.hotelIds = -1 // 适用民宿ids
- } else {
- if (isEmpty(this.couponMinSuIds)) {
- this.$message.error('请选择【适用民宿】')
- return
- }
- this.formAddCoupon.hotelIds = this.couponMinSuIds // 适用民宿ids
- }
- this.formAddCoupon.createId = this.currentUserId // 创建人
- this.formAddCoupon.effectiveType = d.radio // 有效期类型(1.时间段 2.生效失效天数)
- this.formAddCoupon.type = 2 // // 类型(1.代金券 2.折扣券)
- this.formAddCoupon.status = 1 // 状态(0删除 1正常)
- coupominsterCoupon(this.formAddCoupon).then((res) => {
- // console.log(res);
- if (res.code === 200) {
- that.$message.success(res.message)
- this.get_table_data('list')
- that.formAddCoupon = {}
- that.couponMinSuIds = []
- that.couponCheckedTowns = []
- } else {
- that.$message.warning(res.message)
- }
- }).catch((err) => {
- // console.log(err);
- that.$message.error(err.message)
- });
- },
- /**
- * 新增周边
- */
- add_perimeter() {
- this.dialogAddVisible = true
- },
- /**
- * 打开编辑周边
- * @param {Object} row
- */
- handleModifyClick(row) {
- this.dialogModifyVisible = true
- },
- /**
- * 删除周边
- */
- handleDelClick() {
- this.dialogDeleteVisible = true
- },
- /**
- * 点击查看优惠券详情,弹出优惠券详情对话框
- * @param {Object} row
- */
- handleDetailClick(row) {
- // console.log(row);
- this.dialogInfoVisible = true
- if (row.type == 1) { // 代金券
- this.coupon.name = row.name
- this.coupon.deductionPrice = row.deductionPrice
- this.coupon.grantNumber = row.grantNumber
- this.coupon.limitNumber = row.limitNumber
- this.coupon.grantStartDate = row.grantStartDate
- this.coupon.grantEndDate = row.grantEndDate
- this.coupon.meetPrice = row.meetPrice
- this.coupon.effectiveType = row.effectiveType
- this.coupon.effectiveStartDate = row.effectiveStartDate
- this.coupon.effectiveEndDate = row.effectiveEndDate
- this.coupon.effectiveDay = row.effectiveDay
- this.coupon.effectiveLoseDay = row.effectiveLoseDay
- this.coupon.hotelNames = row.hotelNames.split(',')
- this.coupon.hotelIds = row.hotelIds
- } else { // 折扣券
- this.coupon.name = row.name
- this.coupon.rebatePrice = row.rebatePrice
- this.coupon.maxDeduction = row.maxDeduction
- this.coupon.grantNumber = row.grantNumber
- this.coupon.limitNumber = row.limitNumber
- this.coupon.grantStartDate = row.grantStartDate
- this.coupon.grantEndDate = row.grantEndDate
- this.coupon.meetPrice = row.meetPrice
- this.coupon.effectiveType = row.effectiveType
- this.coupon.effectiveStartDate = row.effectiveStartDate
- this.coupon.effectiveEndDate = row.effectiveEndDate
- this.coupon.effectiveDay = row.effectiveDay
- this.coupon.effectiveLoseDay = row.effectiveLoseDay
- this.coupon.hotelNames = row.hotelNames.split(',')
- this.coupon.hotelIds = row.hotelIds
- }
- },
- /**
- * 获取消费记录,表格数据
- */
- get_table_data(param) {
- this.loading = true
- this.get_condtion();
- let data = this.cond_data;
- if (param == 'search') {
- data.page = 1
- this.pagination.currentPage = 1
- }
- var that = this
- // console.log(data);
- getTableData(data).then((res) => {
- // console.log(res.data);
- if (res.code === 200) {
- let tempData = res.data.pageList;
- if (typeof tempData !== 'undefined' && tempData !== '') {
- this.pagination.total = res.data.total
- this.tableData = []
- for (var i = 0; i < tempData.length; i++) {
- tempData[i].xuhao = (this.pagination.currentPage - 1) * this.pagination.pageSize + i + 1
- this.tableData.push(tempData[i])
- }
- } else {
- this.tableData = []
- this.$message.warning('没有符合条件的数据!')
- }
- // that.tableData.sort((a,b) => b.createDate.localeCompare(a.createDate))
- } else {
- that.tableData = []
- that.$message.warning('没有符合条件的数据!')
- }
- }).catch((err) => {
- // console.log(err);
- that.$message.error(err.message)
- });
- that.loading = false;
- },
- /**
- * 查询条件
- */
- get_condtion() {
- let data = {
- page: this.pagination.currentPage,
- rows: this.pagination.pageSize
- }
- if (this.formInline.type !== '') {
- data.type = this.formInline.type
- }
- if (this.formInline.status !== '') {
- data.status = this.formInline.status
- }
- if (this.formInline.search_datatime !== '') {
- data.search_datatime = this.formInline.search_datatime
- }
- if (this.formInline.name !== '') {
- data.name = this.formInline.name
- }
- this.cond_data = data;
- },
- /**
- * 搜索
- */
- btn_search() {
- this.get_table_data('search')
- },
- /**
- * currentPage 改变时会触发
- * @param {Object} val
- */
- currentPageChange(val) {
- this.pagination.currentPage = val
- this.get_table_data('pages')
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .app-container {
- background-color: #EFF2F7;
- padding: 10px;
- .el-row {
- .el-col {
- padding: 10px;
- .cell {
- padding: 30px;
- border-radius: 10px;
- background-color: #FFFFFF;
- box-shadow: 0px 3px 21px 0px rgba(60, 108, 254, 0.16);
- .cell-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 30px;
- padding-bottom: 30px;
- border-bottom: 1px solid #CCCCCC;
- .title-left {
- display: flex;
- align-items: center;
- .title {
- font-size: 22px;
- font-family: Microsoft YaHei-3970(82674968);
- font-weight: bold;
- color: #1A202B;
- }
- .title-detail {
- margin-left: 50px;
- font-size: 18px;
- font-family: Microsoft YaHei-3970(82674968);
- color: #1A202B;
- }
- }
- .title-right {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .el-button {
- width: 110px;
- height: 46px;
- background: #2B4CFE;
- font-size: 18px;
- color: #FFFFFF;
- font-family: Microsoft YaHei-3970(82674968);
- border-radius: 5px;
- }
- .el-button--warning {
- background: #F88A64;
- }
- }
- }
- .cell-body {
- .controls {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .demo-form-inline {
- display: inline-flex;
- flex-wrap: wrap;
- align-items: center;
- justify-content: flex-start;
- .btn-search {
- background: rgba(9, 101, 98, 1);
- font-size: 14px;
- color: #FFFFFF;
- font-family: Microsoft YaHei-3970(82674968);
- border-radius: 5px;
- border: none;
- }
- }
- .export {
- background: rgba(9, 101, 98, 1);
- font-size: 14px;
- color: #FFFFFF;
- font-family: Microsoft YaHei-3970(82674968);
- border-radius: 5px;
- margin-bottom: 22px;
- border: none;
- }
- }
- .pagination-table {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- height: 30px;
- margin-top: 20px;
- padding-right: 100px;
- .txt-notice {
- span {
- font-size: 28px;
- font-weight: 500;
- font-family: '微软雅黑';
- }
- }
- ::v-deep .el-pagination {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- }
- ::v-deep .el-pagination ul {
- display: flex;
- }
- ::v-deep .el-pagination button,
- ::v-deep .el-pagination li {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 50px;
- height: 36px;
- border: 1px solid #626262;
- border-radius: 3px;
- font-size: 14px;
- margin: 0 5px;
- }
- ::v-deep .el-pagination span {
- margin-left: 10px;
- }
- ::v-deep .el-pagination .el-pagination__jump {
- font-size: 16px;
- }
- ::v-deep .el-pagination .el-pagination__editor {
- width: 50px;
- height: 36px;
- margin: 0 5px;
- }
- ::v-deep .el-pagination .el-input__inner {
- width: 50px;
- height: 36px;
- border: 1px solid #626262;
- margin: -4px 0 0 0;
- }
- }
- }
- }
- }
- }
- ::v-deep .el-dialog {
- margin: 0 !important;
- width: 600px;
- height: 560px;
- background: #FFFFFF;
- box-shadow: 0px 0px 13px 0px rgba(0, 0, 0, 0.29);
- border-radius: 6px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- .el-dialog__header {
- display: flex;
- align-items: center;
- width: 100%;
- height: 58px;
- padding: 30px;
- border-radius: 6px 6px 0px 0px;
- font-weight: bold;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- }
- .el-dialog__body {
- padding-bottom: 0;
- .el-form-item__label,
- .el-form-item__content {
- font-size: 16px;
- font-family: Microsoft YaHei-3970(82674968);
- color: #53575A;
- }
- }
- // 删除对话框的样式
- .del-account-body {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- height: 180px;
- img {
- width: 72px;
- }
- .del-account-body-txt {
- height: 58px;
- line-height: 58px;
- font-size: 18px;
- font-family: Microsoft YaHei-3970(82674968);
- color: #333333;
- }
- }
- .el-dialog__footer {
- padding-bottom: 0 !important;
- text-align: center;
- .el-button.el-button--default {
- width: 75px;
- height: 40px;
- border: 1px solid #2B4CFE;
- border-radius: 6px;
- font-size: 16px;
- font-family: Microsoft YaHei-3970(82674968);
- color: #2B4CFE;
- }
- .el-button.el-button--primary {
- width: 75px;
- height: 40px;
- background: #2B4CFE;
- border-radius: 6px;
- font-size: 16px;
- font-family: Microsoft YaHei-3970(82674968);
- color: #FFFFFF;
- margin-left: 60px;
- }
- }
- }
- }
- </style>
- <style>
- .add-voucher-class {
- width: 900px !important;
- height: 760px !important;
- }
- .el-date-editor--daterange.el-input__inner {
- width: 280px !important;
- }
- .demo-table-expand {
- font-size: 0;
- }
- .demo-table-expand label {
- width: 180px;
- color: #99a9bf;
- }
- .demo-table-expand .el-form-item {
- margin-right: 0;
- margin-bottom: 0;
- width: 33%;
- }
- .show-imgs {
- display: flex;
- }
- .imgs {
- display: flex;
- flex-direction: row;
- margin-left: 20px;
- }
- .lbl-cls {
- display: inline-block;
- width: 100px;
- text-align: right;
- padding-right: 10px;
- color: #bbb;
- }
- .export {
- background: rgba(9, 101, 98, 1) !important;
- font-size: 14px !important;
- color: #FFFFFF !important;
- font-family: Microsoft YaHei-3970(82674968);
- border-radius: 5px !important;
- margin-bottom: 22px !important;
- border: none !important;
- }
- .add-class {
- height: 450px !important;
- width: 800px !important;
- }
- .dialog-footer {
- display: flex;
- justify-content: flex-end;
- }
- .add-info-cancel-btn {
- color: rgba(9, 101, 98, 1) !important;
- border: 1px solid rgba(9, 101, 98, 1) !important;
- }
- .add-info-confirm-btn {
- border: none !important;
- background: rgba(9, 101, 98, 1) !important;
- color: #fff !important;
- border-radius: 5px !important;
- margin-left: 28px !important;
- }
- .el-form-item>label {
- color: rgba(128, 128, 128, 1) !important;
- }
- .custom-input {
- width: 7rem !important;
- }
- .custom-input input {
- width: 7rem !important;
- }
- .el-radio {
- margin-right: 10px;
- }
- .el-form-item {
- margin-bottom: 16px !important;
- }
- .add-dlg-class {
- width: 830px !important;
- height: 768px !important;
- }
- .add-product-class {
- width: 680px !important;
- height: 440px !important;
- }
- .el-carousel__indicators {
- display: none !important;
- }
- .el-tabs__item {
- width: 100px !important;
- text-align: center !important;
- font-size: 20px !important;
- }
- .el-tabs__item.is-active,
- .el-tabs__item:hover {
- color: rgba(9, 101, 98, 1) !important;
- }
- .el-tabs__active-bar {
- color: rgba(9, 101, 98, 1) !important;
- background-color: rgba(9, 101, 98, 1) !important;
- }
- </style>
|