|
@@ -24,53 +24,57 @@
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
<div class="layerBoxNoBg">
|
|
<div class="layerBoxNoBg">
|
|
- <el-button @click="clearSearchList">重置</el-button>
|
|
|
|
- <el-button type="primary" style="margin-right:20px" @click="getData('search')">搜索</el-button>
|
|
|
|
- <el-button type="success" icon="el-icon-circle-plus-outline" @click="addData">添加网站</el-button>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <el-button type="primary" @click="addData">添加网站</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <el-button type="info" @click="clearSearchList">重置</el-button>
|
|
|
|
+ <el-button type="primary" @click="getData('search')">搜索</el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<!--搜索功能 end------------------------------------------------------------>
|
|
<!--搜索功能 end------------------------------------------------------------>
|
|
-
|
|
|
|
<!--表格内容 start------------------------------------------------------------>
|
|
<!--表格内容 start------------------------------------------------------------>
|
|
<div class="layerBox">
|
|
<div class="layerBox">
|
|
|
|
+ <tableTitle :name="tableDivTitle"/>
|
|
<el-row>
|
|
<el-row>
|
|
<template>
|
|
<template>
|
|
<el-table :data="tableData" style="width: 100%">
|
|
<el-table :data="tableData" style="width: 100%">
|
|
<el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
|
|
<el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
|
|
- <el-table-column prop="website_name" label="网站名称" width="130"></el-table-column>
|
|
|
|
- <el-table-column prop="column_name" label="上级网系" width="150"></el-table-column>
|
|
|
|
- <el-table-column prop="website_url" label="网站地址" width="170"></el-table-column>
|
|
|
|
- <el-table-column prop="city_name" label="网站城市" width="250"></el-table-column>
|
|
|
|
- <el-table-column prop="created_at" label="创建时间" width="160"></el-table-column>
|
|
|
|
- <el-table-column prop="updated_at" label="修改时间" width="160"></el-table-column>
|
|
|
|
- <el-table-column fixed="right" label="操作" width="120">
|
|
|
|
|
|
+ <el-table-column prop="website_name" label="网站名称"></el-table-column>
|
|
|
|
+ <el-table-column prop="column_name" label="上级网系"></el-table-column>
|
|
|
|
+ <el-table-column prop="website_url" label="网站地址"></el-table-column>
|
|
|
|
+ <el-table-column prop="city_name" label="网站城市"></el-table-column>
|
|
|
|
+ <el-table-column prop="created_at" label="创建时间"></el-table-column>
|
|
|
|
+ <el-table-column prop="updated_at" label="修改时间"></el-table-column>
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="200" header-align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button @click.native.prevent="deleteData(scope.row.id, tableData)" type="text" size="small">移除</el-button>
|
|
|
|
- <el-button @click.native.prevent="getDataMain(scope.row.id, tableData)" type="text" size="small">编辑</el-button>
|
|
|
|
|
|
+ <div class="listBtnBox">
|
|
|
|
+ <div class="listDeleteBtn" @click="deleteData(scope.row.id, tableData)"><i class="el-icon-delete"></i>移除</div>
|
|
|
|
+ <div class="listEditBtn" @click="getDataMain(scope.row.id, tableData)"><i class="el-icon-edit-outline"></i>编辑</div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- <div class="listMainBtn"><i class="el-icon-view"></i>详情</div> -->
|
|
|
|
+ <!-- <el-button @click.native.prevent="deleteData(scope.row.id, tableData)" type="text" size="small">移除</el-button>
|
|
|
|
+ <el-button @click.native.prevent="getDataMain(scope.row.id, tableData)" type="text" size="small">编辑</el-button> -->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</template>
|
|
</template>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <!--分页 start------------------------------------------------------------>
|
|
|
|
- <div class="layerBox alignBox">
|
|
|
|
|
|
+ <div class="alignBox">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-size="10" layout="total, prev, pager, next, jumper" :total="allCount"></el-pagination>
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-size="10" layout="total, prev, pager, next, jumper" :total="allCount"></el-pagination>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
- <!--分页 end------------------------------------------------------------>
|
|
|
|
<!--表格内容 end------------------------------------------------------------>
|
|
<!--表格内容 end------------------------------------------------------------>
|
|
-
|
|
|
|
-
|
|
|
|
<!--弹出框1:外部表单弹出框 start------------------------------------------------------------>
|
|
<!--弹出框1:外部表单弹出框 start------------------------------------------------------------>
|
|
<el-dialog title="添加网站" :visible.sync="windowStatus">
|
|
<el-dialog title="添加网站" :visible.sync="windowStatus">
|
|
<!--弹出框2:内部模板弹出框 start------------------------------------------------------------>
|
|
<!--弹出框2:内部模板弹出框 start------------------------------------------------------------>
|
|
- <el-dialog width="32%" title="请选择模板" :visible.sync="innerVisible" append-to-body>
|
|
|
|
|
|
+ <el-dialog width="32%" title="皮肤库" :visible.sync="innerVisible" append-to-body>
|
|
<div class="templateListBox">
|
|
<div class="templateListBox">
|
|
- <div v-for="item in TemplateList" class="templateList" @click="useThatTemplate(item.id,item.template_name)">
|
|
|
|
|
|
+ <div v-for="item in TemplateList" class="templateList" @click="useThatTemplate(item.id,item.template_name,item.template_img)">
|
|
<img :src="item.template_img" class="templateImg">
|
|
<img :src="item.template_img" class="templateImg">
|
|
<div>{{item.template_name}}</div>
|
|
<div>{{item.template_name}}</div>
|
|
</div>
|
|
</div>
|
|
@@ -84,85 +88,135 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!--弹出框2:内部模板弹出框 end------------------------------------------------------------>
|
|
<!--弹出框2:内部模板弹出框 end------------------------------------------------------------>
|
|
<el-form :model="form" ref="form" :rules="formRules" autocomplete="off" label-position="left">
|
|
<el-form :model="form" ref="form" :rules="formRules" autocomplete="off" label-position="left">
|
|
- <el-form-item label="网站名称:" :label-width="formLabelWidth" prop="website_name">
|
|
|
|
- <el-input v-model="form.website_name" autocomplete="off"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站地址1:" :label-width="formLabelWidth" prop="website_url[0].url">
|
|
|
|
- <div class="formLabelFloatBox">
|
|
|
|
- <el-input v-model="form.website_url[0].url" autocomplete="off"></el-input>
|
|
|
|
- <el-button type="success" icon="el-icon-plus" circle size="mini" @click="addUrlInput(1)" class="formLabeladdIcon"></el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站地址2:" :label-width="formLabelWidth" v-if="form.website_url[1].show==true">
|
|
|
|
- <div class="formLabelFloatBox">
|
|
|
|
- <el-input v-model="form.website_url[1].url" autocomplete="off"></el-input>
|
|
|
|
- <el-button type="success" icon="el-icon-plus" circle size="mini" @click="addUrlInput(2)" class="formLabeladdIcon"></el-button>
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" circle size="mini" @click="deleteUrlInput(1)" class="formLabelDelIcon"></el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站地址3:" :label-width="formLabelWidth" v-if="form.website_url[2].show==true">
|
|
|
|
- <div class="formLabelFloatBox">
|
|
|
|
- <el-input v-model="form.website_url[2].url" autocomplete="off"></el-input>
|
|
|
|
- <el-button type="success" icon="el-icon-plus" circle size="mini" @click="addUrlInput(3)" class="formLabeladdIcon"></el-button>
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" circle size="mini" @click="deleteUrlInput(2)" class="formLabelDelIcon"></el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站地址4:" :label-width="formLabelWidth" v-if="form.website_url[3].show==true">
|
|
|
|
- <div class="formLabelFloatBox">
|
|
|
|
- <el-input v-model="form.website_url[3].url" autocomplete="off"></el-input>
|
|
|
|
- <el-button type="success" icon="el-icon-plus" circle size="mini" @click="addUrlInput(4)" class="formLabeladdIcon"></el-button>
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" circle size="mini" @click="deleteUrlInput(3)" class="formLabelDelIcon"></el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站地址5:" :label-width="formLabelWidth" v-if="form.website_url[4].show==true">
|
|
|
|
- <div class="formLabelFloatBox">
|
|
|
|
- <el-input v-model="form.website_url[4].url" autocomplete="off"></el-input>
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" circle size="mini" @click="deleteUrlInput(4)" class="formLabelDelIcon"></el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="上级网系:" :label-width="formLabelWidth" prop="website_column_arr_id">
|
|
|
|
- <el-cascader v-model="form.website_column_arr_id" :props="{checkStrictly:true}" :options="website_column_arr" @change="AppointWebsiteColumn"></el-cascader>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="城市:" :label-width="formLabelWidth">
|
|
|
|
- <!-- <el-cascader :key="cascaderKey" v-model="form.city_arr_id" placeholder="选择您要绑定的城市" :props="cityData" filterable clearable></el-cascader> -->
|
|
|
|
- <CityCascader v-model="form.city_arr_id" @update-city-id="updateFormCityId"></CityCascader>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站logo:" :label-width="formLabelWidth">
|
|
|
|
- <div class="uploaderBox">
|
|
|
|
- <el-upload class="avatar-uploader" action="#" :show-file-list="false" :before-upload="beforeAvatarUpload">
|
|
|
|
- <img v-if="logoUrl" :src="logoUrl" class="avatar">
|
|
|
|
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
- </el-upload>
|
|
|
|
|
|
+ <div class="formDiv">
|
|
|
|
+ <el-form-item label="网站名称:" :label-width="formLabelWidth" prop="website_name" class="custom-align-right">
|
|
|
|
+ <el-input v-model="form.website_name" autocomplete="off"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站地址1:" :label-width="formLabelWidth" prop="website_url[0].url" class="custom-align-right">
|
|
|
|
+ <div class="formLabelFloatBox">
|
|
|
|
+ <el-input v-model="form.website_url[0].url" autocomplete="off"></el-input>
|
|
|
|
+ <el-button type="info" icon="el-icon-plus" circle size="mini" @click="addUrlInput(1)" class="formLabeladdIcon"></el-button>
|
|
|
|
+ <el-button type="info" icon="el-icon-delete" circle size="mini" @click="" class="formLabelDelIcon" disabled></el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站地址2:" :label-width="formLabelWidth" v-if="form.website_url[1].show==true" class="custom-align-right">
|
|
|
|
+ <div class="formLabelFloatBox">
|
|
|
|
+ <el-input v-model="form.website_url[1].url" autocomplete="off"></el-input>
|
|
|
|
+ <el-button type="info" icon="el-icon-plus" circle size="mini" @click="addUrlInput(2)" class="formLabeladdIcon"></el-button>
|
|
|
|
+ <el-button type="info" icon="el-icon-delete" circle size="mini" @click="deleteUrlInput(1)" class="formLabelDelIcon"></el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站地址3:" :label-width="formLabelWidth" v-if="form.website_url[2].show==true" class="custom-align-right">
|
|
|
|
+ <div class="formLabelFloatBox">
|
|
|
|
+ <el-input v-model="form.website_url[2].url" autocomplete="off"></el-input>
|
|
|
|
+ <el-button type="info" icon="el-icon-plus" circle size="mini" @click="addUrlInput(3)" class="formLabeladdIcon"></el-button>
|
|
|
|
+ <el-button type="info" icon="el-icon-delete" circle size="mini" @click="deleteUrlInput(2)" class="formLabelDelIcon"></el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站地址4:" :label-width="formLabelWidth" v-if="form.website_url[3].show==true" class="custom-align-right">
|
|
|
|
+ <div class="formLabelFloatBox">
|
|
|
|
+ <el-input v-model="form.website_url[3].url" autocomplete="off"></el-input>
|
|
|
|
+ <el-button type="info" icon="el-icon-plus" circle size="mini" @click="addUrlInput(4)" class="formLabeladdIcon"></el-button>
|
|
|
|
+ <el-button type="info" icon="el-icon-delete" circle size="mini" @click="deleteUrlInput(3)" class="formLabelDelIcon"></el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站地址5:" :label-width="formLabelWidth" v-if="form.website_url[4].show==true" class="custom-align-right">
|
|
|
|
+ <div class="formLabelFloatBox">
|
|
|
|
+ <el-input v-model="form.website_url[4].url" autocomplete="off"></el-input>
|
|
|
|
+ <el-button type="info" icon="el-icon-plus" circle size="mini" @click="" class="formLabeladdIcon" disabled></el-button>
|
|
|
|
+ <el-button type="info" icon="el-icon-delete" circle size="mini" @click="deleteUrlInput(4)" class="formLabelDelIcon"></el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="上级网系:" :label-width="formLabelWidth" prop="website_column_arr_id" class="custom-align-right">
|
|
|
|
+ <el-cascader v-model="form.website_column_arr_id" :props="{checkStrictly:true}" :options="website_column_arr" @change="AppointWebsiteColumn"></el-cascader>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="城市:" :label-width="formLabelWidth" class="custom-align-right">
|
|
|
|
+ <CityCascader v-model="form.city_arr_id" @update-city-id="updateFormCityId"></CityCascader>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站logo:" :label-width="formLabelWidth" :class="['custom-form-item']" class="custom-align-right">
|
|
|
|
+ <div class="uploaderBox">
|
|
|
|
+ <!-- <el-upload class="avatar-uploader" action="#" :show-file-list="false" :before-upload="beforeAvatarUpload">
|
|
|
|
+ <img v-if="logoUrl" :src="logoUrl" class="avatar">
|
|
|
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
+ </el-upload> -->
|
|
|
|
+ <div class="avatar-upload-container" @mouseenter="hovering = true" @mouseleave="hovering = false">
|
|
|
|
+ <!-- 上传组件 -->
|
|
|
|
+ <el-upload
|
|
|
|
+ class="avatar-uploader"
|
|
|
|
+ action="#"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
|
+ >
|
|
|
|
+ <!-- 预览图片 -->
|
|
|
|
+ <img v-if="logoUrl" :src="logoUrl" class="avatar">
|
|
|
|
+ <!-- 上传图标 -->
|
|
|
|
+ <!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
|
|
|
|
+ <div v-else class="chooseImgDiv">
|
|
|
|
+ <div>
|
|
|
|
+ <img src="@/assets/public/upload/noImage.png">
|
|
|
|
+ <div>选择图片</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-upload>
|
|
|
|
+ <!-- 删除按钮,当鼠标悬浮时显示 -->
|
|
|
|
+ <div v-if="hovering && logoUrl" class="delete-button" @click="handleDelete">
|
|
|
|
+ <i class="el-icon-delete"></i>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站标题:" :label-width="formLabelWidth" prop="title" class="custom-align-right">
|
|
|
|
+ <template #label>
|
|
|
|
+ <span class="askBox">
|
|
|
|
+ 网站标题:
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="网站标题,如:三农市场网_网站列表_全国信息一体化网络平台_项目大全。" placement="top">
|
|
|
|
+ <i class="el-icon-question"></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ <el-input v-model="form.title" autocomplete="off"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站关键词:" :label-width="formLabelWidth" prop="keywords" class="custom-align-right">
|
|
|
|
+ <template #label>
|
|
|
|
+ <span class="askBox">
|
|
|
|
+ 网站关键词:
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="网站关键词,如:三农市场网、全国三农、信息一体化。" placement="top">
|
|
|
|
+ <i class="el-icon-question"></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ <el-input v-model="form.keywords" autocomplete="off"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="网站描述:" :label-width="formLabelWidth" prop="description" class="custom-align-right">
|
|
|
|
+ <template #label>
|
|
|
|
+ <span class="askBox">
|
|
|
|
+ 网站描述:
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="网站描述,如:中国三农市场网创建以来,社会效益和会员经济效益贡献。" placement="top">
|
|
|
|
+ <i class="el-icon-question"></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ <el-input type="textarea" v-model="form.description" class="custom-textarea"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <div class="webSiteTemplate" @click="getTemplateList">
|
|
|
|
+ <div class="webSiteTitle">模板:</div>
|
|
|
|
+ <div class="webSiteTemplateImg">
|
|
|
|
+ <img v-if="TemplateImg" :src="TemplateImg" alt="Selected Template Image" class="selectWebSiteTemplateImg">
|
|
|
|
+ <img v-else src="@/assets/public/upload/noImage.png" alt="No Image">
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站标题:" :label-width="formLabelWidth" prop="title">
|
|
|
|
- <!-- <el-tooltip class="item" effect="dark" content="Top Left 提示文字" placement="top-start">
|
|
|
|
- <i class="el-icon-question"></i>
|
|
|
|
- </el-tooltip> -->
|
|
|
|
- <el-input v-model="form.title" autocomplete="off"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站关键词:" :label-width="formLabelWidth" prop="keywords">
|
|
|
|
- <el-input v-model="form.keywords" autocomplete="off"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="网站描述:" :label-width="formLabelWidth" prop="description">
|
|
|
|
- <el-input type="textarea" v-model="form.description"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <div class="webSiteTemplate">
|
|
|
|
- <div class="webSiteTitle">模板:</div>
|
|
|
|
- <el-button type="text" @click="getTemplateList">选择模板</el-button>
|
|
|
|
- <div class="webSiteTemplateName">{{TemplateName}}</div>
|
|
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <div>
|
|
|
|
- <el-button @click="closeWindow">取 消</el-button>
|
|
|
|
- <el-button type="warning" @click="editToServe" v-if="editBtn==true">编辑</el-button>
|
|
|
|
|
|
+ <div class="footerBtnbox">
|
|
|
|
+ <el-button @click="closeWindow" type="info">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="editToServe" v-if="editBtn==true">确定</el-button>
|
|
<el-button type="primary" @click="addToServe" v-else>提交</el-button>
|
|
<el-button type="primary" @click="addToServe" v-else>提交</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!--弹出框2:外部表单弹出框 end------------------------------------------------------------>
|
|
<!--弹出框2:外部表单弹出框 end------------------------------------------------------------>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -171,10 +225,15 @@
|
|
//import getLocationNameById from '@/utils/citytocode';
|
|
//import getLocationNameById from '@/utils/citytocode';
|
|
//城市级联选择器
|
|
//城市级联选择器
|
|
import CityCascader from './components/CityCascader';
|
|
import CityCascader from './components/CityCascader';
|
|
|
|
+//表格标题
|
|
|
|
+import tableTitle from './components/tableTitle';
|
|
|
|
+//引入公用样式
|
|
|
|
+import '@/styles/global.less';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
CityCascader, //城市级联选择器
|
|
CityCascader, //城市级联选择器
|
|
|
|
+ tableTitle,//表格标题
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
//0.全局操作 start ------------------------------------------------------------>
|
|
//0.全局操作 start ------------------------------------------------------------>
|
|
@@ -204,6 +263,7 @@ export default {
|
|
//0.全局操作 end ------------------------------------------------------------>
|
|
//0.全局操作 end ------------------------------------------------------------>
|
|
return {
|
|
return {
|
|
//1.列表和分页相关 start ------------------------------------------------------------>
|
|
//1.列表和分页相关 start ------------------------------------------------------------>
|
|
|
|
+ tableDivTitle:"网站列表",
|
|
tableData:[],//内容
|
|
tableData:[],//内容
|
|
editId:0,//要修改的网站id
|
|
editId:0,//要修改的网站id
|
|
getApiData:{
|
|
getApiData:{
|
|
@@ -260,36 +320,9 @@ export default {
|
|
},
|
|
},
|
|
//3.3 通过api获的的数据 弹窗
|
|
//3.3 通过api获的的数据 弹窗
|
|
website_column_arr:[],//api获得的网系列表
|
|
website_column_arr:[],//api获得的网系列表
|
|
- //城市列表
|
|
|
|
- cascaderKey:0,//弹窗用的key
|
|
|
|
- cityData: {
|
|
|
|
- checkStrictly: true,
|
|
|
|
- lazy: true,
|
|
|
|
- async lazyLoad (node, resolve) {
|
|
|
|
- const { level, data } = node;
|
|
|
|
- if (data && data.children && data.children.length !== 0) {
|
|
|
|
- return resolve(node)
|
|
|
|
- }
|
|
|
|
- console.log(level)
|
|
|
|
- let parentId = level == 0 ? 0 : data.value
|
|
|
|
- let parames = {
|
|
|
|
- 'pid':parentId
|
|
|
|
- }
|
|
|
|
- self.$store.dispatch('pool/getcityList',parames).then(res=> {
|
|
|
|
- if (res.data) {
|
|
|
|
- const nodes = res.data.map(item => ({
|
|
|
|
- value: item.id,
|
|
|
|
- label: item.name,
|
|
|
|
- leaf: level >= 3,
|
|
|
|
- children: []
|
|
|
|
- }))
|
|
|
|
- resolve(nodes)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
//3.4 上传logo图片
|
|
//3.4 上传logo图片
|
|
logoUrl:'',
|
|
logoUrl:'',
|
|
|
|
+ hovering: false, // 鼠标悬浮状态 悬浮时显示删除
|
|
//3.5 模板列表
|
|
//3.5 模板列表
|
|
TemplateList:[],
|
|
TemplateList:[],
|
|
getTemplateData:{
|
|
getTemplateData:{
|
|
@@ -298,7 +331,8 @@ export default {
|
|
pageSize:9,//请求多少条
|
|
pageSize:9,//请求多少条
|
|
},
|
|
},
|
|
TemplateallCount:0,//总条数
|
|
TemplateallCount:0,//总条数
|
|
- TemplateName:"未选择模板.."//选择的模板名称
|
|
|
|
|
|
+ TemplateName:"未选择模板..",//选择的模板名称
|
|
|
|
+ TemplateImg:"",//选择的模板图片
|
|
//弹出框中的表单设置 end ------------------------------------------------------------>
|
|
//弹出框中的表单设置 end ------------------------------------------------------------>
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -502,6 +536,10 @@ export default {
|
|
// 阻止默认的上传行为
|
|
// 阻止默认的上传行为
|
|
return false;
|
|
return false;
|
|
},
|
|
},
|
|
|
|
+ handleDelete() {
|
|
|
|
+ // 删除图片
|
|
|
|
+ this.logoUrl = ''; // 清空图片 URL
|
|
|
|
+ },
|
|
//3.6 提交表单
|
|
//3.6 提交表单
|
|
addToServe(){
|
|
addToServe(){
|
|
//先进行验证
|
|
//先进行验证
|
|
@@ -524,6 +562,8 @@ export default {
|
|
type: 'success',
|
|
type: 'success',
|
|
message: '已成功添加网站!'
|
|
message: '已成功添加网站!'
|
|
});
|
|
});
|
|
|
|
+ //重新获取表单
|
|
|
|
+ this.getData();
|
|
//清空并退出
|
|
//清空并退出
|
|
this.closeWindow();
|
|
this.closeWindow();
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
@@ -590,14 +630,17 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//4.2 选择一个模板
|
|
//4.2 选择一个模板
|
|
- useThatTemplate(id,template_name){
|
|
|
|
- console.log(template_name)
|
|
|
|
- //关闭弹出框
|
|
|
|
- this.innerVisible = false;
|
|
|
|
- //显示用户选择的名称
|
|
|
|
- this.TemplateName = template_name;
|
|
|
|
- //记录选择的模板id
|
|
|
|
- this.form.template_id = id;
|
|
|
|
|
|
+ useThatTemplate(id, template_name, template_img) {
|
|
|
|
+ console.log(template_name);
|
|
|
|
+ console.log(template_img);
|
|
|
|
+ // 关闭弹出框
|
|
|
|
+ this.innerVisible = false;
|
|
|
|
+ // 显示用户选择的名称
|
|
|
|
+ this.TemplateName = template_name;
|
|
|
|
+ // 确保这里设置了 TemplateImg
|
|
|
|
+ this.TemplateImg = template_img; // 确保 template_img 是有效的路径
|
|
|
|
+ // 记录选择的模板id
|
|
|
|
+ this.form.template_id = id;
|
|
},
|
|
},
|
|
//4.1 模板列表分页
|
|
//4.1 模板列表分页
|
|
//直接跳转
|
|
//直接跳转
|
|
@@ -649,8 +692,8 @@ export default {
|
|
this.form.city_arr_id = res.data.city_arr_id;
|
|
this.form.city_arr_id = res.data.city_arr_id;
|
|
//当cascaderKey的值改变的时候 级联选择器会重置里面的内容
|
|
//当cascaderKey的值改变的时候 级联选择器会重置里面的内容
|
|
this.cascaderKey += 1;
|
|
this.cascaderKey += 1;
|
|
- this.loadCascaderPath(this.form.city_arr_id);
|
|
|
|
//回显网站标题,描述,关键词
|
|
//回显网站标题,描述,关键词
|
|
|
|
+ console.log(res.data.title,res.data.keywords,res.data.description)
|
|
this.form.title = res.data.title;
|
|
this.form.title = res.data.title;
|
|
this.form.keywords = res.data.keywords;
|
|
this.form.keywords = res.data.keywords;
|
|
this.form.description = res.data.description;
|
|
this.form.description = res.data.description;
|
|
@@ -703,54 +746,8 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
<style scoped lang="less">
|
|
- /*1.页面布局 start------------------------------------------------------------>*/
|
|
|
|
- .layerBox_search {
|
|
|
|
- margin:30px 30px 10px 30px;
|
|
|
|
- background: #fff;
|
|
|
|
- border-radius: 8px;
|
|
|
|
- padding: 20px 0;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- .searchTitle {
|
|
|
|
- font-size:14px;
|
|
|
|
- color:#999999;
|
|
|
|
- margin-bottom:10px;
|
|
|
|
- white-space:nowrap;
|
|
|
|
- }
|
|
|
|
- .searchBox {
|
|
|
|
- .el-cascader--medium {
|
|
|
|
- width:100%;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .el-row {
|
|
|
|
- >div:nth-child(1){
|
|
|
|
- padding-left:20px;
|
|
|
|
- padding-right:20px;
|
|
|
|
- }
|
|
|
|
- >div:nth-child(2){
|
|
|
|
- padding-right:20px
|
|
|
|
- }
|
|
|
|
- >div:nth-child(3){
|
|
|
|
- padding-right:20px
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .layerBox {
|
|
|
|
- margin:30px;
|
|
|
|
- background: #fff;
|
|
|
|
- border-radius: 8px;
|
|
|
|
- padding: 20px 20px 20px 20px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- }
|
|
|
|
- .layerBoxNoBg {
|
|
|
|
- margin:0 30px 0 30px;
|
|
|
|
- text-align: right;
|
|
|
|
- }
|
|
|
|
- .alignBox {
|
|
|
|
- text-align:center
|
|
|
|
- }
|
|
|
|
- /*页面布局 end------------------------------------------------------------>*/
|
|
|
|
-
|
|
|
|
- /*2.弹窗框 start------------------------------------------------------------>*/
|
|
|
|
|
|
+ /*表单样式 start------------------------------------------------------------>*/
|
|
|
|
+ //1.模板
|
|
.webSite {
|
|
.webSite {
|
|
background:#f0f2f5;
|
|
background:#f0f2f5;
|
|
width:200px;
|
|
width:200px;
|
|
@@ -763,7 +760,7 @@ export default {
|
|
display:flex;
|
|
display:flex;
|
|
.webSiteTitle {
|
|
.webSiteTitle {
|
|
width:120px;
|
|
width:120px;
|
|
- line-height: 36px;
|
|
|
|
|
|
+ line-height: 140px;
|
|
text-align: right;
|
|
text-align: right;
|
|
padding-right:12px;
|
|
padding-right:12px;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
@@ -777,13 +774,17 @@ export default {
|
|
position: relative;
|
|
position: relative;
|
|
.formLabeladdIcon {
|
|
.formLabeladdIcon {
|
|
position: absolute;
|
|
position: absolute;
|
|
- right:35px;
|
|
|
|
|
|
+ right:45px;
|
|
top:5px;
|
|
top:5px;
|
|
|
|
+ width:38px;
|
|
|
|
+ height:24px;
|
|
}
|
|
}
|
|
.formLabelDelIcon {
|
|
.formLabelDelIcon {
|
|
position: absolute;
|
|
position: absolute;
|
|
right:5px;
|
|
right:5px;
|
|
top:5px;
|
|
top:5px;
|
|
|
|
+ width:38px;
|
|
|
|
+ height:24px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.templateListBox {
|
|
.templateListBox {
|
|
@@ -809,6 +810,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //2.弹窗分页
|
|
.pageNumBox {
|
|
.pageNumBox {
|
|
text-align: center;
|
|
text-align: center;
|
|
padding-top:20px;
|
|
padding-top:20px;
|
|
@@ -817,18 +819,31 @@ export default {
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
line-height: 36px;
|
|
line-height: 36px;
|
|
}
|
|
}
|
|
- //文件上传
|
|
|
|
|
|
+ //3.logo上传
|
|
|
|
+ .chooseImgDiv {
|
|
|
|
+ width: 140px;
|
|
|
|
+ height:140px;
|
|
|
|
+ display:flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ color:#5570F1;
|
|
|
|
+ font-size:14px;
|
|
|
|
+ img {
|
|
|
|
+ display:block;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.uploaderBox {
|
|
.uploaderBox {
|
|
.avatar-uploader{
|
|
.avatar-uploader{
|
|
- width: 60px;
|
|
|
|
- border: 1px dashed #d9d9d9;
|
|
|
|
|
|
+ width: 140px;
|
|
|
|
+ height:140px;
|
|
|
|
+ border: 1px solid #d9d9d9;
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
position: relative;
|
|
position: relative;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
.avatar-uploader {
|
|
.avatar-uploader {
|
|
- border-color: #409EFF;
|
|
|
|
|
|
+ border-color: #d9d9d9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.avatar-uploader-icon {
|
|
.avatar-uploader-icon {
|
|
@@ -840,9 +855,77 @@ export default {
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|
|
.avatar {
|
|
.avatar {
|
|
- width: 60px;
|
|
|
|
- height: 60px;
|
|
|
|
|
|
+ width: 140px;
|
|
|
|
+ height: 140px;
|
|
display: block;
|
|
display: block;
|
|
}
|
|
}
|
|
- /*弹窗框 end------------------------------------------------------------>*/
|
|
|
|
|
|
+ //选择模板
|
|
|
|
+ .webSiteTemplateImg {
|
|
|
|
+ width: 140px;
|
|
|
|
+ height: 140px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ border-radius: 12px;
|
|
|
|
+ border: 1px solid #E1E2E9;
|
|
|
|
+ .selectWebSiteTemplateImg {
|
|
|
|
+ width: 140px;
|
|
|
|
+ height: 140px;
|
|
|
|
+ display: block;
|
|
|
|
+ }
|
|
|
|
+ img {
|
|
|
|
+ display: block;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /*表单样式 end------------------------------------------------------------>*/
|
|
|
|
+
|
|
|
|
+ //表单微调 start------------------------------------------------------------>*/
|
|
|
|
+ .footerBtnbox {
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ .formDiv {
|
|
|
|
+ .el-cascader {
|
|
|
|
+ width:100%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .delete-button {
|
|
|
|
+ width:30px;
|
|
|
|
+ height:30px;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ text-align:center;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 60px;
|
|
|
|
+ left: 60px;
|
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
|
+ color: white;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ transition: background 0.3s ease;
|
|
|
|
+ z-index: 999; /* 确保删除按钮在图片上方 */
|
|
|
|
+ }
|
|
|
|
+ .delete-button:hover {
|
|
|
|
+ background: rgba(255, 0, 0, 0.7);
|
|
|
|
+ }
|
|
|
|
+ ::v-deep .custom-form-item > .el-form-item__label {
|
|
|
|
+ line-height: 140px !important;
|
|
|
|
+ }
|
|
|
|
+ ::v-deep .custom-textarea .el-textarea__inner {
|
|
|
|
+ resize: none; /* 禁止用户拖拽调整大小 */
|
|
|
|
+ }
|
|
|
|
+ ::v-deep .custom-align-right .el-form-item__label {
|
|
|
|
+ text-align: right; /* 设置标签文字右对齐 */
|
|
|
|
+ }
|
|
|
|
+ .askBox {
|
|
|
|
+ position: relative;
|
|
|
|
+ i {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top:0;
|
|
|
|
+ right:-5px;
|
|
|
|
+ width:12px;
|
|
|
|
+ height:12px;
|
|
|
|
+ color:#A9A9A9;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //表单微调 end------------------------------------------------------------>*/
|
|
</style>
|
|
</style>
|
|
|
|
+
|