Commit 7ddf539e authored by 吴春's avatar 吴春

没有什么提交的

parents e3b56bcc 207bb545
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
} }
</script> </script>
<style> <style>
@import "//at.alicdn.com/t/font_635492_tjcw5hoim2.css"; @import "//at.alicdn.com/t/font_635492_t6jc0sd8qcj.css";
@import "./assets/css/Semibold.css"; @import "./assets/css/Semibold.css";
@import "./assets/css/global/config.css"; @import "./assets/css/global/config.css";
@import "./assets/css/fileIcon.css"; @import "./assets/css/fileIcon.css";
......
...@@ -1983,3 +1983,12 @@ div{ ...@@ -1983,3 +1983,12 @@ div{
.__flower_J{ .__flower_J{
left: -135px; left: -135px;
} }
.template_bg_1{
background-color: #f6dc61 !important
}
.template_bg_2{
background-color: #ffc2ca !important
}
.template_bg_3{
background-color: #9cdaff !important
}
\ No newline at end of file
...@@ -239,6 +239,7 @@ ...@@ -239,6 +239,7 @@
} }
._zhuan_msg{ ._zhuan_msg{
font-size: 12px; font-size: 12px;
margin-top:10px;
padding-bottom: 10px; padding-bottom: 10px;
} }
._zhuan_msg span{ ._zhuan_msg span{
...@@ -468,12 +469,6 @@ ...@@ -468,12 +469,6 @@
</div> </div>
</div> </div>
<div class="_right_content" v-for="(son,sindex) in item.AuditRecordList" v-if="son.AuditStatus!=2"> <div class="_right_content" v-for="(son,sindex) in item.AuditRecordList" v-if="son.AuditStatus!=2">
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
<span class="_sm" > <span class="_sm" >
<p class="_name"> <p class="_name">
<span class="_n">{{son.AuditName}}</span> <span class="_n">{{son.AuditName}}</span>
...@@ -481,6 +476,12 @@ ...@@ -481,6 +476,12 @@
<span class="_sn" v-if="son.AuditStatus==2">通过</span> <span class="_sn" v-if="son.AuditStatus==2">通过</span>
<span class="_m" v-if="son.AuditStatus==4">驳回</span> <span class="_m" v-if="son.AuditStatus==4">驳回</span>
</p> </p>
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
</span> </span>
</div> </div>
<textarea v-if="item.SpecialNode!=2||AuditOrRefundMsg.Status=='3'" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea> <textarea v-if="item.SpecialNode!=2||AuditOrRefundMsg.Status=='3'" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea>
...@@ -681,6 +682,12 @@ ...@@ -681,6 +682,12 @@
<p class="_name _mgt_15" v-for="(son,sindex) in item.AuditRecordList"> <p class="_name _mgt_15" v-for="(son,sindex) in item.AuditRecordList">
<span class="_n">{{son.AuditName}}</span> <span class="_n">{{son.AuditName}}</span>
<span class="_sm" v-if="item.Status==1">待审</span> <span class="_sm" v-if="item.Status==1">待审</span>
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
</p> </p>
<textarea v-if="item.SpecialNode!=2||AuditOrRefundMsg.Status=='3'" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea> <textarea v-if="item.SpecialNode!=2||AuditOrRefundMsg.Status=='3'" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea>
<!-- <textarea v-if="AuditOrRefundMsg.Status=='3'&&item.SpecialNode!=0" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea> --> <!-- <textarea v-if="AuditOrRefundMsg.Status=='3'&&item.SpecialNode!=0" class="_textarea" v-model="AuditOrRefundMsg.Description" placeholder="请输入..."></textarea> -->
...@@ -905,16 +912,16 @@ ...@@ -905,16 +912,16 @@
</div> </div>
<div class="_right_content" v-else> <div class="_right_content" v-else>
<div class="_more" v-for="(son,sindex) in item.AuditRecordList"> <div class="_more" v-for="(son,sindex) in item.AuditRecordList">
<p class="_name" v-if="son.AuditStatus==2">{{son.AuditName}}
<span class="_sm">{{item.AuditDescription}}</span>
<span class="_time _time_n">{{son.AduitDate}}</span>
</p>
<template v-if="son.CareOfRemarks"> <template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)"> <div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p> <p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p> <p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div> </div>
</template> </template>
<p class="_name" v-if="son.AuditStatus==2">{{son.AuditName}}
<span class="_sm">{{item.AuditDescription}}</span>
<span class="_time _time_n">{{son.AduitDate}}</span>
</p>
<div class="_right_content" v-if="son.AuditStatus==2"> <div class="_right_content" v-if="son.AuditStatus==2">
<div class="_pp_info"> <div class="_pp_info">
<p>{{son.Remark?son.Remark:'无'}}</p> <p>{{son.Remark?son.Remark:'无'}}</p>
......
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
.w216{ .w216{
width: 216px; width: 216px;
} }
._icon_btn i.icon-tiaozheng{background-color: #1296db;font-size: 16px;}
</style> </style>
<template > <template >
...@@ -506,6 +507,9 @@ ...@@ -506,6 +507,9 @@
<el-tooltip class="item" effect="dark" content="作废" placement="top"> <el-tooltip class="item" effect="dark" content="作废" placement="top">
<i v-if="((msg.Conditon==1 ||msg.Conditon==7) && (item.InOrNotProcess==1 || item.Status==3 || item.Status==0))" class="iconfont icon-quxiao1" @click="financeRemove(item.FrID)"></i> <i v-if="((msg.Conditon==1 ||msg.Conditon==7) && (item.InOrNotProcess==1 || item.Status==3 || item.Status==0))" class="iconfont icon-quxiao1" @click="financeRemove(item.FrID)"></i>
</el-tooltip> </el-tooltip>
<el-tooltip v-if="ActionMenuCode.indexOf('F_Update_TradeDate')!=-1" class="item" content="调整交易日期" placement="top">
<i v-if="msg.Conditon==2 && item.TradeDate" class="iconfont icon-tiaozheng" @click="dialogFormVisible=true,updateMsg.FrID=item.FrID,updateMsg.OTradeDate=item.TradeDate" ></i>
</el-tooltip>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -554,6 +558,32 @@ ...@@ -554,6 +558,32 @@
<button class="hollowFixedBtn" @click="zhuanBox=false">{{$t('pub.cancelBtn')}}</button> <button class="hollowFixedBtn" @click="zhuanBox=false">{{$t('pub.cancelBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="'单号:' + updateMsg.FrID + ' 调整交易日期'" width="400px" :visible.sync="dialogFormVisible" center :before-close="closeChangeMachie" >
<el-form label-width="110px">
<el-form-item label="原交易日期">
<el-date-picker
v-model="updateMsg.OTradeDate"
type="date"
:disabled='true'>
</el-date-picker>
</el-form-item>
<el-form-item label="交易日期">
<el-date-picker
v-model="updateMsg.TradeDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="说明">
<el-input type="textarea" v-model="updateMsg.Description" class="w216"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="hollowFixedBtn" @click="dialogFormVisible=false">取 消</el-button>
<el-button class="normalBtn" type="primary" @click="UpdateTradeDate()">确 定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -595,7 +625,7 @@ export default { ...@@ -595,7 +625,7 @@ export default {
QEndDate:'', QEndDate:'',
QStartDate:'', QStartDate:'',
UpdateBy:'', UpdateBy:'',
Sort:'2', Sort:'2',
}, },
getCompanyMsg:{ // 公司 getCompanyMsg:{ // 公司
RB_Group_Id:'0', RB_Group_Id:'0',
...@@ -620,6 +650,12 @@ export default { ...@@ -620,6 +650,12 @@ export default {
WorkFlowId:0, WorkFlowId:0,
Description:'' Description:''
}, },
updateMsg:{
FrID:0,
OTradeDate:'',
TradeDate:'',
Description:''
},
DataList:[], DataList:[],
GetFinancLogList:[], GetFinancLogList:[],
StatusList:[], StatusList:[],
...@@ -659,8 +695,11 @@ export default { ...@@ -659,8 +695,11 @@ export default {
DepartIDs:'', DepartIDs:'',
zhuanBox:false, zhuanBox:false,
loading2:false, loading2:false,
dialogFormVisible:false,
searchList:[], searchList:[],
minHeight:400, minHeight:400,
//当前登录用户功能权限
ActionMenuCode:''
} }
}, },
created(){ created(){
...@@ -693,6 +732,7 @@ export default { ...@@ -693,6 +732,7 @@ export default {
},mounted(){ },mounted(){
let userInfo=this.getLocalStorage(); let userInfo=this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id= this.employeeMsg.GroupId = this.getDepartmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID this.getCompanyMsg.RB_Group_Id= this.employeeMsg.GroupId = this.getDepartmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID
this.ActionMenuCode=userInfo.ActionMenuCode;
this.DepartIDs = userInfo.RB_Department_Id; this.DepartIDs = userInfo.RB_Department_Id;
this.userId = userInfo.EmployeeId; this.userId = userInfo.EmployeeId;
this.financeinfo_post_GetList(); this.financeinfo_post_GetList();
...@@ -713,6 +753,7 @@ export default { ...@@ -713,6 +753,7 @@ export default {
}, },
zhuanBtn(){ zhuanBtn(){
if(!this.zhuanMsg.AuditEmId) return this.$message.error('请选择转交人'); if(!this.zhuanMsg.AuditEmId) return this.$message.error('请选择转交人');
if(!this.zhuanMsg.Description)return this.$message.error('请填写转交备注');
let msg = []; let msg = [];
msg.push(this.zhuanMsg); msg.push(this.zhuanMsg);
this.apipost("Financial_post_Transfer",msg,res => { this.apipost("Financial_post_Transfer",msg,res => {
...@@ -726,6 +767,23 @@ export default { ...@@ -726,6 +767,23 @@ export default {
} }
},err => {}); },err => {});
}, },
goUrl(){
this.dialogFormVisible = true;
},
UpdateTradeDate(){
if(!this.updateMsg.TradeDate) return this.$message.error('请选择调整后的交易日期');
if(!this.updateMsg.Description) return this.$message.error('请填写说明');
this.apipost("Financial_get_SetTradeDate",this.updateMsg,res => {
if(res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.dialogFormVisible = false;
this.msg.Conditon=2;
this.getPageList();
}else{
this.$message.error(res.data.message);
}
},err => {});
},
remoteMethod(query) { // 转交人模糊查询 remoteMethod(query) { // 转交人模糊查询
if (query !== ''||this.addShow) { if (query !== ''||this.addShow) {
this.loading2 = true; this.loading2 = true;
......
...@@ -232,6 +232,7 @@ ...@@ -232,6 +232,7 @@
} }
._zhuan_msg{ ._zhuan_msg{
font-size: 12px; font-size: 12px;
margin-top:10px;
padding-bottom: 10px; padding-bottom: 10px;
} }
._zhuan_msg span{ ._zhuan_msg span{
...@@ -568,17 +569,17 @@ ...@@ -568,17 +569,17 @@
</p> </p>
<div class="_more _mgt_15" v-for="(son,sindex) in item.AuditRecordList" v-if="son.AuditStatus==2"> <div class="_more _mgt_15" v-for="(son,sindex) in item.AuditRecordList" v-if="son.AuditStatus==2">
<div class="_right_content"> <div class="_right_content">
<p class="_name">
<span class="_n PingFangSC">{{son.AuditName}}</span>
<span class="_sn" v-if="son.AuditStatus==2">通过</span>
<span class="_time _time_n">{{son.AduitDate}}</span>
</p>
<template v-if="son.CareOfRemarks"> <template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)"> <div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p> <p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p> <p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div> </div>
</template> </template>
<p class="_name">
<span class="_n PingFangSC">{{son.AuditName}}</span>
<span class="_sn" v-if="son.AuditStatus==2">通过</span>
<span class="_time _time_n">{{son.AduitDate}}</span>
</p>
<div class="_pp_info" v-if="son.AuditStatus!=1"> <div class="_pp_info" v-if="son.AuditStatus!=1">
<p>{{son.Remark!=''?son.Remark:'无'}}</p> <p>{{son.Remark!=''?son.Remark:'无'}}</p>
<div class="_info_img" v-if="son.Image!=null&&son.AuditStatus==2" > <div class="_info_img" v-if="son.Image!=null&&son.AuditStatus==2" >
...@@ -597,12 +598,6 @@ ...@@ -597,12 +598,6 @@
</div> </div>
<div class="_more _mgt_15" v-for="(son,sindex) in item.AuditRecordList" v-if="son.AuditStatus!=2"> <div class="_more _mgt_15" v-for="(son,sindex) in item.AuditRecordList" v-if="son.AuditStatus!=2">
<div class="_right_content" v-if="item.AuditWay==2&&son.AuditStatus!=2"> <div class="_right_content" v-if="item.AuditWay==2&&son.AuditStatus!=2">
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
<p class="_name"> <p class="_name">
<span class="_n PingFangSC">{{son.AuditName}}</span> <span class="_n PingFangSC">{{son.AuditName}}</span>
<span class="_sn" v-if="son.AuditStatus==2">通过</span> <span class="_sn" v-if="son.AuditStatus==2">通过</span>
...@@ -610,6 +605,12 @@ ...@@ -610,6 +605,12 @@
<span class="_sm" v-else-if="son.AuditStatus==1">待审</span> <span class="_sm" v-else-if="son.AuditStatus==1">待审</span>
<span class="_time _time_n" v-if="item.Status!=1">{{son.AduitDate}}</span> <span class="_time _time_n" v-if="item.Status!=1">{{son.AduitDate}}</span>
</p> </p>
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
<div class="_pp_info" v-if="item.Status!=1"> <div class="_pp_info" v-if="item.Status!=1">
<p>{{son.Remark!=''?son.Remark:'无'}}</p> <p>{{son.Remark!=''?son.Remark:'无'}}</p>
<div class="_info_img" v-if="son.Image!=null&&item.Status!=1" > <div class="_info_img" v-if="son.Image!=null&&item.Status!=1" >
...@@ -626,12 +627,6 @@ ...@@ -626,12 +627,6 @@
</div> </div>
</div> </div>
<div class="_right_content" v-else-if="item.AuditWay==3 && son.AuditStatus==1"> <div class="_right_content" v-else-if="item.AuditWay==3 && son.AuditStatus==1">
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
<p class="_name"> <p class="_name">
<span class="_n PingFangSC">{{son.AuditName}}</span> <span class="_n PingFangSC">{{son.AuditName}}</span>
<span class="_sm" v-if="item.Status==2 && item.Sort!=0">通过</span> <span class="_sm" v-if="item.Status==2 && item.Sort!=0">通过</span>
...@@ -639,6 +634,12 @@ ...@@ -639,6 +634,12 @@
<span class="_sm _left_radius_sus" v-else-if="son.AuditStatus==1">待审</span> <span class="_sm _left_radius_sus" v-else-if="son.AuditStatus==1">待审</span>
<span class="_time _time_n" v-if="item.Status!=1">{{son.AduitDate}}</span> <span class="_time _time_n" v-if="item.Status!=1">{{son.AduitDate}}</span>
</p> </p>
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
<div class="_pp_info" v-if="item.Status!=1"> <div class="_pp_info" v-if="item.Status!=1">
<p>{{son.Remark!=''?son.Remark:'无'}}</p> <p>{{son.Remark!=''?son.Remark:'无'}}</p>
<div class="_info_img" v-if="son.Image!=null&&item.Status!=1" > <div class="_info_img" v-if="son.Image!=null&&item.Status!=1" >
...@@ -655,12 +656,6 @@ ...@@ -655,12 +656,6 @@
</div> </div>
</div> </div>
<div class="_right_content" v-else-if="item.AuditWay==3 && son.AuditStatus==4"> <div class="_right_content" v-else-if="item.AuditWay==3 && son.AuditStatus==4">
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
<p class="_name"> <p class="_name">
<span class="_n PingFangSC">{{son.AuditName}}</span> <span class="_n PingFangSC">{{son.AuditName}}</span>
<span class="_sm" v-if="item.Status==2 && item.Sort!=0">通过</span> <span class="_sm" v-if="item.Status==2 && item.Sort!=0">通过</span>
...@@ -668,6 +663,12 @@ ...@@ -668,6 +663,12 @@
<span class="_sm _left_radius_sus" v-else-if="son.AuditStatus==1">待审</span> <span class="_sm _left_radius_sus" v-else-if="son.AuditStatus==1">待审</span>
<span class="_time _time_n" v-if="item.Status!=1">{{son.AduitDate}}</span> <span class="_time _time_n" v-if="item.Status!=1">{{son.AduitDate}}</span>
</p> </p>
<template v-if="son.CareOfRemarks">
<div class="_zhuan_msg" v-for="(z,zIndex) in JSON.parse(son.CareOfRemarks)">
<p><span></span>{{z.BeFrom}}<span><i class="_color_green">转交</i></span>{{z.Target}}</p>
<p class="_pp_info">转交备注:{{z.Remarks?z.Remarks:'无'}}</p>
</div>
</template>
<div class="_pp_info" v-if="item.Status!=1"> <div class="_pp_info" v-if="item.Status!=1">
<p>{{son.Remark!=''?son.Remark:'无'}}</p> <p>{{son.Remark!=''?son.Remark:'无'}}</p>
<div class="_info_img" v-if="son.Image!=null&&item.Status!=1" > <div class="_info_img" v-if="son.Image!=null&&item.Status!=1" >
......
...@@ -142,9 +142,9 @@ ...@@ -142,9 +142,9 @@
</script> </script>
<style> <style>
._bank_type{background-color: #2AAEF2} .workTotalSearch ._bank_type{background-color: #2AAEF2}
._bank_type2{background-color: #FF9C01} ._bank_type2{background-color: #FF9C01}
._bank_name,._bank_type{display: inline-block;background-color: #333333;color: white;padding: 2px 4px;border-radius: 4px;margin-left:10px;} .workTotalSearch ._bank_name,.workTotalSearch ._bank_type{display: inline-block;background-color: #333333;color: white;padding: 2px 4px;border-radius: 4px;margin-left:10px;}
._fex_cen{display: flex;align-items: center} ._fex_cen{display: flex;align-items: center}
.workTotalSearch{width: 100%; min-height: auto; padding:0 0 20px 0;} .workTotalSearch{width: 100%; min-height: auto; padding:0 0 20px 0;}
.workTotalSearch li{float: left; font-size: 12px; color: #666; margin:20px 10px 0px 0;} .workTotalSearch li{float: left; font-size: 12px; color: #666; margin:20px 10px 0px 0;}
......
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
<div class="zidingyi" v-if="showType==3&&loadNone==false&&vshowC"> <div class="zidingyi" v-if="showType==3&&loadNone==false&&vshowC">
<div v-html="feature.featureContent"></div> <div v-html="feature.featureContent"></div>
</div> </div>
<div class="template-box" v-if="(showType==4||showType==5)&&loadNone==false&&vshowC"> <div class="template-box" v-if="(showType>=4)&&loadNone==false&&vshowC">
<div v-if="vshowC" class="module-title"> <div v-if="vshowC" class="module-title">
<h2>行程特色</h2> <h2>行程特色</h2>
<div class="short-line"></div> <div class="short-line"></div>
...@@ -648,7 +648,7 @@ ...@@ -648,7 +648,7 @@
let tcid = this.$route.query.tcid; let tcid = this.$route.query.tcid;
let UploadUrl = this.domainManager().UploadUrl let UploadUrl = this.domainManager().UploadUrl
let _this = this let _this = this
if (this.showType===4 || this.showType===5) { // 判断是否为行程特色 if (this.showType>=4) { // 判断是否为行程特色
$.ajax({ //调用是否已经存在文件夹接口判断是否进行上传图片操作 $.ajax({ //调用是否已经存在文件夹接口判断是否进行上传图片操作
url: UploadUrl + '/Upload/GetImage?filePath=Feature/' + tcid, url: UploadUrl + '/Upload/GetImage?filePath=Feature/' + tcid,
type: "POST", type: "POST",
...@@ -658,7 +658,6 @@ ...@@ -658,7 +658,6 @@
if (msg.ResultCode) { // 已经存在文件 直接调用下载 if (msg.ResultCode) { // 已经存在文件 直接调用下载
_this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + '日游',isPc) _this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + '日游',isPc)
} else { // 不存在图片保存图片后下载 } else { // 不存在图片保存图片后下载
console.log(document.querySelector("#gernalCanvas").querySelectorAll('img').length)
if (document.querySelector("#gernalCanvas").querySelectorAll('img').length === 0) { if (document.querySelector("#gernalCanvas").querySelectorAll('img').length === 0) {
_this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + '日游',isPc) _this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + '日游',isPc)
return return
...@@ -674,7 +673,7 @@ ...@@ -674,7 +673,7 @@
let cName='' let cName=''
if(_this.showType==4){ if(_this.showType==4){
cName='.feature-box' cName='.feature-box'
}else if(_this.showType==5){ }else if(_this.showType>4){
cName='.travle_page' cName='.travle_page'
} }
if(cName!=''){ if(cName!=''){
...@@ -942,6 +941,8 @@ ...@@ -942,6 +941,8 @@
isShowVisa:this.vshowH?1:0, isShowVisa:this.vshowH?1:0,
//isPc是否PC下载 //isPc是否PC下载
isPc: isPc, isPc: isPc,
//模板参数
templateId: this.showType,
}; };
this.GetLocalFile("DownLoadTripWord", msg,title+ ".doc", res=>{ this.GetLocalFile("DownLoadTripWord", msg,title+ ".doc", res=>{
this.pdfLoading = false this.pdfLoading = false
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
</div> --> </div> -->
<new-feature ref='newFeature' :data='FeatureData'></new-feature> <new-feature ref='newFeature' :data='FeatureData'></new-feature>
</div> </div>
<div v-if="FeatureData.FeatureType===FeatureTypeState.travelSpecial2 && FeatureDataFlag"> <div v-if="(FeatureData.FeatureType===FeatureTypeState.travelSpecial2 || FeatureData.FeatureType===6 || FeatureData.FeatureType===7) && FeatureDataFlag">
<!--<newFeature2 ref='newFeature2' :data='FeatureData'></newFeature2>--> <!--<newFeature2 ref='newFeature2' :data='FeatureData'></newFeature2>-->
<newFeature2 ref='newFeature2' :FeatureData='FeatureData'></newFeature2> <newFeature2 ref='newFeature2' :FeatureData='FeatureData'></newFeature2>
</div> </div>
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
nineGrid: 2, nineGrid: 2,
userDefined: 3, userDefined: 3,
travelSpecial: 4, travelSpecial: 4,
travelSpecial2: 5 travelSpecial2: 5,
}, },
TypeArray: [{ TypeArray: [{
ckTitle: "自定义", ckTitle: "自定义",
...@@ -249,27 +249,40 @@ ...@@ -249,27 +249,40 @@
TypeState: 4 TypeState: 4
}, },
{ {
ckTitle: "行程特色2", ckTitle: "行程特色-黄",
isShow: false, isShow: false,
imgUrl: Travelslider, imgUrl: Travelslider,
TypeState: 5 TypeState: 5
},
{
ckTitle: "行程特色-粉",
isShow: false,
imgUrl: Travelslider,
TypeState: 6
},
{
ckTitle: "行程特色-蓝",
isShow: false,
imgUrl: Travelslider,
TypeState: 7
} }
], //tab数组 ], //tab数组
templateColorArray:[ templateColorArray:[
{ {
id: 1, id: 1,
color: 'yellow', color: 'yellow',
text: '黄色' text: '土黄黄'
}, },
{ {
id: 2, id: 2,
color: 'pink', color: 'pink',
text: '粉色' text: '樱桃粉'
}, },
{ {
id: 3, id: 3,
color: 'blue', color: 'blue',
text: '蓝色' text: '水蓝蓝'
}, },
], ],
travelsList: [], travelsList: [],
...@@ -383,7 +396,6 @@ ...@@ -383,7 +396,6 @@
} }
setTimeout(() => { setTimeout(() => {
try { try {
FeatureData.FeatureHtml = document.getElementById("newFeatureBox").innerHTML; FeatureData.FeatureHtml = document.getElementById("newFeatureBox").innerHTML;
} catch (err) { } catch (err) {
} }
...@@ -473,7 +485,7 @@ ...@@ -473,7 +485,7 @@
//切换tab事件 //切换tab事件
clickFeature(item) { clickFeature(item) {
let state = this.FeatureData.FeatureType let state = this.FeatureData.FeatureType
if (state === 4 && item.TypeState === 5) { if ((state === 4 && item.TypeState === 5) || (state === 4 && item.TypeState === 6) || (state === 4 && item.TypeState === 7)) {
this.$confirm('尊敬的用户,行程特色“1”切换为行程特色“2”将会清空行程特色“1”里面的所有内容,您确定切换吗?', { this.$confirm('尊敬的用户,行程特色“1”切换为行程特色“2”将会清空行程特色“1”里面的所有内容,您确定切换吗?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
......
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
<!-- 酒店1 --> <!-- 酒店1 -->
<div class="travel_hotel_1" v-if="item === 0 && hotelObj.list!=null && hotelObj.list.length>0"> <div class="travel_hotel_1" v-if="item === 0 && hotelObj.list!=null && hotelObj.list.length>0">
<div class="hotel_1_header"> <div class="hotel_1_header">
<img class="hotel_1_header_bg" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/top-1.jpg"> <img class="hotel_1_header_bg" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_top_${templateType}.jpg`">
<img class="hotel_1_header_bg2" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/title-1.png"> <img class="hotel_1_header_bg2" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_title1_${templateType}.jpg`">
<div class="hotel_1_header_title"> <div class="hotel_1_header_title">
<div> <div>
<vEditDiv :canEdit='canEdit' v-model="hotelObj.title.first"></vEditDiv> <vEditDiv :canEdit='canEdit' v-model="hotelObj.title.first"></vEditDiv>
</div> </div>
<div> <div>
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-5.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_5.jpg`">
<vEditDiv :canEdit='canEdit' v-model="hotelObj.title.second"></vEditDiv> <vEditDiv :canEdit='canEdit' v-model="hotelObj.title.second"></vEditDiv>
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-4.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_4.jpg`">
</div> </div>
</div> </div>
</div> </div>
...@@ -93,13 +93,13 @@ ...@@ -93,13 +93,13 @@
</div> </div>
</div> </div>
<div class="hotel_1_info_1_info"> <div class="hotel_1_info_1_info">
<img class="__flower" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/bg1.png"> <img class="__flower" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_bg_${templateType}.jpg`">
<div class="hotel_1_info_1_info_left"> <div class="hotel_1_info_1_info_left">
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-1.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_1.jpg`">
<div></div> <div :class="`template_bg_${templateType}`"></div>
</div> </div>
<div class="hotel_1_info_1_info_right"> <div class="hotel_1_info_1_info_right">
<div><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].name"></vEditDiv></div>
<div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].Ename"></vEditDiv></div> <div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].Ename"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].description"></vEditDiv></div>
</div> </div>
...@@ -206,11 +206,11 @@ ...@@ -206,11 +206,11 @@
</div> </div>
</div> </div>
<div class="hotel_1_info_2_bottom_left"> <div class="hotel_1_info_2_bottom_left">
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-1.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_1.jpg`">
<div></div> <div :class="`template_bg_${templateType}`"></div>
</div> </div>
<div class="hotel_1_info_2_bottom_right"> <div class="hotel_1_info_2_bottom_right">
<div><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2+1].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2+1].name"></vEditDiv></div>
<div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2+1].Ename"></vEditDiv></div> <div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2+1].Ename"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2+1].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2+1].description"></vEditDiv></div>
</div> </div>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
@toDelete="bolckToDelete"> @toDelete="bolckToDelete">
</vToolBar> </vToolBar>
</div> </div>
<img class="hotel_2_info_1_bg" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/top-2.jpg"> <img class="hotel_2_info_1_bg" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_top2_${templateType}.jpg`">
<div class="hotel_2_info_1_content"> <div class="hotel_2_info_1_content">
<div><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].name"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].name"></vEditDiv></div>
<div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].Ename"></vEditDiv></div> <div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="hotelObj.list[item*2].Ename"></vEditDiv></div>
...@@ -374,7 +374,7 @@ ...@@ -374,7 +374,7 @@
</div> </div>
</div> </div>
<div class="hotel_2_info_2_top_left"> <div class="hotel_2_info_2_top_left">
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-1.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_1.jpg`">
<div></div> <div></div>
</div> </div>
<div class="hotel_2_info_2_top_right"> <div class="hotel_2_info_2_top_right">
...@@ -445,8 +445,8 @@ ...@@ -445,8 +445,8 @@
<!-- 景点1 --> <!-- 景点1 -->
<div class="travel_viewSpot_1" v-if="item === 0"> <div class="travel_viewSpot_1" v-if="item === 0">
<div class="viewSpot_1_header"> <div class="viewSpot_1_header">
<img class="viewSpot_1_header_bg" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/top-1.jpg"> <img class="viewSpot_1_header_bg" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_top_${templateType}.jpg`">
<img class="viewSpot_1_header_bg2" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/title-3.jpg"> <img class="viewSpot_1_header_bg2" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_title2_${templateType}.jpg`">
<div class="viewSpot_1_header_title"> <div class="viewSpot_1_header_title">
<div> <div>
<div>看见</div> <div>看见</div>
...@@ -454,9 +454,9 @@ ...@@ -454,9 +454,9 @@
<div>之美</div> <div>之美</div>
</div> </div>
<div> <div>
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-5.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_5.jpg`">
<div>放慢旅途步伐·畅游自在假期</div> <div>放慢旅途步伐·畅游自在假期</div>
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-4.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_4.jpg`">
</div> </div>
</div> </div>
</div> </div>
...@@ -506,13 +506,13 @@ ...@@ -506,13 +506,13 @@
</div> </div>
</div> </div>
<div class="viewSpot_1_info_1_info"> <div class="viewSpot_1_info_1_info">
<img class="__flower __flower_J" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/bg1.png"> <img class="__flower __flower_J" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_bg_${templateType}.jpg`">
<div class="viewSpot_1_info_1_info_left"> <div class="viewSpot_1_info_1_info_left">
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-3.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_3.jpg`">
<div></div> <div :class="`template_bg_${templateType}`"></div>
</div> </div>
<div class="viewSpot_1_info_1_info_right"> <div class="viewSpot_1_info_1_info_right">
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4].name"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4].description"></vEditDiv></div>
</div> </div>
</div> </div>
...@@ -597,11 +597,11 @@ ...@@ -597,11 +597,11 @@
</div> </div>
</div> </div>
<div class="viewSpot_1_info_2_bottom_left"> <div class="viewSpot_1_info_2_bottom_left">
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-3.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_3.jpg`">
<div></div> <div :class="`template_bg_${templateType}`"></div>
</div> </div>
<div class="viewSpot_1_info_2_bottom_right"> <div class="viewSpot_1_info_2_bottom_right">
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].name"></vEditDiv></div>
<div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].Ename"></vEditDiv></div> <div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].Ename"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].description"></vEditDiv></div>
</div> </div>
...@@ -631,11 +631,11 @@ ...@@ -631,11 +631,11 @@
</div> </div>
<div class="viewSpot_2_info_1_info"> <div class="viewSpot_2_info_1_info">
<div class="viewSpot_2_info_1_info_left"> <div class="viewSpot_2_info_1_info_left">
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-3.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_3.jpg`">
<div></div> <div :class="`template_bg_${templateType}`"></div>
</div> </div>
<div class="viewSpot_2_info_1_info_right"> <div class="viewSpot_2_info_1_info_right">
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4-2].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4-2].name"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4-2].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4-2].description"></vEditDiv></div>
</div> </div>
</div> </div>
...@@ -722,15 +722,15 @@ ...@@ -722,15 +722,15 @@
</div> </div>
<div class="viewSpot_2_info_2"> <div class="viewSpot_2_info_2">
<div class="viewSpot_2_info_2_info_1" v-if="viewSpotObj.list[item*4-1]"> <div class="viewSpot_2_info_2_info_1" v-if="viewSpotObj.list[item*4-1]">
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4-1].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4-1].name"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4-1].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4-1].description"></vEditDiv></div>
</div> </div>
<div class="viewSpot_2_info_2_info_2" v-if="viewSpotObj.list[item*4]"> <div class="viewSpot_2_info_2_info_2" v-if="viewSpotObj.list[item*4]">
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4].name"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4].description"></vEditDiv></div>
</div> </div>
<div class="viewSpot_2_info_2_info_3" v-if="viewSpotObj.list[item*4+1]"> <div class="viewSpot_2_info_2_info_3" v-if="viewSpotObj.list[item*4+1]">
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].name"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="viewSpotObj.list[item*4+1].description"></vEditDiv></div>
</div> </div>
<div class="viewSpot_2_info_2_img" v-if="viewSpotObj.list[item*4-1]"> <div class="viewSpot_2_info_2_img" v-if="viewSpotObj.list[item*4-1]">
...@@ -883,8 +883,8 @@ ...@@ -883,8 +883,8 @@
<div class="travle_page" v-for="(item, index) in restaurantObj.pageList" :key="'restaurant'+index" v-if="restaurantObj.list.length>0"> <div class="travle_page" v-for="(item, index) in restaurantObj.pageList" :key="'restaurant'+index" v-if="restaurantObj.list.length>0">
<div class="travel_restaurant_1"> <div class="travel_restaurant_1">
<div class="restaurant_1_header" v-if="item === 0"> <div class="restaurant_1_header" v-if="item === 0">
<img class="restaurant_1_header_bg" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/top-1.jpg"> <img class="restaurant_1_header_bg" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_top_${templateType}.jpg`">
<img class="restaurant_1_header_bg2" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/title-3.jpg"> <img class="restaurant_1_header_bg2" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_title3_${templateType}.jpg`">
<div class="restaurant_1_header_title"> <div class="restaurant_1_header_title">
<div> <div>
<div>品尝</div> <div>品尝</div>
...@@ -892,9 +892,9 @@ ...@@ -892,9 +892,9 @@
<div>之味</div> <div>之味</div>
</div> </div>
<div> <div>
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-5.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_5.jpg`">
<div>特色美味,征服你的味蕾</div> <div>特色美味,征服你的味蕾</div>
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-4.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_4.jpg`">
</div> </div>
</div> </div>
</div> </div>
...@@ -944,13 +944,13 @@ ...@@ -944,13 +944,13 @@
</div> </div>
</div> </div>
<div class="restaurant_1_info_1_info"> <div class="restaurant_1_info_1_info">
<img class="__flower __flower_J" src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/bg1.png"> <img class="__flower __flower_J" :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_bg_${templateType}.jpg`">
<div class="restaurant_1_info_1_info_left"> <div class="restaurant_1_info_1_info_left">
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-2.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_2.jpg`">
<div></div> <div :class="`template_bg_${templateType}`"></div>
</div> </div>
<div class="restaurant_1_info_1_info_right"> <div class="restaurant_1_info_1_info_right">
<div><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2].name"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2].description"></vEditDiv></div>
</div> </div>
</div> </div>
...@@ -1059,11 +1059,11 @@ ...@@ -1059,11 +1059,11 @@
</div> </div>
<div class="restaurant_1_info_2_right_bottom"> <div class="restaurant_1_info_2_right_bottom">
<div class="restaurant_1_info_2_right_bottom_left"> <div class="restaurant_1_info_2_right_bottom_left">
<img src="https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/PictureMaterial/Web/icon-2.png"> <img :src="`https://reborndev.oss-cn-hangzhou.aliyuncs.com/Upload/BackgroundImg/featurebg/template_icon_2.jpg`">
<div></div> <div :class="`template_bg_${templateType}`"></div>
</div> </div>
<div class="restaurant_1_info_2_right_bottom_right"> <div class="restaurant_1_info_2_right_bottom_right">
<div><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2+1].name"></vEditDiv></div> <div :class="`template_bg_${templateType}`"><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2+1].name"></vEditDiv></div>
<div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2+1].Ename"></vEditDiv></div> <div class="hotel_1_info_1_info_right_Ename"><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2+1].Ename"></vEditDiv></div>
<div><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2+1].description"></vEditDiv></div> <div><vEditDiv :canEdit='canEdit' v-model="restaurantObj.list[item*2+1].description"></vEditDiv></div>
</div> </div>
...@@ -1157,6 +1157,7 @@ ...@@ -1157,6 +1157,7 @@
ReadOnly: false, ReadOnly: false,
jsonTravelFeature2:null, jsonTravelFeature2:null,
theFirstTime: true, theFirstTime: true,
templateType: "1"
} }
}, },
methods: { methods: {
...@@ -1873,6 +1874,19 @@ ...@@ -1873,6 +1874,19 @@
canEditChange: function (val) { canEditChange: function (val) {
this.canEdit = val; this.canEdit = val;
this.$forceUpdate() this.$forceUpdate()
},
setTemplateType: function () {
switch (this.FeatureData.FeatureType) {
case 5:
this.templateType = "1";
break;
case 6:
this.templateType = "2";
break;
case 7:
this.templateType = "3";
break;
}
} }
}, },
computed: { computed: {
...@@ -1897,9 +1911,27 @@ ...@@ -1897,9 +1911,27 @@
} }
}, },
deep: true deep: true
},
"FeatureData.FeatureType":{
handler: function (val, oldVal) {
if (val !== oldVal)
this.setTemplateType()
},
deep: true
} }
}, },
mounted: function () { mounted: function () {
switch (this.FeatureData.FeatureType) {
case 5:
this.templateType = "1";
break;
case 6:
this.templateType = "2";
break;
case 7:
this.templateType = "3";
break;
}
this.MsgBus.$on('saveTravel', (val)=> { this.MsgBus.$on('saveTravel', (val)=> {
this.ReadOnly = val; this.ReadOnly = val;
this.theFirstTime = true; this.theFirstTime = true;
......
...@@ -4,835 +4,837 @@ import co from 'co' ...@@ -4,835 +4,837 @@ import co from 'co'
import OSS from 'ali-oss' import OSS from 'ali-oss'
import MsgBus from '../assets/utils/msgBus' import MsgBus from '../assets/utils/msgBus'
export default { export default {
data: { data: {
loginUser: {}, loginUser: {},
apiurl: '' apiurl: ''
}, },
install(Vue, options) { install(Vue, options) {
Vue.prototype.MsgBus = MsgBus; Vue.prototype.MsgBus = MsgBus;
Vue.prototype.md5 = md5; Vue.prototype.md5 = md5;
Vue.prototype.orderBy = function(source, orders, type) { Vue.prototype.orderBy=function(source, orders, type) {
if ( if (
source instanceof Array && source instanceof Array &&
orders instanceof Array && orders instanceof Array &&
orders.length > 0 orders.length > 0
) { ) {
var ordersc = orders.concat([]); var ordersc = orders.concat([]);
var sorttype = type || "asc"; var sorttype = type || "asc";
var results = []; var results = [];
var totalSum = {}; var totalSum = {};
function grouporder(source, orders, totalSum) { function grouporder(source, orders, totalSum) {
source.sort(function(a, b) { source.sort(function(a, b) {
var convertA = a[orders[0]]; var convertA = a[orders[0]];
var convertB = b[orders[0]]; var convertB = b[orders[0]];
if (typeof convertA == "string" && typeof convertB == "string") { if (typeof convertA == "string" && typeof convertB == "string") {
if (sorttype.toUpperCase() == "ASC") { if (sorttype.toUpperCase() == "ASC") {
return convertA.localeCompare(convertB); return convertA.localeCompare(convertB);
} else { } else {
return convertB.localeCompare(convertA); return convertB.localeCompare(convertA);
} }
} else { } else {
if (sorttype.toUpperCase() == "ASC") { if (sorttype.toUpperCase() == "ASC") {
return convertA - convertB; return convertA - convertB;
} else { } else {
return convertB - convertA; return convertB - convertA;
} }
} }
}); });
var groupmap = new Map(); var groupmap = new Map();
source.forEach(item => { source.forEach(item => {
if (groupmap.has(item[orders[0]])) { if (groupmap.has(item[orders[0]])) {
groupmap.get(item[orders[0]]).push(item); groupmap.get(item[orders[0]]).push(item);
} else { } else {
groupmap.set(item[orders[0]], []); groupmap.set(item[orders[0]], []);
groupmap.get(item[orders[0]]).push(item); groupmap.get(item[orders[0]]).push(item);
} }
}); });
orders.shift(); orders.shift();
for (let [key, val] of groupmap) { for (let [key, val] of groupmap) {
totalSum[key] = {}; totalSum[key] = {};
totalSum[key].name = key; totalSum[key].name = key;
totalSum[key].value = val.length; totalSum[key].value = val.length;
if (orders.length == 0) { if (orders.length == 0) {
results = results.concat(val); results = results.concat(val);
} else { } else {
totalSum[key].children = {}; totalSum[key].children = {};
var orderscopy = orders.concat([]); var orderscopy = orders.concat([]);
grouporder(val, orderscopy, totalSum[key].children); grouporder(val, orderscopy, totalSum[key].children);
} }
} }
} }
grouporder(source, ordersc, totalSum); grouporder(source, ordersc, totalSum);
return { return {
results: results, results: results,
totalSum: totalSum totalSum: totalSum
}; };
} else { } else {
return source; return source;
} }
}, },
Vue.prototype.calcPageSize = function(itemHeight) { Vue.prototype.calcPageSize=function(itemHeight){
let yuHeight = itemHeight let yuHeight=itemHeight
try { try {
let obj = null let obj=null
document.querySelectorAll('.frame-box').forEach(x => { document.querySelectorAll('.frame-box').forEach(x=>{
if (x.style.display != 'none') { if(x.style.display!='none'){
obj = x obj=x
} }
}) })
let dom = obj.offsetHeight let dom=obj.offsetHeight
yuHeight = dom - (obj.querySelector('.v-table-header') ? obj.querySelector('.v-table-header').offsetHeight : 39) - 50 //减去面包屑,减去表格头部,减去分页,减去偏量 yuHeight=dom-(obj.querySelector('.v-table-header')?obj.querySelector('.v-table-header').offsetHeight:39)-50//减去面包屑,减去表格头部,减去分页,减去偏量
//减去其它同级元素 //减去其它同级元素
obj.childNodes[0].childNodes.forEach(x => { obj.childNodes[0].childNodes.forEach(x=>{
if (x.className && x.className.indexOf('v-table-views') == -1) { if(x.className && x.className.indexOf('v-table-views')==-1){
yuHeight -= x.offsetHeight ? x.offsetHeight : 0 yuHeight-=x.offsetHeight?x.offsetHeight:0
} }
}) })
} catch (error) { console.log(error) } } catch (error) {console.log(error)}
return Math.floor(yuHeight / itemHeight) return Math.floor(yuHeight/itemHeight)
}
Vue.prototype.random_string = function (len) {
len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
var maxPos = chars.length;
var pwd = '';
for (let i = 0; i < len; i++) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
},
//是否是线上环境【发布时修改为true】
Vue.prototype.isOnline = function () {
return process.env.NODE_ENV !== 'development';
},
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = '';
let locationName = window.location.hostname;
domainUrl = "http://127.0.0.1"; //214主域名
// 127.0.0.12
// domainUrl = "http://192.168.2.88"; //王悦主域名
// domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.16:8083"; //王悦主域名
// domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.65:8025"; //吴春主域名
// domainUrl = "http://192.168.2.106:8082"; //罗超主域名
if (locationName.indexOf('oytour')!==-1) {
domainUrl = "https://reborn.oytour.com";
}else if (locationName.indexOf('viitto')!==-1) {
domainUrl = "https://test.viitto.com";
}
var obj = {
//主地址
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
//上传文件URL
UploadFileUrl: domainUrl + '/api/File/post',
//本站模板文件下载地址
LocalTemplateFileDownLoadUrl: domainUrl,
//阿里服务器地址
AliUrl: "https://reborndev.oss-cn-hangzhou.aliyuncs.com",
//本站文件流下载地址
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
//PDF文件预览地址
PDFViewUrl: domainUrl + "/plug/pdf/web/viewer.html?file=",
//SocketUrl
WebSocketUrl: "ws://192.168.1.110:8080?account=",
//google地图Url
GoogleMapUrl: "http://ditu.google.cn/maps/api/js?key=AIzaSyAZ5MIfzicStzKbIkbI3RcBBeZBjQFKsp0&sensor=false&language=zh-CN",
//google地图图片地址
GoogleMapImageUrl: "http://super.oytour.com",
// "http://upload.oytour.com"
UploadUrl: locationName.indexOf('oytour') !== -1 ? "http://upload.oytour.com" : "http://127.0.0.1:8120",
// 读取文件
ViittoFileUrl:'http://imgfile.oytour.com'
// UploadUrl: "http://upload.oytour.com"
};
return obj;
},
Vue.prototype.yinyanFn = function (url, successCall, faildCall) {
this.$http.jsonp(url, )
.then(res => {
successCall(res)
}, faildCall)
},
//消息成功提示
Vue.prototype.Success = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "success"
});
},
//错误提示
Vue.prototype.Error = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "error"
});
},
//一般提示
Vue.prototype.Info = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "info"
});
},
//警告提示
Vue.prototype.Warning = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "warning"
});
},
//Confirm
Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
if (typeof callback === 'function') {
callback();
} }
Vue.prototype.random_string = function(len) { })
len = len || 32; .catch(() => {
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; this.Info("已取消操作");
var maxPos = chars.length; });
var pwd = ''; },
for (let i = 0; i < len; i++) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos)); //打开新窗口连接
} Vue.prototype.OpenNewUrl = function (URL) {
return pwd; if (URL != '') {
}, window.open('http://' + URL, '_blank');
//是否是线上环境【发布时修改为true】 }
Vue.prototype.isOnline = function() { }
return process.env.NODE_ENV !== 'development';
}, Vue.prototype.uploadImg = function (tcID, msg, successCall, faildCall) {
//域名管理对象 var apiurl = this.domainManager().Upload + '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Freature/TCID' + tcID;
Vue.prototype.domainManager = function() { this.$http.post(apiurl, msg, {
let domainUrl = ''; datatype:"jsonP",
let locationName = window.location.hostname; }).then(res => {
// domainUrl = "http://127.0.0.1"; //214主域名 successCall(res);
// 127.0.0.12 }, faildCall)
// domainUrl = "http://192.168.2.88"; //王悦主域名 }
// domainUrl = "http://127.0.0.1"; //214主域名 //HTTP提交数据
// domainUrl = "http://192.168.2.16:8083"; //王悦主域名 Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
// domainUrl = "http://127.0.0.1"; //214主域名 if (msg == null || msg == "") {
domainUrl = "http://192.168.2.65:8025"; //吴春主域名 msg = {}
// domainUrl = "http://192.168.2.106:8082"; //罗超主域名 }
if (locationName.indexOf('oytour') !== -1) { var apiurl = this.domainManager().PostUrl;
domainUrl = "https://reborn.oytour.com"; var timestamp = (new Date()).valueOf();
} else if (locationName.indexOf('viitto') !== -1) { this.apiurl = apiurl;
domainUrl = "https://test.viitto.com"; if (this.$route.path.toLowerCase() == "/signature") {
} this.$router.push({
var obj = { path: '/signature'
//主地址 })
DomainUrl: domainUrl, } else {
//常用提交数据URL if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
PostUrl: domainUrl + "/api/common/post", this.$router.push({
//上传文件URL path: '/login'
UploadFileUrl: domainUrl + '/api/File/post', })
//本站模板文件下载地址 }
LocalTemplateFileDownLoadUrl: domainUrl, }
//阿里服务器地址 var token = "";
AliUrl: "https://reborndev.oss-cn-hangzhou.aliyuncs.com", var key = "";
//本站文件流下载地址 if (this.getLocalStorage() != null) {
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi", token = this.getLocalStorage().token;
//PDF文件预览地址 key = this.getLocalStorage().SecretKey;
PDFViewUrl: domainUrl + "/plug/pdf/web/viewer.html?file=", }
//SocketUrl var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
WebSocketUrl: "ws://192.168.1.110:8080?account=", var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
//google地图Url var postData = {
GoogleMapUrl: "http://ditu.google.cn/maps/api/js?key=AIzaSyAZ5MIfzicStzKbIkbI3RcBBeZBjQFKsp0&sensor=false&language=zh-CN", "msg": msg,
//google地图图片地址 "cmd": cmd,
GoogleMapImageUrl: "http://super.oytour.com", "timestamp": timestamp,
// "http://upload.oytour.com" "token": token,
UploadUrl: locationName.indexOf('oytour') !== -1 ? "http://upload.oytour.com" : "http://127.0.0.1:8120" "sign": md5Str
// UploadUrl: "http://upload.oytour.com" }
}; this.$http.post(apiurl, postData, {
return obj; headers: {
}, 'Content-Type': 'application/json',
Vue.prototype.yinyanFn = function(url, successCall, faildCall) { 'Referer-Viitto': this.$route.path
this.$http.jsonp(url, ) }
.then(res => { })
successCall(res) .then(res => {
}, faildCall) if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
}, this.$router.push({
//消息成功提示 path: '/login'
Vue.prototype.Success = function(msg) { });
this.$message({ } else if (res.resultCode == 10005) {
message: msg, this.$router.go(-1);
duration: 2000, } else {
type: "success" successCall(res);
}); }
}, }, faildCall)
//错误提示 },
Vue.prototype.Error = function(msg) {
this.$message({ //下载文件
message: msg, Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
duration: 2000, var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
type: "error" var timestamp = (new Date()).valueOf();
}); if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
}, this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().SecretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
}
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function (res) {});
},
Vue.prototype.getCookieItem = function () {
return JSON.parse(this.getCookie("userInfo"))
},
Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["userInfo"];
if (localStorageData !== undefined && localStorageData!='undefined') {
return JSON.parse(localStorageData);
} else {
return null;
}
},
Vue.prototype.getCookie = function (cookieName) {
var strCookie = document.cookie;
var arrCookie = strCookie.split("; ");
for (var i = 0; i < arrCookie.length; i++) {
var arr = arrCookie[i].split("=");
if (cookieName == arr[0]) {
return arr[1];
}
}
return "";
},
Vue.prototype.getLoginUser = function () {
return this.loginUser
},
Vue.prototype.setLoginUser = function (user) {
this.loginUser = user
}
//PDF预览
Vue.prototype.previewPDF = function (url) {
window.open(this.domainManager().PDFViewUrl + url);
},
Vue.prototype.downloadFile = function (objectKey) {
var co = require('co');
var OSS = require('ali-oss');
var oss = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev'
})
let url = oss.signatureUrl(objectKey);
let link = document.createElement('a');
link.href = url;
document.body.appendChild(link);
link.click();
},
Vue.prototype.downloadFileRename = function (objectKey, filename, fileurl) {
var co = require('co');
var OSS = require('ali-oss');
var oss = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev'
})
let url = '';
if(fileurl)
url = fileurl
else
url = oss.signatureUrl(objectKey);
let getBlob = new Promise(resolve => {
const xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'blob';
xhr.onload = () => {
if (xhr.status === 200) {
resolve(xhr.response);
}
};
xhr.send();
});
getBlob.then(blob => {
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
const body = document.querySelector('body');
link.href = window.URL.createObjectURL(blob);
link.download = filename;
link.style.display = 'none';
body.appendChild(link);
link.click();
body.removeChild(link);
window.URL.revokeObjectURL(link.href);
}
});
},
Vue.prototype.getFileBlob = function (objectKey, filename) {
var co = require('co');
var OSS = require('ali-oss');
var oss = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev'
})
let url = oss.signatureUrl(objectKey);
let getBlob = new Promise(resolve => {
const xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'blob';
xhr.onload = () => {
if (xhr.status === 200) {
resolve(xhr.response);
}
};
xhr.send();
});
return getBlob
},
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包
//files 文件数组
//p 进度回调函数
Vue.prototype.uploadFile = function (path, files, successCall) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
nameList.push(this.random_string());
}
var oss = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev'
})
let that = this
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
var result = yield oss.multipartUpload(fileName, files[index], {
progress: function* (p) {},
mime: 'application/octet-stream'
})
successCall(result);
}
}).catch(function (err) {
console.log(err);
});
}
},
Vue.prototype.uploadBlob = function (path, files, successCall) {
if (files && files.length > 0) {
var oss = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev'
})
let that = this
co(function* () {
for (let index = 0; index < files.length; index++) {
var result = yield oss.multipartUpload(path, files[index], {
progress: function* (p) {},
mime: 'application/octet-stream'
})
successCall(result);
}
}).catch(function (err) {
console.log(err);
});
}
},
//验证只能输入2位小数【负数:isMinus传true】
Vue.prototype.checkPrice = function (item, filed, isMinus) {
var value = "" + item[filed]; //转字符串
var t = value.charAt(0);
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
value = value
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".");
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
//如果第一位是负号,则允许添加 如果不允许添加负号 可以把这块注释掉
//是否允许负数
if (isMinus && t == '-') {
value = '-' + value;
}
item[filed] = value;
}
//验证输入6位小数汇率
Vue.prototype.checkRate = function (item, filed) {
var value = "" + item[filed]; //转字符串
var p1 = /[^\d\.]/g; // 过滤非数字及小数点 /g :所有范围中过滤
var p2 = /(\.\d{6})\d*$/g;
var p4 = /(\.)(\d*)\1/g;
value = value.replace(p1, "").replace(p2, "$1").replace(p4, "$1$2");
value = value.replace(/[^0-9.]/g, '');
var p5 = /\.+/g; //多个点的话只取1个点,屏蔽1....234的情况
value = value.replace(p5, ".")
var p6 = /(\.+)(\d+)(\.+)/g; //屏蔽1....234.的情况
value = value.replace(p6, "$1$2") // 屏蔽最后一位的.
item[filed] = value;
}
//一般提示 //验证只能输入整数【负数:isMinus传true】
Vue.prototype.Info = function(msg) { Vue.prototype.checkInteger = function (item, filed, isMinus) {
this.$message({ var value = "" + item[filed]; //转字符串
message: msg, var t = value.charAt(0);
duration: 2000, value = value.replace(this.$commonUtils.Regex.isInteger, "");
type: "info" //是否允许负数
}); if (isMinus && t == '-') {
}, value = '-' + value;
//警告提示 }
Vue.prototype.Warning = function(msg) { item[filed] = value;
this.$message({ }
message: msg,
duration: 2000,
type: "warning"
});
},
//Confirm
Vue.prototype.Confirm = function(msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
if (typeof callback === 'function') {
callback();
}
})
.catch(() => {
this.Info("已取消操作");
});
},
//打开新窗口连接 //价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.OpenNewUrl = function(URL) { Vue.prototype.moneyFormat = function (value) {
if (URL != '') { let nStr = Number(value).toFixed(2)
window.open('http://' + URL, '_blank'); nStr += '';
} let x = nStr.split('.');
} let x1 = x[0];
let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
},
Vue.prototype.uploadImg = function(tcID, msg, successCall, faildCall) { Vue.prototype.loadFileICON = function (suffix) {
var apiurl = this.domainManager().Upload + '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Freature/TCID' + tcID; let icons = [{
this.$http.post(apiurl, msg, { "name": "\u7f51\u76d8BT\u79bb\u7ebf\u4e0b\u8f7d",
datatype: "jsonP",
}).then(res => {
successCall(res);
}, faildCall)
}
//HTTP提交数据
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().PostUrl;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
if (this.$route.path.toLowerCase() == "/signature") {
this.$router.push({
path: '/signature'
})
} else {
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
this.$router.push({
path: '/login'
})
}
}
var token = "";
var key = "";
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().SecretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
}
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) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
}, faildCall)
},
//下载文件 "filesType": "*.bt,*.torrent",
Vue.prototype.GetLocalFile = function(cmd, msg, fileName, successCall) { "filesIcon": {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl; "bt": ["fileicon-small-bt", "fileicon-large-bt", "fileicon-middle-bt"],
var timestamp = (new Date()).valueOf(); "torrent": ["fileicon-small-bt", "fileicon-large-bt", "fileicon-middle-bt"]
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().SecretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
}
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function(res) {});
},
Vue.prototype.getCookieItem = function() {
return JSON.parse(this.getCookie("userInfo"))
},
Vue.prototype.getLocalStorage = function() {
var localStorageData = window.localStorage["userInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData);
} else {
return null;
}
}, },
Vue.prototype.getCookie = function(cookieName) { "entranceFile": "file-widget-1:bt\/start.js"
var strCookie = document.cookie; },
var arrCookie = strCookie.split("; "); {
for (var i = 0; i < arrCookie.length; i++) { "name": "\u6d69\u8fb0CAD",
var arr = arrCookie[i].split("="); "group": "com.gstarcad.web",
if (cookieName == arr[0]) { "notSupport": "ie6",
return arr[1]; "filesIcon": {
} "dws": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"],
} "dwt": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"],
return ""; "dxf": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"],
"dwg": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"],
"cad": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"]
}, },
Vue.prototype.getLoginUser = function() { "entranceFile": "file-widget-1:cad\/start.js"
return this.loginUser },
{
"name": "\u7f51\u76d8\u4ee3\u7801\u9605\u8bfb\u5668",
"notSupport": "ie",
"filesType": "*.txt,*.as,*.sh,*.c,*.cpp,*.h,*.cs,*.asp,*.css,*.pas,*.diff,*.patch,*.erl,*.groovy,*.java,*.jsp,*.js,*.json,*.pl,*.php,*.py,*.rb,*.sass,*.scss,*.scala,*.sql,*.vb,*.xml,*.xhtml,*.html,*.htm,*.md,*.less,*.lua,*.go,*.bat,*.wml",
"filesIcon": {
"as": ["fileicon-small-code", "fileicon-large-code"],
"sh": ["fileicon-small-code", "fileicon-large-code"],
"c": ["fileicon-small-code", "fileicon-large-code"],
"cpp": ["fileicon-small-code", "fileicon-large-code"],
"h": ["fileicon-small-code", "fileicon-large-code"],
"cs": ["fileicon-small-code", "fileicon-large-code"],
"asp": ["fileicon-small-code", "fileicon-large-code"],
"css": ["fileicon-small-code", "fileicon-large-code"],
"pas": ["fileicon-small-code", "fileicon-large-code"],
"diff": ["fileicon-small-code", "fileicon-large-code"],
"patch": ["fileicon-small-code", "fileicon-large-code"],
"erl": ["fileicon-small-code", "fileicon-large-code"],
"groovy": ["fileicon-small-code", "fileicon-large-code"],
"java": ["fileicon-small-code", "fileicon-large-code"],
"jsp": ["fileicon-small-code", "fileicon-large-code"],
"js": ["fileicon-small-code", "fileicon-large-code"],
"json": ["fileicon-small-code", "fileicon-large-code"],
"pl": ["fileicon-small-code", "fileicon-large-code"],
"php": ["fileicon-small-code", "fileicon-large-code"],
"py": ["fileicon-small-code", "fileicon-large-code"],
"rb": ["fileicon-small-code", "fileicon-large-code"],
"sass": ["fileicon-small-code", "fileicon-large-code"],
"scss": ["fileicon-small-code", "fileicon-large-code"],
"scala": ["fileicon-small-code", "fileicon-large-code"],
"sql": ["fileicon-small-code", "fileicon-large-code"],
"vb": ["fileicon-small-code", "fileicon-large-code"],
"xml": ["fileicon-small-code", "fileicon-large-code"],
"xhtml": ["fileicon-small-code", "fileicon-large-code"],
"html": ["fileicon-small-code", "fileicon-large-code"],
"htm": ["fileicon-small-code", "fileicon-large-code"],
"md": ["fileicon-small-code", "fileicon-large-code"],
"less": ["fileicon-small-code", "fileicon-large-code"],
"lua": ["fileicon-small-code", "fileicon-large-code"],
"go": ["fileicon-small-code", "fileicon-large-code"],
"bat": ["fileicon-small-code", "fileicon-large-code"],
"wml": ["fileicon-small-code", "fileicon-large-code"]
}, },
Vue.prototype.setLoginUser = function(user) { "entranceFile": "file-widget-1:codeReader\/start.js"
this.loginUser = user },
} {
"name": "\u7f51\u76d8\u89e3\u538b\u7f29",
//PDF预览
Vue.prototype.previewPDF = function(url) { "filesType": "*.rar,*.zip",
window.open(this.domainManager().PDFViewUrl + url); "notSupport": "ie6",
"filesIcon": {
"rar": ["fileicon-small-zip", "fileicon-large-zip", "fileicon-middle-zip"],
"zip": ["fileicon-small-zip", "fileicon-large-zip", "fileicon-middle-zip"]
}, },
"depsFiles": ["file-widget-1:zip\/util\/css\/fileUnzip.css", "file-widget-1:zip\/util\/css\/list-view.css"],
Vue.prototype.downloadFile = function(objectKey) { "entranceFile": "file-widget-1:zip\/start.js"
var co = require('co'); },
var OSS = require('ali-oss'); {
var oss = new OSS({ "name": "\u7f51\u76d8\u6587\u6863\u9605\u8bfb\u5668",
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3', "filesType": "*.txt,*.pdf,*.doc,*.docx,*.ppt,*.pptx,*.xls,*.xlsx,*.rtf",
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', "filesIcon": {
bucket: 'reborndev' "txt": ["fileicon-small-txt", "fileicon-large-txt", "fileicon-middle-txt"],
}) "rtf": ["fileicon-small-txt", "fileicon-large-txt", "fileicon-middle-txt"],
let url = oss.signatureUrl(objectKey); "pdf": ["fileicon-small-pdf", "fileicon-large-pdf", "fileicon-middle-pdf"],
let link = document.createElement('a'); "doc": ["fileicon-small-doc", "fileicon-large-doc", "fileicon-middle-doc"],
link.href = url; "docx": ["fileicon-small-doc", "fileicon-large-doc", "fileicon-middle-doc"],
document.body.appendChild(link); "ppt": ["fileicon-small-ppt", "fileicon-large-ppt", "fileicon-middle-ppt"],
link.click(); "pptx": ["fileicon-small-ppt", "fileicon-large-ppt", "fileicon-middle-ppt"],
"xls": ["fileicon-small-xls", "fileicon-large-xls", "fileicon-middle-xls"],
"xlsx": ["fileicon-small-xls", "fileicon-large-xls", "fileicon-middle-xls"],
"vsd": ["fileicon-small-vsd", "fileicon-large-vsd", "fileicon-middle-vsd"]
}, },
Vue.prototype.downloadFileRename = function(objectKey, filename, fileurl) { "depsFiles": ["file-widget-1:doc\/util\/docReader.css", "file-widget-1:doc\/pdfJsReader\/pdfJsReader.less", "base:thirdParty\/pdfjs\/_nomd5_nomod\/web\/trans-viewer.less", "base:thirdParty\/pdfjs\/_nomd5_nomod\/web\/viewer.less"],
"entranceFile": "file-widget-1:doc\/start.js"
var co = require('co'); },
var OSS = require('ali-oss'); {
var oss = new OSS({ "name": "\u7f51\u76d8\u56fe\u7247\u9884\u89c8",
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3', "filesType": "*.jpg,*.jpeg,*.livp,*.gif,*bmp,*.png,*jpe,*.cur,*.svgz,*.ico,*.heic,*.heif,*.avci,*.webp",
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', "filesIcon": {
bucket: 'reborndev' "jpg": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
}) "jpeg": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"livp": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
let url = ''; "gif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
if (fileurl) "bmp": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
url = fileurl "png": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
else "jpe": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
url = oss.signatureUrl(objectKey); "cur": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
let getBlob = new Promise(resolve => { "svgz": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
const xhr = new XMLHttpRequest(); "tif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
xhr.open('GET', url, true); "tiff": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
xhr.responseType = 'blob'; "ico": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
xhr.onload = () => { "heic": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
if (xhr.status === 200) { "heif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
resolve(xhr.response); "avci": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"]
}
};
xhr.send();
});
getBlob.then(blob => {
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement('a');
const body = document.querySelector('body');
link.href = window.URL.createObjectURL(blob);
link.download = filename;
link.style.display = 'none';
body.appendChild(link);
link.click();
body.removeChild(link);
window.URL.revokeObjectURL(link.href);
}
});
}, },
Vue.prototype.getFileBlob = function(objectKey, filename) { "depsFiles": ["file-widget-1:image\/util\/picCategory-dialog\/css\/picCategory-dialog.css", "file-widget-1:image\/util\/picPreview\/css\/picPreview.css", "file-widget-1:image\/util\/picPreviewAside\/css\/picPreviewAside.css", "file-widget-1:image\/util\/showPic\/css\/showPic.css", "file-widget-1:image\/util\/thumbnailPic\/css\/thumbnailPic.css", "base:thirdParty\/videojs\/_nomd5_nomod\/video-js.css"],
var co = require('co'); "entranceFile": "file-widget-1:image\/start.js"
var OSS = require('ali-oss'); },
var oss = new OSS({ {
region: 'oss-cn-hangzhou', "name": "\u767e\u5ea6\u8111\u56fe",
accessKeyId: 'LTAIwE7l9dImZSa3', "group": "com.baidu.naotu",
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', "filesType": "*.mmap,*.xmind,*.mm",
bucket: 'reborndev' "notSupport": "ie6",
}) "filesIcon": {
let url = oss.signatureUrl(objectKey); "mmap": ["fileicon-small-mmap", "fileicon-large-mmap", "fileicon-middle-mmap"],
let getBlob = new Promise(resolve => { "xmind": ["fileicon-small-xmind", "fileicon-large-xmind", "fileicon-middle-xmind"],
const xhr = new XMLHttpRequest(); "mm": ["fileicon-small-mm", "fileicon-large-mm", "fileicon-middle-mm"]
xhr.open('GET', url, true);
xhr.responseType = 'blob';
xhr.onload = () => {
if (xhr.status === 200) {
resolve(xhr.response);
}
};
xhr.send();
});
return getBlob
}, },
"entranceFile": "file-widget-1:mindmap\/start.js"
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包 },
//files 文件数组 {
//p 进度回调函数 "name": "\u7f51\u76d8\u97f3\u9891\u64ad\u653e\u5668",
Vue.prototype.uploadFile = function(path, files, successCall) {
if (files && files.length > 0) { "notSupport": "ie6",
let nameList = new Array() "filesType": "*.wma,*.wav,*.mp3,*.aac,*.ra,*.ram,*.mp2,*.ogg,*.aif,*.mpega,*.amr,*.mid,*.midi,*.m4a",
for (let index = 0; index < files.length; index++) { "filesIcon": {
nameList.push(this.random_string()); "wma": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
} "wav": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
var oss = new OSS({ "mp3": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
region: 'oss-cn-hangzhou', "aac": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
accessKeyId: 'LTAIwE7l9dImZSa3', "ra": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', "ram": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
bucket: 'reborndev' "mp2": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
}) "ogg": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
let that = this "aif": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
co(function*() { "mpega": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
for (let index = 0; index < files.length; index++) { "amr": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
let fileName = nameList[index] "mid": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
fileName = path + fileName + "." + files[index].name.split('.').pop() "midi": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
var result = yield oss.multipartUpload(fileName, files[index], { "m4a": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"]
progress: function*(p) {},
mime: 'application/octet-stream'
})
successCall(result);
}
}).catch(function(err) {
console.log(err);
});
}
}, },
"buttons": [{
Vue.prototype.uploadBlob = function(path, files, successCall) { "title": "\u97f3\u4e50\u64ad\u653e",
if (files && files.length > 0) { "name": "play-music",
var oss = new OSS({ "position": "listTools",
region: 'oss-cn-hangzhou', "index": 2,
accessKeyId: 'LTAIwE7l9dImZSa3', "disabled": "none",
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', "icon": "icon-play",
bucket: 'reborndev' "buttonStyle": "normal",
}) "conditions": {
let that = this "pageModule": "list,share,search,category,searchGlobal",
co(function*() { "filesType": "wma,wav,mp3,aac,ra,ram,mp2,ogg,aif,mpega,amr,mid,midi,m4a",
for (let index = 0; index < files.length; index++) { "filesTypeStrongMatch": true
var result = yield oss.multipartUpload(path, files[index], { }
progress: function*(p) {}, }],
mime: 'application/octet-stream' "depsFiles": ["file-widget-1:musicPlay\/util\/mbox\/musicbox.css"],
}) "entranceFile": "file-widget-1:musicPlay\/start.js"
successCall(result); },
} {
}).catch(function(err) { "name": "\u7f51\u76d8\u5927\u56fe\u9884\u89c8",
console.log(err);
}); "filesType": "*.jpg,*.jpeg,*.gif,*bmp,*.png,*jpe,*.cur,*.svgz,*.ico",
} "filesIcon": {
"jpg": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"jpeg": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"gif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"bmp": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"png": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"jpe": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"cur": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"svgz": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"tif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"tiff": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"ico": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"]
}, },
"depsFiles": ["file-widget-1:preview\/picPreview.css"],
//验证只能输入2位小数【负数:isMinus传true】 "entranceFile": "file-widget-1:preview\/start.js"
Vue.prototype.checkPrice = function(item, filed, isMinus) { },
var value = "" + item[filed]; //转字符串 {
var t = value.charAt(0); "name": "sysIcon",
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的 "filesType": "*.exe,*.msi,*.dmg,*.pkg,*.psd,*.apk,*.key,*.ai,*.ipa",
value = value "filesIcon": {
.replace(".", "$#$") "exe": ["fileicon-sys-s-exe", "fileicon-sys-l-exe"],
.replace(/\./g, "") "msi": ["fileicon-sys-s-exe", "fileicon-sys-l-exe"],
.replace("$#$", "."); "dmg": ["fileicon-sys-s-exe", "fileicon-sys-l-dmg"],
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数 "pkg": ["fileicon-sys-s-exe", "fileicon-sys-l-dmg"],
//如果第一位是负号,则允许添加 如果不允许添加负号 可以把这块注释掉 "psd": ["fileicon-sys-s-psd", "fileicon-sys-l-psd"],
//是否允许负数 "apk": ["fileicon-sys-s-apk", "fileicon-sys-l-apk"],
if (isMinus && t == '-') { "key": ["fileicon-sys-s-key", "fileicon-sys-l-key"],
value = '-' + value; "ai": ["fileicon-sys-s-ai", "fileicon-sys-l-ai"],
} "ipa": ["fileicon-sys-s-ipa", "fileicon-sys-l-ipa"],
item[filed] = value; "pages": ["fileicon-sys-s-pages", "fileicon-sys-l-pages"],
"numbers": ["fileicon-sys-s-numbers", "fileicon-sys-l-numbers"],
"eot": ["fileicon-sys-s-fonts", "fileicon-sys-l-fonts"],
"ttf": ["fileicon-sys-s-fonts", "fileicon-sys-l-fonts"],
"woff": ["fileicon-sys-s-fonts", "fileicon-sys-l-fonts"],
"eps": ["fileicon-sys-s-eps", "fileicon-sys-l-eps"],
"lnk": ["fileicon-sys-s-links", "fileicon-sys-l-links"],
"link": ["fileicon-sys-s-links", "fileicon-sys-l-links"],
"swf": ["fileicon-sys-s-swf", "fileicon-sys-l-swf"],
"php": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"c": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"js": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"css": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"html": ["fileicon-sys-s-web", "fileicon-sys-l-web"],
"htm": ["fileicon-sys-s-web", "fileicon-sys-l-web"],
"xhtml": ["fileicon-sys-s-web", "fileicon-sys-l-web"],
"java": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"cc": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"python": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"json": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"sh": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"bat": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"ejs": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"xml": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"ts": ["fileicon-sys-s-video", "fileicon-sys-l-video"]
} }
//验证输入6位小数汇率 },
Vue.prototype.checkRate = function(item, filed) { {
var value = "" + item[filed]; //转字符串 "name": "\u7f51\u76d8\u89c6\u9891",
var p1 = /[^\d\.]/g; // 过滤非数字及小数点 /g :所有范围中过滤
var p2 = /(\.\d{6})\d*$/g; "filesType": "*.wmv,*.rmvb,*.mpeg4,*.mpeg2,*.flv,*.avi,*.3gp,*.mpga,*.qt,*.rm,*.wmz,*.wmd,*.wvx,*.wmx,*.wm,*.mpg,*.mp4,*.mkv,*.mpeg,*mov,*.asf,*.m4v,*.m3u8",
var p4 = /(\.)(\d*)\1/g; "filesIcon": {
value = value.replace(p1, "").replace(p2, "$1").replace(p4, "$1$2"); "wmv": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
value = value.replace(/[^0-9.]/g, ''); "rmvb": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
var p5 = /\.+/g; //多个点的话只取1个点,屏蔽1....234的情况 "mpeg4": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
value = value.replace(p5, ".") "mpeg2": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
var p6 = /(\.+)(\d+)(\.+)/g; //屏蔽1....234.的情况 "flv": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
value = value.replace(p6, "$1$2") // 屏蔽最后一位的. "avi": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
item[filed] = value; "3gp": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
} "mpga": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"qt": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
//验证只能输入整数【负数:isMinus传true】 "rm": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
Vue.prototype.checkInteger = function(item, filed, isMinus) { "wmz": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
var value = "" + item[filed]; //转字符串 "wmd": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
var t = value.charAt(0); "wvx": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
value = value.replace(this.$commonUtils.Regex.isInteger, ""); "wmx": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
//是否允许负数 "wm": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
if (isMinus && t == '-') { "mpg": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
value = '-' + value; "mp4": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
} "mkv": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
item[filed] = value; "mpeg": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
} "mov": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"asf": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun "m4v": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
Vue.prototype.moneyFormat = function(value) { "m3u8": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"]
let nStr = Number(value).toFixed(2)
nStr += '';
let x = nStr.split('.');
let x1 = x[0];
let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
}, },
"preload": true,
Vue.prototype.loadFileICON = function(suffix) { "entranceFile": "file-widget-1:video\/start.js"
let icons = [{ }
"name": "\u7f51\u76d8BT\u79bb\u7ebf\u4e0b\u8f7d", ]
if (suffix == "")
"filesType": "*.bt,*.torrent", return "dir-small"
"filesIcon": { let css = ""
"bt": ["fileicon-small-bt", "fileicon-large-bt", "fileicon-middle-bt"], icons.forEach(x => {
"torrent": ["fileicon-small-bt", "fileicon-large-bt", "fileicon-middle-bt"] //console.log(x.filesIcon.hasOwnProperty(suffix))
}, if (x.filesIcon.hasOwnProperty(suffix)) {
"entranceFile": "file-widget-1:bt\/start.js" css = x.filesIcon[suffix][0]
}, return false
{ }
"name": "\u6d69\u8fb0CAD", })
"group": "com.gstarcad.web", if (css == '') {
"notSupport": "ie6", css = 'default-small'
"filesIcon": { }
"dws": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"], return css;
"dwt": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"], }
"dxf": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"], }
"dwg": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"], }
"cad": ["fileicon-small-dws", "fileicon-large-dws", "fileicon-middle-dws"]
},
"entranceFile": "file-widget-1:cad\/start.js"
},
{
"name": "\u7f51\u76d8\u4ee3\u7801\u9605\u8bfb\u5668",
"notSupport": "ie",
"filesType": "*.txt,*.as,*.sh,*.c,*.cpp,*.h,*.cs,*.asp,*.css,*.pas,*.diff,*.patch,*.erl,*.groovy,*.java,*.jsp,*.js,*.json,*.pl,*.php,*.py,*.rb,*.sass,*.scss,*.scala,*.sql,*.vb,*.xml,*.xhtml,*.html,*.htm,*.md,*.less,*.lua,*.go,*.bat,*.wml",
"filesIcon": {
"as": ["fileicon-small-code", "fileicon-large-code"],
"sh": ["fileicon-small-code", "fileicon-large-code"],
"c": ["fileicon-small-code", "fileicon-large-code"],
"cpp": ["fileicon-small-code", "fileicon-large-code"],
"h": ["fileicon-small-code", "fileicon-large-code"],
"cs": ["fileicon-small-code", "fileicon-large-code"],
"asp": ["fileicon-small-code", "fileicon-large-code"],
"css": ["fileicon-small-code", "fileicon-large-code"],
"pas": ["fileicon-small-code", "fileicon-large-code"],
"diff": ["fileicon-small-code", "fileicon-large-code"],
"patch": ["fileicon-small-code", "fileicon-large-code"],
"erl": ["fileicon-small-code", "fileicon-large-code"],
"groovy": ["fileicon-small-code", "fileicon-large-code"],
"java": ["fileicon-small-code", "fileicon-large-code"],
"jsp": ["fileicon-small-code", "fileicon-large-code"],
"js": ["fileicon-small-code", "fileicon-large-code"],
"json": ["fileicon-small-code", "fileicon-large-code"],
"pl": ["fileicon-small-code", "fileicon-large-code"],
"php": ["fileicon-small-code", "fileicon-large-code"],
"py": ["fileicon-small-code", "fileicon-large-code"],
"rb": ["fileicon-small-code", "fileicon-large-code"],
"sass": ["fileicon-small-code", "fileicon-large-code"],
"scss": ["fileicon-small-code", "fileicon-large-code"],
"scala": ["fileicon-small-code", "fileicon-large-code"],
"sql": ["fileicon-small-code", "fileicon-large-code"],
"vb": ["fileicon-small-code", "fileicon-large-code"],
"xml": ["fileicon-small-code", "fileicon-large-code"],
"xhtml": ["fileicon-small-code", "fileicon-large-code"],
"html": ["fileicon-small-code", "fileicon-large-code"],
"htm": ["fileicon-small-code", "fileicon-large-code"],
"md": ["fileicon-small-code", "fileicon-large-code"],
"less": ["fileicon-small-code", "fileicon-large-code"],
"lua": ["fileicon-small-code", "fileicon-large-code"],
"go": ["fileicon-small-code", "fileicon-large-code"],
"bat": ["fileicon-small-code", "fileicon-large-code"],
"wml": ["fileicon-small-code", "fileicon-large-code"]
},
"entranceFile": "file-widget-1:codeReader\/start.js"
},
{
"name": "\u7f51\u76d8\u89e3\u538b\u7f29",
"filesType": "*.rar,*.zip",
"notSupport": "ie6",
"filesIcon": {
"rar": ["fileicon-small-zip", "fileicon-large-zip", "fileicon-middle-zip"],
"zip": ["fileicon-small-zip", "fileicon-large-zip", "fileicon-middle-zip"]
},
"depsFiles": ["file-widget-1:zip\/util\/css\/fileUnzip.css", "file-widget-1:zip\/util\/css\/list-view.css"],
"entranceFile": "file-widget-1:zip\/start.js"
},
{
"name": "\u7f51\u76d8\u6587\u6863\u9605\u8bfb\u5668",
"filesType": "*.txt,*.pdf,*.doc,*.docx,*.ppt,*.pptx,*.xls,*.xlsx,*.rtf",
"filesIcon": {
"txt": ["fileicon-small-txt", "fileicon-large-txt", "fileicon-middle-txt"],
"rtf": ["fileicon-small-txt", "fileicon-large-txt", "fileicon-middle-txt"],
"pdf": ["fileicon-small-pdf", "fileicon-large-pdf", "fileicon-middle-pdf"],
"doc": ["fileicon-small-doc", "fileicon-large-doc", "fileicon-middle-doc"],
"docx": ["fileicon-small-doc", "fileicon-large-doc", "fileicon-middle-doc"],
"ppt": ["fileicon-small-ppt", "fileicon-large-ppt", "fileicon-middle-ppt"],
"pptx": ["fileicon-small-ppt", "fileicon-large-ppt", "fileicon-middle-ppt"],
"xls": ["fileicon-small-xls", "fileicon-large-xls", "fileicon-middle-xls"],
"xlsx": ["fileicon-small-xls", "fileicon-large-xls", "fileicon-middle-xls"],
"vsd": ["fileicon-small-vsd", "fileicon-large-vsd", "fileicon-middle-vsd"]
},
"depsFiles": ["file-widget-1:doc\/util\/docReader.css", "file-widget-1:doc\/pdfJsReader\/pdfJsReader.less", "base:thirdParty\/pdfjs\/_nomd5_nomod\/web\/trans-viewer.less", "base:thirdParty\/pdfjs\/_nomd5_nomod\/web\/viewer.less"],
"entranceFile": "file-widget-1:doc\/start.js"
},
{
"name": "\u7f51\u76d8\u56fe\u7247\u9884\u89c8",
"filesType": "*.jpg,*.jpeg,*.livp,*.gif,*bmp,*.png,*jpe,*.cur,*.svgz,*.ico,*.heic,*.heif,*.avci,*.webp",
"filesIcon": {
"jpg": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"jpeg": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"livp": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"gif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"bmp": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"png": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"jpe": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"cur": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"svgz": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"tif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"tiff": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"ico": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"heic": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"heif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"avci": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"]
},
"depsFiles": ["file-widget-1:image\/util\/picCategory-dialog\/css\/picCategory-dialog.css", "file-widget-1:image\/util\/picPreview\/css\/picPreview.css", "file-widget-1:image\/util\/picPreviewAside\/css\/picPreviewAside.css", "file-widget-1:image\/util\/showPic\/css\/showPic.css", "file-widget-1:image\/util\/thumbnailPic\/css\/thumbnailPic.css", "base:thirdParty\/videojs\/_nomd5_nomod\/video-js.css"],
"entranceFile": "file-widget-1:image\/start.js"
},
{
"name": "\u767e\u5ea6\u8111\u56fe",
"group": "com.baidu.naotu",
"filesType": "*.mmap,*.xmind,*.mm",
"notSupport": "ie6",
"filesIcon": {
"mmap": ["fileicon-small-mmap", "fileicon-large-mmap", "fileicon-middle-mmap"],
"xmind": ["fileicon-small-xmind", "fileicon-large-xmind", "fileicon-middle-xmind"],
"mm": ["fileicon-small-mm", "fileicon-large-mm", "fileicon-middle-mm"]
},
"entranceFile": "file-widget-1:mindmap\/start.js"
},
{
"name": "\u7f51\u76d8\u97f3\u9891\u64ad\u653e\u5668",
"notSupport": "ie6",
"filesType": "*.wma,*.wav,*.mp3,*.aac,*.ra,*.ram,*.mp2,*.ogg,*.aif,*.mpega,*.amr,*.mid,*.midi,*.m4a",
"filesIcon": {
"wma": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"wav": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"mp3": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"aac": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"ra": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"ram": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"mp2": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"ogg": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"aif": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"mpega": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"amr": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"mid": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"midi": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"],
"m4a": ["fileicon-small-mp3", "fileicon-large-mp3", "fileicon-middle-mp3"]
},
"buttons": [{
"title": "\u97f3\u4e50\u64ad\u653e",
"name": "play-music",
"position": "listTools",
"index": 2,
"disabled": "none",
"icon": "icon-play",
"buttonStyle": "normal",
"conditions": {
"pageModule": "list,share,search,category,searchGlobal",
"filesType": "wma,wav,mp3,aac,ra,ram,mp2,ogg,aif,mpega,amr,mid,midi,m4a",
"filesTypeStrongMatch": true
}
}],
"depsFiles": ["file-widget-1:musicPlay\/util\/mbox\/musicbox.css"],
"entranceFile": "file-widget-1:musicPlay\/start.js"
},
{
"name": "\u7f51\u76d8\u5927\u56fe\u9884\u89c8",
"filesType": "*.jpg,*.jpeg,*.gif,*bmp,*.png,*jpe,*.cur,*.svgz,*.ico",
"filesIcon": {
"jpg": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"jpeg": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"gif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"bmp": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"png": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"jpe": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"cur": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"svgz": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"tif": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"tiff": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"],
"ico": ["fileicon-small-pic", "default-large", "fileicon-middle-pic"]
},
"depsFiles": ["file-widget-1:preview\/picPreview.css"],
"entranceFile": "file-widget-1:preview\/start.js"
},
{
"name": "sysIcon",
"filesType": "*.exe,*.msi,*.dmg,*.pkg,*.psd,*.apk,*.key,*.ai,*.ipa",
"filesIcon": {
"exe": ["fileicon-sys-s-exe", "fileicon-sys-l-exe"],
"msi": ["fileicon-sys-s-exe", "fileicon-sys-l-exe"],
"dmg": ["fileicon-sys-s-exe", "fileicon-sys-l-dmg"],
"pkg": ["fileicon-sys-s-exe", "fileicon-sys-l-dmg"],
"psd": ["fileicon-sys-s-psd", "fileicon-sys-l-psd"],
"apk": ["fileicon-sys-s-apk", "fileicon-sys-l-apk"],
"key": ["fileicon-sys-s-key", "fileicon-sys-l-key"],
"ai": ["fileicon-sys-s-ai", "fileicon-sys-l-ai"],
"ipa": ["fileicon-sys-s-ipa", "fileicon-sys-l-ipa"],
"pages": ["fileicon-sys-s-pages", "fileicon-sys-l-pages"],
"numbers": ["fileicon-sys-s-numbers", "fileicon-sys-l-numbers"],
"eot": ["fileicon-sys-s-fonts", "fileicon-sys-l-fonts"],
"ttf": ["fileicon-sys-s-fonts", "fileicon-sys-l-fonts"],
"woff": ["fileicon-sys-s-fonts", "fileicon-sys-l-fonts"],
"eps": ["fileicon-sys-s-eps", "fileicon-sys-l-eps"],
"lnk": ["fileicon-sys-s-links", "fileicon-sys-l-links"],
"link": ["fileicon-sys-s-links", "fileicon-sys-l-links"],
"swf": ["fileicon-sys-s-swf", "fileicon-sys-l-swf"],
"php": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"c": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"js": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"css": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"html": ["fileicon-sys-s-web", "fileicon-sys-l-web"],
"htm": ["fileicon-sys-s-web", "fileicon-sys-l-web"],
"xhtml": ["fileicon-sys-s-web", "fileicon-sys-l-web"],
"java": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"cc": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"python": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"json": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"sh": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"bat": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"ejs": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"xml": ["fileicon-sys-s-code", "fileicon-sys-l-code"],
"ts": ["fileicon-sys-s-video", "fileicon-sys-l-video"]
}
},
{
"name": "\u7f51\u76d8\u89c6\u9891",
"filesType": "*.wmv,*.rmvb,*.mpeg4,*.mpeg2,*.flv,*.avi,*.3gp,*.mpga,*.qt,*.rm,*.wmz,*.wmd,*.wvx,*.wmx,*.wm,*.mpg,*.mp4,*.mkv,*.mpeg,*mov,*.asf,*.m4v,*.m3u8",
"filesIcon": {
"wmv": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"rmvb": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"mpeg4": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"mpeg2": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"flv": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"avi": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"3gp": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"mpga": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"qt": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"rm": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"wmz": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"wmd": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"wvx": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"wmx": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"wm": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"mpg": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"mp4": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"mkv": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"mpeg": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"mov": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"asf": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"m4v": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"],
"m3u8": ["fileicon-small-video", "fileicon-large-video", "fileicon-middle-video"]
},
"preload": true,
"entranceFile": "file-widget-1:video\/start.js"
}
]
if (suffix == "")
return "dir-small"
let css = ""
icons.forEach(x => {
//console.log(x.filesIcon.hasOwnProperty(suffix))
if (x.filesIcon.hasOwnProperty(suffix)) {
css = x.filesIcon[suffix][0]
return false
}
})
if (css == '') {
css = 'default-small'
}
return css;
}
}
}
\ No newline at end of file
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