|
|
@@ -207,6 +207,73 @@
|
|
|
>
|
|
|
<div ref="three" style="height: 85vh" class="three"></div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 设置项目成员资源使用权限 -->
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="sourceCanFlag"
|
|
|
+ width="700px"
|
|
|
+ append-to-body
|
|
|
+ :show-close="true"
|
|
|
+ title="项目成员资源使用权限"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <el-table :data="memberList" :loading="tableLoading">
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ class-name="index-column"
|
|
|
+ label="序号"
|
|
|
+ width="60"
|
|
|
+ align="center"
|
|
|
+ header-align="center"
|
|
|
+ />
|
|
|
+ <el-table-column prop="user_real_name" label="真实姓名" align="center" header-align="center" />
|
|
|
+
|
|
|
+ <el-table-column prop="is_project_leader" label="项目组长" align="center" header-align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <i v-if="row.is_project_leader === 'true'" class="el-icon-check"></i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="is_can_use" label="可使用" align="center" header-align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <i v-if="row.is_can_use === 'true'" class="el-icon-check"></i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="is_can_download" label="可下载" align="center" header-align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <i v-if="row.is_can_download === 'true'" class="el-icon-check"></i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="is_can_upload" label="可上传" align="center" header-align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <i v-if="row.is_can_upload === 'true'" class="el-icon-check"></i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="operation" label="操作" align="center" header-align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span class="link" @click="setUserPopedom(row)">设置权限</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ :visible="userPopedomFlag"
|
|
|
+ width="420px"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :append-to-body="true"
|
|
|
+ :title="`设置(${userInfo.user_real_name})的资源使用权限`"
|
|
|
+ @close="userPopedomFlag = false"
|
|
|
+ v-if="userInfo"
|
|
|
+ >
|
|
|
+ <div class="popedom_list">
|
|
|
+ <el-switch v-model="is_can_use" active-text="可使用" />
|
|
|
+ <el-switch v-model="is_can_download" active-text="可下载" />
|
|
|
+ <el-switch v-model="is_can_upload" active-text="可上传" />
|
|
|
+ </div>
|
|
|
+ <div slot="footer">
|
|
|
+ <el-button @click="userPopedomFlag = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="setUserPopedomSure">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -220,6 +287,8 @@ import {
|
|
|
MangerUpdateResourceFile,
|
|
|
MangerUpdateResourceInfo,
|
|
|
MangerMoveResource,
|
|
|
+ GetProjectMemberResourcePopedomList,
|
|
|
+ SetProjectMemberResourcePopedom,
|
|
|
} from '@/api/book';
|
|
|
import { GetProjectBaseInfo } from '@/api/project';
|
|
|
import PaginationPage from '@/components/PaginationPage.vue';
|
|
|
@@ -235,11 +304,14 @@ import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';
|
|
|
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
|
|
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
|
|
|
|
+import { isEnable } from '@/views/book/courseware/data/common';
|
|
|
+
|
|
|
export default {
|
|
|
name: 'ProjectResourceManager',
|
|
|
components: { MenuPage, MenuTree, PaginationPage, UploadFile },
|
|
|
data() {
|
|
|
return {
|
|
|
+ isEnable,
|
|
|
book_id: this.$route.params.id,
|
|
|
node_list: [],
|
|
|
select_node: '',
|
|
|
@@ -328,6 +400,14 @@ export default {
|
|
|
controls: null,
|
|
|
animationId: null,
|
|
|
loaded: false, // 是否加载完成
|
|
|
+ sourceCanFlag: false, // 项目成员设置权限
|
|
|
+ memberList: [], // 项目成员列表
|
|
|
+ tableLoading: false,
|
|
|
+ userPopedomFlag: false,
|
|
|
+ userInfo: null,
|
|
|
+ is_can_use: false,
|
|
|
+ is_can_download: false,
|
|
|
+ is_can_upload: false,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -448,7 +528,49 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 设置项目成员资源使用权限
|
|
|
- handlePersonal() {},
|
|
|
+ handlePersonal() {
|
|
|
+ this.sourceCanFlag = true;
|
|
|
+ this.tableLoading = true;
|
|
|
+ this.memberList = [];
|
|
|
+ GetProjectMemberResourcePopedomList({ project_id: this.book_id })
|
|
|
+ .then((res) => {
|
|
|
+ this.tableLoading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.memberList = res.member_list;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.tableLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 设置用户权限
|
|
|
+ */
|
|
|
+ setUserPopedom(row) {
|
|
|
+ this.userPopedomFlag = true;
|
|
|
+ this.userInfo = row;
|
|
|
+ this.is_can_use = this.isEnable(row.is_can_use);
|
|
|
+ this.is_can_download = this.isEnable(row.is_can_download);
|
|
|
+ this.is_can_upload = this.isEnable(row.is_can_upload);
|
|
|
+ },
|
|
|
+ // 确定设置用户权限
|
|
|
+ setUserPopedomSure() {
|
|
|
+ SetProjectMemberResourcePopedom({
|
|
|
+ project_id: this.book_id,
|
|
|
+ user_id: this.userInfo.user_id,
|
|
|
+ is_can_use: JSON.stringify(this.is_can_use),
|
|
|
+ is_can_download: JSON.stringify(this.is_can_download),
|
|
|
+ is_can_upload: JSON.stringify(this.is_can_upload),
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.$message.success('操作成功!');
|
|
|
+ this.userPopedomFlag = false;
|
|
|
+ this.handlePersonal();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
|
|
|
// 移动文件
|
|
|
handleMoveFile() {
|
|
|
@@ -1023,4 +1145,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.popedom_list {
|
|
|
+ display: flex;
|
|
|
+ gap: 30px;
|
|
|
+}
|
|
|
</style>
|