|
@@ -21,13 +21,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import axios from 'axios'
|
|
|
import luckyexcel from "luckyexcel";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
excelStatus: false,
|
|
|
optionsExcel: [],
|
|
|
- ids:'',
|
|
|
+ ids: "",
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -149,48 +150,76 @@ export default {
|
|
|
},
|
|
|
data: {},
|
|
|
}).then((res) => {
|
|
|
- this.ids = e.id
|
|
|
+ this.ids = e.id;
|
|
|
// this.optionsExcel = res.data;
|
|
|
- let options ={
|
|
|
- container: "luckysheet",
|
|
|
- title: "123123",
|
|
|
- allowUpdate: true,
|
|
|
- lang: "zh",
|
|
|
- loadUrl: window.location.protocol + '//10.149.85.91:7777' + "/sheet/worksheet/"+this.ids,
|
|
|
- loadSheetUrl: window.location.protocol + '//10.149.85.91:7777' +"/sheet/loadsheet/"+this.ids,
|
|
|
- updateUrl: "ws://"+'//10.149.85.91:7777'+ "/ws/" + JSON.parse(window.sessionStorage.userInfo).loginName + "/"+this.ids
|
|
|
- }
|
|
|
- window.luckysheet.create(options)
|
|
|
- this.excelStatus = true
|
|
|
-
|
|
|
+ let options = {
|
|
|
+ container: "luckysheet",
|
|
|
+ title: "123123",
|
|
|
+ allowUpdate: true,
|
|
|
+ lang: "zh",
|
|
|
+ loadUrl:
|
|
|
+ window.location.protocol +
|
|
|
+ "//43.138.50.94:7777" +
|
|
|
+ "/sheet/worksheet/" +
|
|
|
+ this.ids,
|
|
|
+ loadSheetUrl:
|
|
|
+ window.location.protocol +
|
|
|
+ "//43.138.50.94:7777" +
|
|
|
+ "/sheet/loadsheet/" +
|
|
|
+ this.ids,
|
|
|
+ updateUrl:
|
|
|
+ "ws://" +
|
|
|
+ "//43.138.50.94:7777" +
|
|
|
+ "/ws/" +
|
|
|
+ JSON.parse(window.sessionStorage.userInfo).loginName +
|
|
|
+ "/" +
|
|
|
+ this.ids,
|
|
|
+ };
|
|
|
+ window.luckysheet.create(options);
|
|
|
+ this.excelStatus = true;
|
|
|
});
|
|
|
},
|
|
|
//获取所有
|
|
|
getAllExcel() {
|
|
|
- this.$http({
|
|
|
- url: "/api/sheet/allSheet",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- data: {},
|
|
|
- }).then((res) => {
|
|
|
+ let data = {};
|
|
|
+ axios.post("http://43.138.50.94:7777/sheet/allSheet", data).then((res) => {
|
|
|
console.log(res);
|
|
|
this.optionsExcel = res.data;
|
|
|
});
|
|
|
+ // this.$http({
|
|
|
+ // url: "/api/sheet/allSheet",
|
|
|
+ // method: "post",
|
|
|
+ // headers: {
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // },
|
|
|
+ // data: {},
|
|
|
+ // }).then((res) => {
|
|
|
+ // console.log(res);
|
|
|
+ // this.optionsExcel = res.data;
|
|
|
+ // });
|
|
|
},
|
|
|
newExcle() {
|
|
|
- // this.excelStatus = true
|
|
|
- this.$http({
|
|
|
- url: "/api/sheet/create",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- data: {},
|
|
|
- }).then((res) => {
|
|
|
+ let data = {};
|
|
|
+ axios.post("http://43.138.50.94:7777/sheet/create", data).then((res) => {
|
|
|
console.log(res);
|
|
|
+ let list = {
|
|
|
+ name:res.data.name,
|
|
|
+ id:res.data.id
|
|
|
+ }
|
|
|
+ this.optionsExcel.push(list)
|
|
|
+ // this.optionsExcel = res.data;
|
|
|
});
|
|
|
+ // this.excelStatus = true
|
|
|
+ // this.$http({
|
|
|
+ // url: "/api/sheet/create",
|
|
|
+ // method: "post",
|
|
|
+ // headers: {
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // },
|
|
|
+ // data: {},
|
|
|
+ // }).then((res) => {
|
|
|
+ // console.log(res);
|
|
|
+ // });
|
|
|
},
|
|
|
},
|
|
|
};
|