Commit b5d73aba authored by 黄媛媛's avatar 黄媛媛

意见调查新增领队和导出功能

parent a32db7b4
......@@ -60,6 +60,12 @@
value="查询"
@click="resetPageIndex(),getList()"
>
<input
type="button"
class="hollowFixedBtn"
value="导出"
@click="Export"
>
</li>
</ul>
</div>
......@@ -69,6 +75,7 @@
<th>发团日期</th>
<!-- <th>订单号</th> -->
<th>团号</th>
<th>领队</th>
<th>未填写人数</th>
<th>整体评分</th>
<th v-for="(item,i) in fields" :key="i">{{item}}</th>
......@@ -78,6 +85,8 @@
<td>{{item.start}}</td>
<!-- <td>{{item.orderId}}</td> -->
<td @click='goUrl("RegistrationList", item.tcid,"报名清单")' class="go_regis">{{item.tCNUM}}</td>
<td>{{item.lname}}</td>
<td>{{item.number}}</td>
<td>
<span v-if="fields.length>0">
......@@ -235,6 +244,17 @@ export default {
this.GetSurveyShowList();
},
methods:{
Export(){
let msg = JSON.parse(JSON.stringify(this.msg));
delete msg.pageIndex;
delete msg.pageSize;
msg.EmployeeId = this.userId;
this.JavaGetLocalFile(
"/api/erp/survey/exportSurverExcel",
msg,
"意见调查.xls"
);
},
goUrl(path, id, name) {
this.$router.push({
name: path,
......@@ -419,7 +439,8 @@ export default {
start:"",
sumScore:x.scoreNum,
tCNUM:x.tCNUM,
number: x.number
number: x.number,
lname:x.lname
}
if(x.startDate){
obj.start=x.startDate.split('T')[0]
......
......@@ -114,9 +114,12 @@ export default {
let domainUrl = '';
// domainUrl = "http://testapi.oytour.com";
// domainUrl = "http://192.168.2.214:8082";
domainUrl = "http://192.168.2.65:8025";
// domainUrl = "http://192.168.2.65:8025";
domainUrl = "http://192.168.2.16:8083";
let locationName = window.location.hostname;
let javaUrldo="";
javaUrldo=locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000";
if (locationName.indexOf('yx.oytour') !== -1) {
domainUrl = "http://reborn.oytour.com";
......@@ -147,12 +150,15 @@ export default {
//google地图图片地址
GoogleMapImageUrl: "http://super.oytour.com",
//上传站点
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://uploadfile.oytour.com" : "http://192.168.2.214:8120",
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.2.214:8120",
//文件站点
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://staticfile.oytour.com" : 'http://192.168.2.214:8130',
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.2.214:8130',
javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000",
// javaUrl:"http://192.168.2.215:9000",
//Java接口本站文件流下载地址
JavaLocalFileStreamDownLoadUrl: javaUrldo,
};
return obj;
},
......@@ -445,6 +451,56 @@ export default {
successCall(res);
}).catch(function (res) {});
},
Vue.prototype.JavaGetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().JavaLocalFileStreamDownLoadUrl + cmd;
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;
}
let userInfo = localStorage.userInfo ? JSON.parse(localStorage.userInfo) : '';
let groupId = userInfo.RB_Group_id ? userInfo.RB_Group_id : 0;
let uid = userInfo.EmployeeId ? userInfo.EmployeeId : 0;
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
// var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"uid": uid,
"groupId": groupId
}
// 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) {});
},
//ERP本地缓存
Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["userInfo"];
......@@ -648,7 +704,7 @@ export default {
} else if (type === 'h') {
poise = 'm_h'
}
return url + '/image/index?filePath=' + path.replace('http://192.168.2.214:8130', '').replace('http://staticfile.oytour.com', '').split('?')[0] + '&process=resize,' + poise + ',w_' + w + ',h_' + h;
return url + '/image/index?filePath=' + path.replace('http://192.168.2.214:8130', '').replace('http://imgfile.oytour.com', '').split('?')[0] + '&process=resize,' + poise + ',w_' + w + ',h_' + h;
}
Vue.prototype.uploadSelfBlob = function (path, files, successCall) {
let that = this;
......
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