From cb97962ddabeca96cc4cc15789c0ded3ee49181a Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Sat, 9 Oct 2021 20:48:23 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AE=A2=E5=8D=95=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E3=80=81=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/setting.js | 9 +-
src/utils/api.js | 4 +-
src/views/course/assetConfig.vue | 15 +-
src/views/order/AddOrder.vue | 726 ++++++++++++++++---------------
src/views/order/Order.vue | 241 +++++-----
src/views/serve/Configure.vue | 1 +
6 files changed, 519 insertions(+), 477 deletions(-)
diff --git a/src/setting.js b/src/setting.js
index dcf186d..7e80f78 100644
--- a/src/setting.js
+++ b/src/setting.js
@@ -3,19 +3,18 @@
* */
const url = location.host;
const isDev = process.env.NODE_ENV === 'development'; // 开发环境
-const isTest = url.includes('10.196.131.73'); //测试服
+const isTest = url.includes('39.108.250.202'); //测试服
const isPro = url.includes('120.78.127.12'); //正式服
-
let jumpPath = "";
let host = "";
if (isDev) {
jumpPath = "http://192.168.31.154:8087/";
// host = 'http://192.168.31.216:9000'// 榕
- host = 'http://192.168.31.125:9000'// 坤
- // host = 'http://192.168.31.137:9000'// 陈赓
+ // host = 'http://192.168.31.125:9000'// 坤
+ host = 'http://192.168.31.137:9000'// 赓
} else if (isTest) {
- jumpPath = "";
+ jumpPath = "http://39.108.250.202/judgmentPoint/";
host = "http://39.108.250.202:9000";
} else if (isPro) {
jumpPath = "";
diff --git a/src/utils/api.js b/src/utils/api.js
index 08f3d51..ddb499f 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -1,9 +1,7 @@
import Setting from '@/setting';
-// let host = Setting.host;
+let host = Setting.host;
let uploadURL = "http://8.134.8.197:8001";
-let host = "http://192.168.31.151:9000"; // 榕
-
export default {
logins: `${host}/users/users/user/login`, //登录
diff --git a/src/views/course/assetConfig.vue b/src/views/course/assetConfig.vue
index 5b5d92c..9fad8ce 100644
--- a/src/views/course/assetConfig.vue
+++ b/src/views/course/assetConfig.vue
@@ -262,7 +262,7 @@ export default {
getData() {
this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`)
.then(res => {
- this.chapters = res.data.chapterList;
+ this.chapters = res.chapterList;
})
.catch(err => {
@@ -324,11 +324,12 @@ export default {
);
},
uploadSuccess(res, file, fileList) {
+ console.log(res);
this.uploading = false;
- this.fileId = res.data.filesResult.fileId;
- this.fileType = res.data.filesResult.fileType;
- this.fileUrl = res.data.filesResult.fileUrl;
- this.fileName = res.data.filesResult.ossFileName;
+ this.fileId = res.filesResult.fileId;
+ this.fileType = res.filesResult.fileType;
+ this.fileUrl = res.filesResult.fileUrl;
+ this.fileName = res.filesResult.ossFileName;
},
uploadError(err, file, fileList) {
this.$message({
@@ -476,7 +477,7 @@ export default {
preview(row) {
if (this.transferType(row.fileType) == "视频") {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
- this.playAuth = res.data.playAuth;
+ this.playAuth = res.playAuth;
if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else {
@@ -518,7 +519,7 @@ export default {
this.isWord = false;
this.isExcel = false;
}
- this.iframeSrc = res.data.previewUrl;
+ this.iframeSrc = res.previewUrl;
this.$nextTick(() => {
this.iframeOnload();
});
diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue
index 588c4c6..022a596 100644
--- a/src/views/order/AddOrder.vue
+++ b/src/views/order/AddOrder.vue
@@ -6,18 +6,13 @@
-
+
返回
订单处理
-
-
确定
-
-
-
确定
+ 确定
@@ -109,67 +104,71 @@
课程权限
- 添加
+ 添加
-
-
+
+
-
+
-
+
-
-
+
- 月
+ 月
- 请输入使用期限,且确认发货
-
-
{{ scope.row.startTime }}
-
-
{{ scope.row.endTime }}
-
+ 请输入使用期限
+ {{ scope.row.startTime }} - {{ scope.row.endTime }}
-
- 天
+ 天
-
- 万
+ 万
-
+
-
- 万
+ 万
-
@@ -179,15 +178,34 @@
配置
-
+
-
-
+
+ 删除
+
+
+
+
+
+
@@ -202,58 +220,55 @@
数据平台权限
- 添加
-
-
+
+
+
-
+
-
-
+
@@ -57,12 +66,15 @@
订单列表
- 新建订单
+ 新建订单
+
批量删除
-
-
+
+
@@ -83,15 +95,20 @@
- {{scope.row.orderStatus==='已完成'?'修改':'处理'}}
+
+ {{ scope.row.orderStatus === "已完成" ? "修改" : "处理" }}
+
查看
删除
- 续费
+ 续费
+
@@ -105,170 +122,176 @@ export default {
data() {
return {
form: {
- provinces: '',
- city: '',
- orderType: '',
- orderStatus: ''
+ provinces: "",
+ city: "",
+ orderType: "",
+ orderStatus: ""
},
- keyword: '',
- orderData:[],
+ keyword: "",
+ orderData: [],
multipleSelection: [],
provinceList: this.$store.state.provinceList,
cityList: [],
orderTypeList: [{
- name: '正式',
+ name: "正式",
value: 1
},
- {
- name: '试用',
- value: 2
- }],
+ {
+ name: "试用",
+ value: 2
+ }],
orderStatusList: [{
- name: '待发货',
+ name: "待发货",
value: 0
},
- {
- name: '已完成',
- value: 1
- },
- {
- name: '已取消',
- value: 2
- }],
+ {
+ name: "已完成",
+ value: 1
+ },
+ {
+ name: "已取消",
+ value: 2
+ }],
pageNo: 1,
pageSize: 10,
totals: 1,
- setTime:'',
+ setTime: ""
};
},
watch: {
keyword: function(val) {
- clearTimeout(this.setTime)
- this.setTime = setTimeout(()=>{
- this.onSearch()
- },500)
- },
+ clearTimeout(this.setTime);
+ this.setTime = setTimeout(() => {
+ this.onSearch();
+ }, 500);
+ }
},
created() {
- this.getData()
+ this.getData();
},
methods: {
- test(val){
- if(val.length>5){
- val = 5
+ test(val) {
+ if (val.length > 5) {
+ val = 5;
}
-
+
},
getData() {
let data = {
cityId: this.form.city,
- customerName:this.keyword,
+ customerName: this.keyword,
orderStatus: this.form.orderStatus,
orderType: this.form.orderType,
pageNo: this.pageNo,
pageSize: this.pageSize,
- provinceId: this.form.provinces,
- }
- this.$post(this.api.orderList,data).then(res => {
+ provinceId: this.form.provinces
+ };
+ this.$post(this.api.orderList, data).then(res => {
res.orderPage.orders.forEach(e => {
- e.orderType = this.orderTypeFn(e.orderType)
- e.orderStatus = this.orderStatusFn(e.orderStatus)
- e.orderNature = this.orderNatureFn(e.orderNature)
- })
- this.orderData = res.orderPage.orders
- this.totals =res.orderPage.total
- }).catch(res => {});
+ e.orderType = this.orderTypeFn(e.orderType);
+ e.orderStatus = this.orderStatusFn(e.orderStatus);
+ e.orderNature = this.orderNatureFn(e.orderNature);
+ });
+ this.orderData = res.orderPage.orders;
+ this.totals = res.orderPage.total;
+ }).catch(res => {
+ });
},
// 清除省份
- clearprovince(){
- this.form.city = ''
+ clearprovince() {
+ this.form.city = "";
},
// 获取城市
- getCity(){
- this.clearprovince()
- this.getCityData()
- this.pageNo = 1
- this.getData()
+ getCity() {
+ this.clearprovince();
+ this.getCityData();
+ this.pageNo = 1;
+ this.getData();
},
- getCityData(){
+ getCityData() {
let data = {
provinceId: this.form.provinces
- }
- this.$get(this.api.queryCity,data).then(res => {
- this.cityList = res.list
- }).catch(res => {});
+ };
+ this.$get(this.api.queryCity, data).then(res => {
+ this.cityList = res.list;
+ }).catch(res => {
+ });
},
- addOrder(){
- this.$store.commit("systemData", { order_id : ''});
- this.$router.push('/addorder');
+ addOrder() {
+ this.$store.commit("systemData", { order_id: "" });
+ this.$router.push("/addorder");
},
- handle(val,row){
- this.$router.push('/addorder?'+val+'='+row.orderId);
+ handle(val, row) {
+ this.$router.push("/addorder?" + val + "=" + row.orderId);
},
// 删除订单
handleDelete(row) {
- this.$confirm('确定要删除吗?', '提示', {
- type: 'warning'
- })
- .then(() => {
- var arr = []
- arr.push(row.orderId)
- this.$post(this.api.orderDelete,{ids:arr}).then(res => {
- this.$message.success('删除成功');
- this.getData()
- }).catch(res => {});
+ this.$confirm("确定要删除吗?", "提示", {
+ type: "warning"
})
- .catch(() => {});
+ .then(() => {
+ var arr = [];
+ arr.push(row.orderId);
+ this.$post(this.api.orderDelete, { ids: arr }).then(res => {
+ this.$message.success("删除成功");
+ this.getData();
+ }).catch(res => {
+ });
+ })
+ .catch(() => {
+ });
},
// 续签
- handleRenew(row){
+ handleRenew(row) {
},
getRowKeys(row) {
return row.orderId;
},
handleSelectionChange(val) {
- if(val.length>0){
- this.multipleSelection = val.map(e=>e.orderId);
- }else{
- this.multipleSelection = []
+ if (val.length > 0) {
+ this.multipleSelection = val.map(e => e.orderId);
+ } else {
+ this.multipleSelection = [];
}
},
delAllSelection() {
- if(this.multipleSelection.length != ''){
+ if (this.multipleSelection.length != "") {
// 批量删除
- this.$confirm('确定要删除吗?', '提示', {
- type: 'warning'
+ this.$confirm("确定要删除吗?", "提示", {
+ type: "warning"
})
- .then(() => {
- this.$post(this.api.orderDelete,{ids:this.multipleSelection}).then(res => {
- this.multipleSelection = [];
- this.$message.success('删除成功');
- this.getData()
- }).catch(err => {});
- }).catch(err => {});
- }else{
- this.$message.error('请先选择订单 !');
+ .then(() => {
+ this.$post(this.api.orderDelete, { ids: this.multipleSelection }).then(res => {
+ this.multipleSelection = [];
+ this.$message.success("删除成功");
+ this.getData();
+ }).catch(err => {
+ });
+ }).catch(err => {
+ });
+ } else {
+ this.$message.error("请先选择订单 !");
}
},
- onSearch(){
- this.pageNo = 1
- this.getData()
+ onSearch() {
+ this.pageNo = 1;
+ this.getData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
},
// 选择客户触发
- gotoClient(){
- this.$router.push('')
+ gotoClient() {
+ this.$router.push("");
}
}
};
diff --git a/src/views/serve/Configure.vue b/src/views/serve/Configure.vue
index f1a434d..0c9f0b3 100644
--- a/src/views/serve/Configure.vue
+++ b/src/views/serve/Configure.vue
@@ -188,6 +188,7 @@ export default {
this.$router.push(`/projectList/?systemId=${row.systemId}&show=1`)
},
getIntoJudgement(row) {
+ // console.log(`${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`);
location.href = `${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`;
},
setCookie(name, value) {