|
@@ -19,179 +19,11 @@ export default {
|
|
|
showCard:0,//0 应用中心 1:工作空间
|
|
|
}
|
|
|
},
|
|
|
-<<<<<<< HEAD
|
|
|
- methods: {
|
|
|
- changeType(newIndex) {
|
|
|
- let flag = this.showType === newIndex;
|
|
|
- this.showType = newIndex;
|
|
|
- if (!flag) {
|
|
|
- this.getData();
|
|
|
- }
|
|
|
- },
|
|
|
- changeSelectType() {
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- getData() {
|
|
|
- this.getDataLoading = true;
|
|
|
- let params = {
|
|
|
- uid: this.userId,//用户ID
|
|
|
- name: this.searchText,//应用名称搜索
|
|
|
- label: "",//应用的标签搜索
|
|
|
- type: this.showType,//应用的类型
|
|
|
- juri: this.selectJuri,//应用权限 1:我的 2:组织内 3:所有人
|
|
|
- stand: "hk"//cn站还是hk站
|
|
|
- };
|
|
|
-
|
|
|
- this.ajax
|
|
|
- .get(this.$store.state.api + "select_appStore", params)
|
|
|
- .then(res => {
|
|
|
- this.getDataLoading = false;
|
|
|
- let _data = res.data[0];
|
|
|
- if (_data.length > 0) {
|
|
|
- this.dataList = _data;
|
|
|
- } else {
|
|
|
- this.dataList = [];
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- this.getDataLoading = false;
|
|
|
- console.log(err);
|
|
|
- this.$message.error("获取应用失败");
|
|
|
- });
|
|
|
- },
|
|
|
- addApp() {
|
|
|
- this.$refs.addAppDialogRef.open({ type: 1 });
|
|
|
- },
|
|
|
- updateApp(data) {
|
|
|
- this.$refs.addAppDialogRef.open({
|
|
|
- type: 2,
|
|
|
- form: {
|
|
|
- id: data.id,
|
|
|
- nname: data.name,
|
|
|
- nlabel: data.label,
|
|
|
- ndetail: data.detail,
|
|
|
- nurl: data.url,
|
|
|
- ntype: data.type,
|
|
|
- njuri: data.juri,
|
|
|
- nstand: data.stand,
|
|
|
- njson: data.json
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- updateCard(id){
|
|
|
- if(this.editAppCard === id)return this.editAppCard = null;
|
|
|
- this.editAppCard = id;
|
|
|
- },
|
|
|
- handleBlur(){
|
|
|
- this.updateCard(null);
|
|
|
- },
|
|
|
- addAppSuccess(data, type) {
|
|
|
- if (type === 1) {
|
|
|
- //添加
|
|
|
- let params = [
|
|
|
- {
|
|
|
- nname: data.nname, //app名称
|
|
|
- nuserid: this.userId, //创建的用户ID
|
|
|
- nlabel: data.nlabel, //app标签
|
|
|
- ndetail: data.ndetail, //app简介
|
|
|
- nurl: data.nurl, //app链接
|
|
|
- ntype: data.ntype, //app类型
|
|
|
- njuri: data.njuri, //app权限 1:我的 2:组织 3:所有人
|
|
|
- nstand: "hk", //语言
|
|
|
- njson: "" //其他信息
|
|
|
- }
|
|
|
- ];
|
|
|
- this.ajax
|
|
|
- .post(this.$store.state.api + "insert_appStore", params)
|
|
|
- .then(res => {
|
|
|
- if (res.data == 1) {
|
|
|
- this.$message.success("添加成功");
|
|
|
- this.$refs.addAppDialogRef.close(true);
|
|
|
- this.getData();
|
|
|
- } else {
|
|
|
- this.$message.error("添加失败");
|
|
|
- this.$refs.addAppDialogRef.loading = false;
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log(err);
|
|
|
- this.$message.error("添加失败");
|
|
|
- });
|
|
|
- } else if (type === 2) {
|
|
|
- let params = [
|
|
|
- {
|
|
|
- aid: data.id,
|
|
|
- nname: data.nname, //app名称
|
|
|
- nuserid: this.userId, //创建的用户ID
|
|
|
- nlabel: data.nlabel, //app标签
|
|
|
- ndetail: data.ndetail, //app简介
|
|
|
- nurl: data.nurl, //app链接
|
|
|
- ntype: data.ntype, //app类型
|
|
|
- njuri: data.njuri, //app权限 1:我的 2:组织 3:所有人
|
|
|
- nstand: "hk", //语言
|
|
|
- njson: data.njson //其他信息
|
|
|
- }
|
|
|
- ]
|
|
|
- this.ajax
|
|
|
- .post(this.$store.state.api + "update_appStore", params)
|
|
|
- .then(res => {
|
|
|
- if (res.data == 1) {
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.$refs.addAppDialogRef.close(true);
|
|
|
- this.getData();
|
|
|
- } else {
|
|
|
- this.$message.error("修改失败");
|
|
|
- this.$refs.addAppDialogRef.loading = false;
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log(err);
|
|
|
- this.$message.error("修改失败");
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- getTypeList() {
|
|
|
- let params = {
|
|
|
- suserid: this.userId,//用户ID
|
|
|
- sorg: this.org,
|
|
|
- soid: this.oid,
|
|
|
- sstand: "hk"
|
|
|
- };
|
|
|
-
|
|
|
- this.ajax
|
|
|
- .get(this.$store.state.api + "select_appStoreType", params)
|
|
|
- .then(res => {
|
|
|
- let data = res.data[0];
|
|
|
- if (data.length > 0) {
|
|
|
- this.typeList = data;
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log(err);
|
|
|
- this.$message.error("获取应用类型失败");
|
|
|
- });
|
|
|
- },
|
|
|
- openApp(url) {
|
|
|
- window.open(url, "_blank");
|
|
|
- },
|
|
|
- resetData() {
|
|
|
- this.searchText = "";
|
|
|
- this.selectJuri = 1;
|
|
|
- this.showType = "";
|
|
|
- this.getData();
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.getTypeList();
|
|
|
- this.getData();
|
|
|
- }
|
|
|
-=======
|
|
|
methods: {
|
|
|
changeShowCard(newValue){
|
|
|
this.showCard = newValue;
|
|
|
}
|
|
|
},
|
|
|
->>>>>>> beta
|
|
|
};
|
|
|
</script>
|
|
|
|