Commit ba0b9a01 authored by Mac's avatar Mac

司导页面

parent 5585d8f9
This diff is collapsed.
<template>
<div v-loading="loading" class="addCarBrand">
<div class="head-title">
<span @click="CommonJump('directorCarBrandList')" class="blue point">车辆管理</span> / 编辑车辆管理
</div>
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width:50%">
<el-form-item label="车辆名称" prop="Name" class="is-required">
<el-input v-model="addMsg.Name" placeholder="请输入车辆名称" />
</el-form-item>
<el-form-item label="LOGO" class="is-required">
<el-button @click="openChangeDig(1)" size="small">选择文件</el-button>
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;">
<img v-if="!addMsg.BrandLogo || addMsg.BrandLogo==''"
src="../../../assets/img/default.png" style="width:80px;height:80px" alt="">
<img v-else style="width:80px;height:80px" :src="addMsg.BrandLogo"
alt="">
</div>
</el-form-item>
</el-form>
</div>
<div style="margin-top:20px">
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
</div>
<!-- 选择文件 -->
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
</div>
</template>
<script>
// import ChooseImg from "@/components/global/ChooseImg.vue";
export default {
components: {
// ChooseImg,
},
data() {
return {
addMsg: {
ID: 0,
BrandLogo:'',
Name:'',
},
Picindex:0,
rules: {
Name: [{
required: true,
message: '请输入品牌名称',
trigger: 'blur'
}],
},
loading: false,
changeState:false,
imgType:0,
};
},
created() {
if(this.$route.query.ID){
this.getData(this.$route.query.ID)
}
},
methods: {
SelectId(msg){
if(this.imgType==1){
let url = this.getIconLink(msg.url)
this.addMsg.BrandLogo = url
}
this.changeState = false;
},
openChangeDig(num) {
this.changeState = true;
this.imgType=num;
},
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if(this.addMsg.BrandLogo==''){
this.Error('请上传品牌Logo')
return false
}
this.lxymallapipost("/api/GuideCar/AddOrUpdateGuideCarBrand", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.CommonJump('directorCarBrandList');
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
})
} else {
return false;
}
});
},
getData(ID) {
this.loading = true;
this.lxymallapipost("/api/GuideCar/GetGuideCarBrandModel", {
ID: ID
}, res => {
this.loading = false;
this.addMsg = res.data.data;
})
},
},
mounted() {
}
};
</script>
<style>
@import './css/index.css';
.app-add-cat .el-checkbox-group {
font-size: 14px !important;
}
.app-add-cat .el-checkbox {
margin-right: 0;
}
.app-add-cat .el-dialog__body {
padding: 10px 20px !important;
}
.app-add-cat .tag-box .tag-item {
margin-right: 5px;
}
.app-add-cat .tag-box {
margin: 20px 0;
}
.app-add-cat .app-goods-cat-list .active {
background: #FAFAFA;
}
.app-add-cat .app-goods-cat-list .cat-item {
cursor: pointer;
padding: 5px 10px;
}
.app-add-cat .app-goods-cat-list {
border: 1px solid #E8EAEE;
border-radius: 5px;
margin-top: -5px;
padding: 10px 0;
overflow: scroll;
height: 400px;
}
.addCarBrand .blue {
color: #409EFF;
}
.addCarBrand .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
.addCarBrand .gez_list{
/*width: 650px;*/
margin-bottom: 12px;
padding: 20px;
border: 1px solid #EBEEF5;
background-color: #FFF;
color: #303133;
}
.addCarBrand .quyu{
background-color: #f4f4f5;
color: #909399;
padding: 10px;
line-height: 30px;
height: 30px;
font-size: 12px;
border-radius: 4px;
white-space: nowrap;
margin: 5px;
}
</style>
<template>
<div v-loading="loading" class="addGuide">
<div class="head-title">
<span @click="CommonJump('directorGuideList')" class="blue point">导游管理</span> / 编辑导游管理
</div>
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width:50%">
<el-form-item label="导游名称" prop="Name" class="is-required">
<el-input v-model="addMsg.Name" size="small" placeholder="请输入站点名称" />
</el-form-item>
<el-form-item label="用户头像" size="small">
<el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage">
<el-tooltip class="item" effect="dark" content="建议尺寸100*100" placement="top">
<el-button >选择文件</el-button>
</el-tooltip>
</el-upload>
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;">
<img v-if="!addMsg.GuidePhoto || addMsg.GuidePhoto==''"
src="../../../assets/img/default.png" style="width:80px;height:80px" alt="">
<img v-else style="width:80px;height:80px" :src="addMsg.GuidePhoto"
alt="">
</div>
</el-form-item>
<el-form-item label="工作年限" prop="WorkYears" class="is-required" size="small">
<el-input v-model="addMsg.WorkYears" @keyup.native="checkPrice(addMsg,'WorkYears')" placeholder="请输入工作年限">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="站点" prop="SiteId" class="is-required">
<el-select class="w120" v-model="addMsg.SiteId" size="small"
placeholder="请选择">
<el-option v-for="item in CarSiteList" :key="item.ID" :label="item.SiteName" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="联系电话" prop="Telephone" class="is-required" size="small">
<el-input v-model="addMsg.Telephone" placeholder="请输入联系电话" type="number"/>
</el-form-item>
<el-form-item label="紧急联系电话" prop="EmergencyPhone" class="is-required" size="small">
<el-input v-model="addMsg.EmergencyPhone" placeholder="请输入紧急联系电话" type="number"/>
</el-form-item>
<el-form-item label="简介">
<!-- <UE style="width:750px;" :defaultMsg="defaultMsg" :config="config" :IsMultiple="true" ref="ue"></UE>-->
<quill-editor :options="tl" v-model="addMsg.Introduction"></quill-editor>
</el-form-item>
</el-form>
</div>
<div style="margin-top:20px">
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
</div>
<!-- 选择文件 -->
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
</div>
</template>
<script>
// import ChooseImg from "@/components/global/ChooseImg.vue";
// import UE from "@/components/global/UE.vue";
import tl from './js/tl'
export default {
components: {
// ChooseImg,
// UE,
},
data() {
return {
addMsg: {
ID: 0,
Name:'',
GuidePhoto:'',
WorkYears:0,
SiteId:'',
Telephone:'',
EmergencyPhone:'',
Introduction:'',
},
tl:tl,
editorOption: {
modules:{
toolbar:[
['bold', 'italic', 'underline', 'strike', 'image'], // toggled buttons
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, {'background': [] }],
[{ 'font': [] }],
[{ 'align': [] }],
[{ 'size': ['small', false, 'large', 'huge'] }],
[{ 'list': 'ordered'}, { 'list': 'bullet' }]
]
}
},
defaultMsg: "",
config: {
initialFrameWidth: null,
initialFrameHeight: 350
},
rules: {
Name: [{
required: true,
message: '请输入导游名称',
trigger: 'blur'
}],
WorkYears: [{
required: true,
message: '请输入工作年限名称',
trigger: 'blur'
}],
Telephone: [{
required: true,
message: '请输入联系电话名称',
trigger: 'blur'
}],
EmergencyPhone: [{
required: true,
message: '请输入紧急联系电话名称',
trigger: 'blur'
}],
},
loading: false,
CarSiteList:[],
changeState:false,
imgType:0,
};
},
created() {
if(this.$route.query.ID){
this.getData(this.$route.query.ID)
}
this.getAllGuideCarSiteList()//获取站点下拉
},
methods: {
SelectId(msg){
if(this.imgType==1){
let url = this.getIconLink(msg.url)
this.addMsg.GuidePhoto = url
}
this.changeState = false;
},
openChangeDig(num) {
this.changeState = true;
this.imgType=num;
},
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if(this.addMsg.GuidePhoto==''){
this.Error('请上传头像')
return false
}
if(this.addMsg.teId==''){
this.Error('请选择站点')
return false
}
// let content = this.$refs.ue.getUEContent();
// this.addMsg.Introduction = content;
this.lxymallapipost("/api/GuideCar/AddOrUpdateGuideCarGuide", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.CommonJump('directorGuideList');
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
})
} else {
return false;
}
});
},
getAllGuideCarSiteList(){
this.lxymallapipost("/api/GuideCar/GetAllGuideCarSiteList", {}, res => {
if (res.data.resultCode == 1) {
this.CarSiteList = res.data.data
} else {
this.Error(res.data.message);
}
})
},
getData(ID) {
this.loading = true;
this.lxymallapipost("/api/GuideCar/GetGuideCarGuideModel", {
ID: ID
}, res => {
this.loading = false;
this.addMsg = res.data.data;
// if (this.addMsg.Introduction && this.addMsg.Introduction != "") {
// this.defaultMsg = this.addMsg.Introduction;
// }
})
},
//图片上传
UploadImage(file) {
console.log(file)
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.addMsg.GuidePhoto = imgUrl
});
},
},
mounted() {
}
};
</script>
<style>
@import './css/index.css';
.app-add-cat .el-checkbox-group {
font-size: 14px !important;
}
.app-add-cat .el-checkbox {
margin-right: 0;
}
.app-add-cat .el-dialog__body {
padding: 10px 20px !important;
}
.app-add-cat .tag-box .tag-item {
margin-right: 5px;
}
.app-add-cat .tag-box {
margin: 20px 0;
}
.app-add-cat .app-goods-cat-list .active {
background: #FAFAFA;
}
.app-add-cat .app-goods-cat-list .cat-item {
cursor: pointer;
padding: 5px 10px;
}
.app-add-cat .app-goods-cat-list {
border: 1px solid #E8EAEE;
border-radius: 5px;
margin-top: -5px;
padding: 10px 0;
overflow: scroll;
height: 400px;
}
.addGuide .tip {
margin-left: 10px;
display: inline-block;
height: 30px;
line-height: 30px;
color: #ff4544;
background-color: #FEF0F0;
padding: 0 20px;
border-radius: 5px;
}
.addGuide .app-image {
background-size: cover;
background-position: center center;
width: 80px;
height: 80px;
border-radius: 0%;
}
.addGuide .setTable .el-table__body .cell {
display: flex;
align-items: center;
}
.addGuide .commonLabel .el-form-item__label {
margin-top: -4px;
}
.addGuide .discount .el-form-item__label {
padding-right: 30px;
margin-top: -4px;
}
.addGuide .el-form-item .elzk {
position: absolute;
left: -25px;
top: 8px;
}
.addGuide .el-form-item {
position: relative;
}
.addGuide .blue {
color: #409EFF;
}
.addGuide .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
.addGuide .gez_list{
width: 650px;
margin-bottom: 12px;
padding: 20px;
border: 1px solid #EBEEF5;
background-color: #FFF;
color: #303133;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.addGuide .quyu{
background-color: #f4f4f5;
color: #909399;
padding: 10px;
line-height: 30px;
height: 30px;
font-size: 12px;
border-radius: 4px;
white-space: nowrap;
margin: 5px;
}
.addGuide .imgstyle{
width: 32px;
height: 32px;
margin: 0 5px;
}
</style>
<template>
<div v-loading="loading" class="addSite">
<div class="head-title">
<span @click="CommonJump('guideCarSiteList')" class="blue point">站点管理</span> / 编辑站点管理
</div>
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width:60%">
<el-form-item label="站点名称" prop="SiteName" class="is-required">
<el-input v-model="addMsg.SiteName" placeholder="请输入站点名称" />
</el-form-item>
<el-form-item label="是否启用" prop="IsEnable">
<el-radio v-model="addMsg.IsEnable" :label="1"></el-radio>
<el-radio v-model="addMsg.IsEnable" :label="0"></el-radio>
</el-form-item>
<el-form-item label="司导区域" class="is-required" >
<div class="gez_list el-card" v-if="addMsg.RegionList.length>0">
<div style="width: 500px;" >
<div >区域:<span v-for="(item,index) in addMsg.RegionList" :key="index" class="quyu">
{{item.RegionName}}</span>
</div>
</div>
<div style="width: 110px;display: flex;flex-direction: row;justify-content: space-around">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img src="../../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="edit()">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b()">
</el-tooltip>
</div>
</div>
<span style="color: #409EFF;font-size: 14px;cursor: pointer;" @click="addOf" v-if="addMsg.RegionList.length==0">+新增规则</span>
</el-form-item>
</el-form>
</div>
<div style="margin-top:20px">
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
</div>
<el-dialog title="新增司导地区" :visible.sync="dialogFormVisible" >
<el-form :model="addMsg" :rules="rules" ref="addMsg">
<el-form-item label="司导地区" prop="List">
<region_Choice @event1="change($event)" ref="child"></region_Choice>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="Addto()">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import region_Choice from './view/regionChoice'
export default {
data() {
return {
addMsg: {
ID: 0,
SiteName:'',
RegionList:[],
IsEnable:0
},
rules: {
SiteName: [{
required: true,
message: '请输入站点名称',
trigger: 'blur'
}],
},
loading: false,
dialogFormVisible:false,
};
},
created() {
if(this.$route.query.ID){
this.getData(this.$route.query.ID)
}
},
components:{
region_Choice,
},
methods: {
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.lxymallapipost("/api/GuideCar/AddOrUpdateGuideCarSite", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.CommonJump('guideCarSiteList');
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
})
} else {
return false;
}
});
},
edit(){
this.dialogFormVisible=true;
setTimeout(()=>{
this.$refs.child.Receive(this.addMsg.RegionList)
},1000)
} ,
delete_b(){
this.addMsg.RegionList=[]
},
change(data){
this.List = data;
},
Addto(){
this.dialogFormVisible=false
this.addMsg.RegionList =this.List;
},
addOf(){
this.List=[]
this.dialogFormVisible=true;
this.isedit=false;//设置为编辑状态
setTimeout(()=>{
this.$refs.child.Receive(this.List)
},1000)
},
getData(ID) {
this.loading = true;
this.lxymallapipost("/api/GuideCar/GetGuideCarSiteModel", {
ID: ID
}, res => {
this.loading = false;
this.addMsg = res.data.data;
})
},
},
mounted() {
}
};
</script>
<style>
@import './css/index.css';
.app-add-cat .el-checkbox-group {
font-size: 14px !important;
}
.app-add-cat .el-checkbox {
margin-right: 0;
}
.app-add-cat .el-dialog__body {
padding: 10px 20px !important;
}
.app-add-cat .tag-box .tag-item {
margin-right: 5px;
}
.app-add-cat .tag-box {
margin: 20px 0;
}
.app-add-cat .app-goods-cat-list .active {
background: #FAFAFA;
}
.app-add-cat .app-goods-cat-list .cat-item {
cursor: pointer;
padding: 5px 10px;
}
.app-add-cat .app-goods-cat-list {
border: 1px solid #E8EAEE;
border-radius: 5px;
margin-top: -5px;
padding: 10px 0;
overflow: scroll;
height: 400px;
}
.addSite .tip {
margin-left: 10px;
display: inline-block;
height: 30px;
line-height: 30px;
color: #ff4544;
background-color: #FEF0F0;
padding: 0 20px;
border-radius: 5px;
}
.addSite .app-image {
background-size: cover;
background-position: center center;
width: 80px;
height: 80px;
border-radius: 0%;
}
.addSite .setTable .el-table__body .cell {
display: flex;
align-items: center;
}
.addSite .commonLabel .el-form-item__label {
margin-top: -4px;
}
.addSite .discount .el-form-item__label {
padding-right: 30px;
margin-top: -4px;
}
.addSite .el-form-item .elzk {
position: absolute;
left: -25px;
top: 8px;
}
.addSite .el-form-item {
position: relative;
}
.addSite .blue {
color: #409EFF;
}
.addSite .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
.addSite .gez_list{
width: 650px;
margin-bottom: 12px;
padding: 20px;
border: 1px solid #EBEEF5;
background-color: #FFF;
color: #303133;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.addSite .quyu{
background-color: #f4f4f5;
color: #909399;
padding: 10px;
line-height: 30px;
height: 30px;
font-size: 12px;
border-radius: 4px;
white-space: nowrap;
margin: 5px;
}
.addSite .imgstyle{
width: 32px;
height: 32px;
margin: 0 5px;
}
</style>
<template>
<div class="directorCarBrandList">
<div class="el-card__header">
<span>车辆品牌管理</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="addRecharge">新增</el-button>
</div>
</div>
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<div class="block" >
<div class="searchInput" style="width:200px">
<el-input style="display:inline-block;width:170px;height:30px"
placeholder="请输入车辆品牌名称"
v-model="msg.Name"
size="small"
@clear="getList"
@keyup.enter.native="getList"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
</div>
</div>
<div style="padding: 20px;background: #fff;">
<el-table
:data="tableData"
header-cell-class-name="headClass"
style="width: 100%"
border
>
<el-table-column
prop="ID"
label="ID"
width="100">
</el-table-column>
<el-table-column
prop="BrandLogo"
label="车辆图片">
<template slot-scope="scope">
<img :src="scope.row.BrandLogo" alt="" style="width: 100px;height: 100px">
</template>
</el-table-column>
<el-table-column
prop="Name"
label="名称"
>
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="180"
>
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img src="../../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="Edit(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top" >
<img src="../../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)">
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:current-page.sync="msg.pageIndex"
:total="count">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "directorCarBrandList",
data(){
return{
msg:{
pageIndex:1,
pageSize:20,
Name:'',
},
dateList:[],
tableData:[],
count:0,
loading:false,
}
},
created(){
this.getDateList();
},
methods:{
getDateList(){
this.loading=true;
this.lxymallapipost("/api/GuideCar/GetGuideCarBrandPageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
}else {
this.Info(res.data.message);
}
})
},
addRecharge(){
this.$router.push('/addCarBrand');
},
Edit(row){
this.$router.push({
name: 'addCarBrand',
query: {
ID:row.ID,
blank: "y"
}
});
},
delete_b(row){
let that=this;
that.Confirm("是否删除?", function () {
that.lxymallapipost(
"/api/GuideCar/DelGuideCarBrandInfo",
{Ids:row.ID},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getDateList();
} else {
that.Error(res.data.message);
}
},
);
});
},
getList(){
this.msg.pageIndex = 1
this.getDateList()
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getDateList();
},
},
}
</script>
<style >
@import './css/index.css';
.directorCarBrandList .el-card__header{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
}
.directorCarBrandList .el-button--small{
padding: 9px 15px;
}
.directorCarBrandList .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
/*margin-left: 10px;*/
}
.directorCarBrandList .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.directorCarBrandList .content .searchInput{
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width:250px;
}
.directorCarBrandList .content{
background: #fff;
margin-top:10px;
padding: 15px;
box-sizing: border-box;
}
.directorCarBrandList .el-tag{
margin-right: 5px;
}
.directorCarBrandList .app-image{
background-position: center center;
width: 50px;
height: 50px;
border-radius:0%;
float: left;
margin-right: 8px;
}
</style>
<template>
<div class="directorCarList">
<div class="el-card__header">
<span>车辆管理</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="addRecharge">新增</el-button>
</div>
</div>
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<div class="block" >
<div class="searchInput" style="width:200px">
<el-input style="display:inline-block;width:170px;height:30px"
placeholder="请输入车辆名称搜索"
v-model="msg.Name"
size="small"
@clear="getList"
@keyup.enter.native="getList"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<span style="margin-left:15px">品牌:</span>
<el-select class="w120" @change="msg.pageIndex=1,getList()" v-model="msg.CarBrandId" size="small" placeholder="请选择">
<el-option label="不限" :value='0'></el-option>
<el-option v-for="item in CarBrandList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
<span style="margin-left:15px">分类:</span>
<el-select class="w120" @change="msg.pageIndex=1,getList()" v-model="msg.CarClass" size="small" placeholder="请选择">
<el-option label="不限" :value='0'></el-option>
<el-option v-for="item in CarClassList" :key="item.Id" :label="item.Name" :value="item.Id"></el-option>
</el-select>
</div>
</div>
</div>
<div style="padding: 20px;background: #fff;">
<el-table
:data="tableData"
header-cell-class-name="headClass"
style="width: 100%"
border
>
<el-table-column
prop="ID"
label="ID"
width="100">
</el-table-column>
<el-table-column
prop="Name"
label="车辆信息">
<template slot-scope="scope">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.CarLogo + ')',backgroundSize:'cover'}"></div>
<div flex="dir:left cross:center">
{{scope.row.CarBrand}}
</div>
</template>
</el-table-column>
<el-table-column
prop="Name"
label="车辆"
>
</el-table-column>
<el-table-column
prop="CarType"
label="型号"
>
</el-table-column>
<el-table-column
prop="CarClassStr"
label="分类"
width="120">
</el-table-column>
<el-table-column
prop="ColorList"
label="车辆颜色">
<template slot-scope="scope">
<el-button v-for="(x, index2) in scope.row.ColorList" :key="index2" size="mini" @click="showImg(x)">{{x.ColorName}}</el-button>
</template>
</el-table-column>
<el-table-column
prop="GoodsNum"
width="100"
label="商品数">
</el-table-column>
<el-table-column
prop="OrderNum"
width="100"
label="订单数">
</el-table-column>
<el-table-column
prop="GuestNum"
width="100"
label="可乘人数">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="180"
>
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img src="../../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="Edit(scope.row)">
</el-tooltip>
<!-- <el-tooltip class="item" effect="dark" content="删除" placement="top" >-->
<!-- <img src="../../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)">-->
<!-- </el-tooltip>-->
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:current-page.sync="msg.pageIndex"
:total="count">
</el-pagination>
</div>
<el-dialog :title="itemdata.ColorName+'车辆'" :visible.sync="changeState" width="1240px">
<div style="display: flex;flex-direction: row;flex-wrap: wrap;">
<img v-for="(x, index) in itemdata.CarPic" :key="index" style="width:200px;height:200px;margin: 10px" :src="x" alt="">
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: "directorCarList",
data(){
return{
msg:{
pageIndex:1,
pageSize:20,
Name:'',
CarBrandId:0,
CarClass:0,
},
changeState:false,
dateList:[],
CarClassList:[],
CarBrandList:[],
tableData:[],
count:0,
loading:false,
itemdata:{},
EnableMsg:{
Ids:'',
IsEnable:0,
},
}
},
created(){
this.getDateList();
this.getCarClassList()//获取车辆的分类
this.getGuideCarBrandList()//获取车辆品牌
},
methods:{
getDateList(){
this.loading=true;
this.lxymallapipost("/api/GuideCar/GetGuideCarPageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
}else {
this.Info(res.data.message);
}
})
},
getCarClassList(){
this.lxymallapipost("/api/GuideCar/GetCarClassList", {}, res => {
if(res.data.resultCode==1){
this.CarClassList = res.data.data;
}else {
this.Info(res.data.message);
}
})
},
getGuideCarBrandList(){
this.lxymallapipost("/api/GuideCar/GetGuideCarBrandList", {}, res => {
if(res.data.resultCode==1){
this.CarBrandList = res.data.data;
}else {
this.Info(res.data.message);
}
})
},
addRecharge(){
this.$router.push('/addCar');
},
showImg(item){//显示图片
this.changeState = true;
this.itemdata = item
this.itemdata.CarPic = JSON.parse(this.itemdata.CarPic)
},
Edit(row){
this.$router.push({
name: 'addCar',
query: {
ID:row.ID,
blank: "y"
}
});
},
delete_b(row){
let that=this;
that.Confirm("是否删除?", function () {
that.lxymallapipost(
"/api/GuideCar/DelGuideCarSiteInfo",
{Id:row.ID},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getDateList();
} else {
that.Error(res.data.message);
}
},
);
});
},
getList(){
this.msg.pageIndex = 1
this.getDateList()
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getDateList();
},
},
}
</script>
<style >
@import './css/index.css';
.directorCarList .el-card__header{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
}
.directorCarList .el-button--small{
padding: 9px 15px;
}
.directorCarList .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
/*margin-left: 10px;*/
}
.directorCarList .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.directorCarList .content .searchInput{
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width:250px;
}
.directorCarList .content{
background: #fff;
margin-top:10px;
padding: 15px;
box-sizing: border-box;
}
.directorCarList .el-tag{
margin-right: 5px;
}
.directorCarList .app-image{
background-position: center center;
width: 50px;
height: 50px;
border-radius:0%;
float: left;
margin-right: 8px;
}
</style>
...@@ -736,14 +736,14 @@ ...@@ -736,14 +736,14 @@
<script> <script>
// import ChooseImg from "@/components/global/ChooseImg.vue"; // import ChooseImg from "@/components/global/ChooseImg.vue";
// import Choosevideo from "@/components/global/Choosevideo.vue"; // import Choosevideo from "@/components/global/Choosevideo.vue";
// import region_Choice from "@/components/setup/view/regionChoice"; import region_Choice from "./view/regionChoice";
// import UE from "@/components/global/UE.vue"; // import UE from "@/components/global/UE.vue";
import draggable from "vuedraggable" import draggable from "vuedraggable"
export default { export default {
components: { components: {
// ChooseImg, // ChooseImg,
// Choosevideo, // Choosevideo,
// region_Choice, region_Choice,
// UE, // UE,
draggable draggable
}, },
......
This diff is collapsed.
...@@ -827,6 +827,8 @@ ...@@ -827,6 +827,8 @@
</script> </script>
<style> <style>
@import './css/index.css';
.app-order-detail .goods-pic { .app-order-detail .goods-pic {
width: 35px; width: 35px;
height: 35px; height: 35px;
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</el-form-item> </el-form-item>
<el-form-item label="详情页面链接"> <el-form-item label="详情页面链接">
<el-input style="width:350px" placeholder="请输入" size="small" v-model="addMsg.PagePath"> <el-input style="width:350px" placeholder="请输入" size="small" v-model="addMsg.PagePath">
<el-button slot="append" @click="isShowLink=true">选择链接</el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="提前预定天数"> <el-form-item label="提前预定天数">
...@@ -534,6 +534,8 @@ ...@@ -534,6 +534,8 @@
</script> </script>
<style> <style>
@import './css/index.css';
.directorSetting .app-gallery-item { .directorSetting .app-gallery-item {
width: 100px; width: 100px;
height: 100px; height: 100px;
......
<template>
<div class="guideCarSiteList">
<div class="el-card__header">
<span>站点管理</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="addRecharge">新增</el-button>
</div>
</div>
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<div class="block" style="display: flex;flex-direction: row;justify-content: space-between;width: 100%;">
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入站点名称搜索"
v-model="msg.SiteName"
size="small"
@clear="getList"
@keyup.enter.native="getList"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<div style="display: flex;flex-direction: row;">
<el-button type="primary" @click="SetProduct(1)" size="small">开启</el-button>
<el-button type="primary" @click="SetProduct(0)" size="small">关闭</el-button>
</div>
</div>
</div>
</div>
<div style="padding: 20px;background: #fff;">
<el-table
:data="tableData"
header-cell-class-name="headClass"
style="width: 100%"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" style="text-align:center;"></el-table-column>
<el-table-column
prop="ID"
label="ID"
width="100">
</el-table-column>
<el-table-column
prop="SiteName"
label="站点名称">
</el-table-column>
<el-table-column
prop="RegionList"
label="地区">
<template slot-scope="scope">
<el-tag v-for="(item,index) in scope.row.RegionList" :key="index">{{item}}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="SiteName"
width="130"
label="是否开启">
<template slot-scope="scope">
<el-switch v-model="scope.row.IsEnable" active-color="#409EFF" :active-value="1"
:inactive-value="0" @change="changeEnabled(scope.row)">
</el-switch>
</template>
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="180"
>
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img src="../../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="Edit(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top" >
<img src="../../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)">
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:current-page.sync="msg.pageIndex"
:total="count">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "guideCarSiteList",
data(){
return{
msg:{
pageIndex:1,
pageSize:20,
SiteName:'',
},
tableData:[],
count:0,
loading:false,
EnableMsg:{
Ids:'',
IsEnable:0,
},
}
},
created(){
this.getDateList();
},
methods:{
getDateList(){
this.loading=true;
this.lxymallapipost("/api/GuideCar/GetGuideCarSiteList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
}else {
this.Info(res.data.message);
}
})
},
addRecharge(){
this.$router.push('/addSite');
},
Edit(row){
this.$router.push({
name: 'addSite',
query: {
ID:row.ID,
blank: "y"
}
});
},
delete_b(row){
let that=this;
that.Confirm("是否删除?", function () {
that.lxymallapipost(
"/api/GuideCar/DelGuideCarSiteInfo",
{Id:row.ID},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getDateList();
} else {
that.Error(res.data.message);
}
},
);
});
},
changeEnabled(item){
this.EnableMsg.Ids = item.ID;
this.EnableMsg.IsEnable = item.IsEnable;
this.enableGuideCar()
},
enableGuideCar(){
this.lxymallapipost("/api/GuideCar/EnableGuideCarSiteInfo", this.EnableMsg, res => {
if(res.data.resultCode==1){
this.Success(res.data.message)
this.getList()
}
})
},
SetProduct(type){
this.EnableMsg.IsEnable = type;
if(this.EnableMsg.Ids.length==0){
this.Info('请选择站点');
return
}
this.EnableMsg.Ids = this.EnableMsg.Ids.join(",");
this.enableGuideCar()
},
handleSelectionChange(val){
var selectRow = JSON.parse(JSON.stringify(val));
let array= [];
selectRow.forEach(x => {
let obj = {}
obj = x.ID;
array.push(obj)
});
this.EnableMsg.Ids = array
},
getList(){
this.msg.pageIndex = 1
this.getDateList()
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getDateList();
},
},
}
</script>
<style >
@import './css/index.css';
.guideCarSiteList .el-card__header{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
}
.guideCarSiteList .el-button--small{
padding: 9px 15px;
}
.guideCarSiteList .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
margin-left: 20px;
}
.guideCarSiteList .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.guideCarSiteList .content .searchInput{
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width:250px;
}
.guideCarSiteList .content{
background: #fff;
margin-top:10px;
padding: 15px;
box-sizing: border-box;
}
.guideCarSiteList .el-tag{
margin-right: 5px;
}
</style>
/*富文本编辑图片上传配置*/
let locationName = window.location.hostname;
let UploadUrl= locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.20.214:8120";
const uploadConfig = {
action: UploadUrl + "/Upload?filePath=" , // 必填参数 图片上传地址
methods:'POST', // 必填参数 图片上传方式
headers:{}, // 可选参数 设置请求头部
token:'', // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
name:'image', // 必填参数 文件的参数名
size:500, // 可选参数 图片大小,单位为Kb, 1M = 1024Kb
accept:'image/png, image/gif, image/jpeg, image/bmp, image/x-icon' // 可选 可上传的图片格式
};
// toolbar工具栏的工具选项(默认展示全部)
const toolOptions = [
['bold', 'italic', 'underline', 'strike', 'image'], // toggled buttons
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, {'background': [] }],
[{ 'font': [] }],
[{ 'align': [] }],
[{ 'size': ['small', false, 'large', 'huge'] }],
[{ 'list': 'ordered'}, { 'list': 'bullet' }]
];
const handlers = {
image:function image() {
var self =this;
var fileInput =this.container.querySelector('input.ql-image[type=file]');
if (fileInput ===null) {
fileInput =document.createElement('input');
fileInput.setAttribute('type', 'file');
// 设置图片参数名
if (uploadConfig.name) {
fileInput.setAttribute('name', uploadConfig.name);
}
fileInput.setAttribute('accept', uploadConfig.accept);
fileInput.classList.add('ql-image');
// 监听选择文件
fileInput.addEventListener('change', function () {
// 创建formData
var formData =new FormData();
console.log(fileInput.files[0])
let files = [];
files.push(fileInput.files[0]);
formData.append(uploadConfig.name, fileInput.files[0]);
formData.append('object','product');
// 如果需要token且存在token
// 图片上传
var xhr =new XMLHttpRequest();
// 可设置上传图片的格式
xhr.open(uploadConfig.methods, uploadConfig.action, true);
xhr.setRequestHeader('authorization',uploadConfig.token)
// 上传数据成功,会触发
// xhr.onload =function (e) {
//
// if (xhr.status ===200) {
//
// var res =JSON.parse(xhr.responseText);
//
// let length = self.quill.getSelection(true).index;
//
// //这里很重要,你图片上传成功后,img的src需要在这里添加,res.path就是你服务器返回的图片链接。
//
// self.quill.insertEmbed(length, 'image', res.data);
//
// self.quill.setSelection(length +1)
//
// }
//
// fileInput.value =''
//
// };
});
this.container.appendChild(fileInput);
}
fileInput.click();
}
};
export default {
placeholder:'',
theme:'snow', // 主题
modules: {
toolbar: {
container: toolOptions, // 工具栏选项
handlers: handlers// 事件重写
}
}
};
This diff is collapsed.
...@@ -152,9 +152,9 @@ export default { ...@@ -152,9 +152,9 @@ export default {
//google地图图片地址 //google地图图片地址
GoogleMapImageUrl: "http://imgfile.oytour.com", GoogleMapImageUrl: "http://imgfile.oytour.com",
//上传站点 //上传站点
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.1.214:8120", UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.20.214:8120",
//文件站点 //文件站点
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.1.214:8130', ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.20.214:8130',
javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087", javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087",
javaUrlNew: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087", javaUrlNew: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087",
//Java接口本站文件流下载地址 //Java接口本站文件流下载地址
...@@ -1291,6 +1291,73 @@ export default { ...@@ -1291,6 +1291,73 @@ export default {
css = 'default-small' css = 'default-small'
} }
return css; return css;
},
//HTTP提交数据 5-18新的 司导旅行新加的
Vue.prototype.lxymallapipost = function (cmd, msg, successCall, faildCall, isOnline) {
var apiurl = this.domainManager().mallUrl + cmd;
var postData = this.GetNewPostData(cmd, msg, "");
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
}, faildCall)
},
//公用跳转
Vue.prototype.CommonJump = function (path, obj) {
this.$router.push({
name: path,
query: obj
});
}
//获取请求参数
Vue.prototype.GetNewPostData = function (cmd, msg, newCmd) {
if (msg == null || msg == "") {
msg = {}
}
var timestamp = (new Date()).valueOf();
var token = "";
var key = "";
var MallBaseId = 1; //小程序ID
var TenantId = 1; //商户Id
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
let tempLanguage = 0;
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().mlxy_token;
MallBaseId = this.getLocalStorage().LXYMallBaseId;
TenantId = this.getLocalStorage().LXYTenantId;
}
if (localStorage.language && localStorage.language != '') {
if (localStorage.language == "zh-TW") {
tempLanguage = 1;
} else if (localStorage.language == "Japanese") {
tempLanguage = 2;
}
}
var cmdStr = "";
if (newCmd) {
cmdStr = newCmd;
}
var postData = {
msg: msg,
timestamp: timestamp,
token: token,
sign: md5Str,
languageId: tempLanguage,
cmd: cmdStr,
MallBaseId: MallBaseId,
TenantId: TenantId,
}
return postData
} }
} }
} }
...@@ -2528,6 +2528,62 @@ export default { ...@@ -2528,6 +2528,62 @@ export default {
meta: { meta: {
title: '基础设置' title: '基础设置'
}, },
},{
path: '/guideCarSiteList', //司导专区=>站点管理
name: 'guideCarSiteList',
component: resolve => require(['@/components/TravelManager/Lxy/guideCarSiteList'], resolve),
meta: {
title: '站点管理'
},
},{
path: '/addSite', //司导专区=>站点管理
name: 'addSite',
component: resolve => require(['@/components/TravelManager/Lxy/addSite'], resolve),
meta: {
title: '站点管理'
},
},{
path: '/directorGuideList', //司导专区=>导游管理
name: 'directorGuideList',
component: resolve => require(['@/components/TravelManager/Lxy/directorGuideList'], resolve),
meta: {
title: '导游管理'
},
},{
path: '/addGuide', //司导专区=>导游管理
name: 'addGuide',
component: resolve => require(['@/components/TravelManager/Lxy/addGuide'], resolve),
meta: {
title: '导游管理'
},
},{
path: '/directorCarList', //司导专区=>车辆管理
name: 'directorCarList',
component: resolve => require(['@/components/TravelManager/Lxy/directorCarList'], resolve),
meta: {
title: '车辆管理'
},
},{
path: '/addCar', //司导专区=>车辆管理
name: 'addSite',
component: resolve => require(['@/components/TravelManager/Lxy/addCar'], resolve),
meta: {
title: '车辆管理'
},
},{
path: '/directorCarBrandList', //司导专区=>车辆品牌管理
name: 'directorCarBrandList',
component: resolve => require(['@/components/TravelManager/Lxy/directorCarBrandList'], resolve),
meta: {
title: '车辆品牌管理'
},
},{
path: '/addCarBrand', //司导专区=>车辆品牌管理
name: 'addCarBrand',
component: resolve => require(['@/components/TravelManager/Lxy/addCarBrand'], resolve),
meta: {
title: '车辆品牌管理'
},
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment