|
@ -1,6 +1,6 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="py-3 mt-4 bg-white u-font-15"> |
|
|
<view class="py-3 mt-4 bg-white u-font-15"> |
|
|
<PrettyExchange @change="change"></PrettyExchange> |
|
|
<PrettyExchange @change="change" /> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -23,7 +23,6 @@ export default { |
|
|
arr.push(item.name); |
|
|
arr.push(item.name); |
|
|
}); |
|
|
}); |
|
|
this.setProjectSort(projectIdList); |
|
|
this.setProjectSort(projectIdList); |
|
|
console.log('arr: ', arr); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.setProjectRelation(options); |
|
|
this.setProjectRelation(options); |
|
|
} |
|
|
} |
|
@ -50,24 +49,13 @@ export default { |
|
|
* @param { string } id 当前移动的项目的id |
|
|
* @param { string } id 当前移动的项目的id |
|
|
* @param { string } parentId 父项目的id |
|
|
* @param { string } parentId 父项目的id |
|
|
*/ |
|
|
*/ |
|
|
openProject(project) { |
|
|
|
|
|
const { name, id, url } = project; |
|
|
|
|
|
url && (uni.$t.domain = url); |
|
|
|
|
|
this.$u.route('pages/project-webview/project-webview', { |
|
|
|
|
|
u: this.userId, |
|
|
|
|
|
p: id, |
|
|
|
|
|
pname: name, |
|
|
|
|
|
url: encodeURIComponent(url), |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async setProjectRelation(options) { |
|
|
async setProjectRelation(options) { |
|
|
try { |
|
|
try { |
|
|
const params = options; |
|
|
const params = options; |
|
|
await this.$u.api.setProjectRelation(params); |
|
|
await this.$u.api.setProjectRelation(params); |
|
|
this.$t.ui.showToast('排序修改成功'); |
|
|
this.$t.ui.showToast('排序修改成功'); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.log('error: ', error); |
|
|
console.error('error: ', error); |
|
|
this.$t.ui.showToast(error.msg || '排序修改失败'); |
|
|
this.$t.ui.showToast(error.msg || '排序修改失败'); |
|
|
} |
|
|
} |
|
|
this.$emit('getProjects'); |
|
|
this.$emit('getProjects'); |
|
|