|
@@ -139,7 +139,7 @@
|
|
|
<!-- 缺陷 -->
|
|
|
<el-container v-if="activeName === '4'" class="is-vertical">
|
|
|
<section class="main-section contain">
|
|
|
- <bugTableDialog ref="bugTableDialog" :obj-id="{ projectId: Number(this.$route.query.id) }" />
|
|
|
+ <bugTableDialog ref="bugTableDialog" :obj-id="{ projectId: projectId }" />
|
|
|
</section>
|
|
|
</el-container>
|
|
|
<!-- 缺陷 -->
|
|
@@ -183,7 +183,7 @@
|
|
|
@childValInput="childVal"
|
|
|
@click.stop
|
|
|
/>
|
|
|
- <modify-project :show.sync="modify_project" @change="get_list" />
|
|
|
+ <modify-project v-if="modify_project" :show.sync="modify_project" @change="get_list" />
|
|
|
</el-container></div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -191,6 +191,8 @@ const _ = require('lodash')
|
|
|
import Vue from 'vue'
|
|
|
import VueClipboard from 'vue-clipboard2'
|
|
|
Vue.use(VueClipboard)
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
+import { analysisBizId_id } from '@/utils/crypto-js.js'
|
|
|
import {
|
|
|
projectList,
|
|
|
projectUpdate,
|
|
@@ -205,7 +207,6 @@ import tasksList from './components/taskList'
|
|
|
import needsList from './components/needsList'
|
|
|
import modifyProject from './components/modifyProject'
|
|
|
import openDialog from '@/views/projectManage/dialog_vue'
|
|
|
-import Utils from '../../../util.js'
|
|
|
import RequirementCreate from '@/views/projectManage/requirement/list/create'
|
|
|
import createdBug from '@/views/projectManage/bugList/file/createdBug'
|
|
|
import '@/views/projectManage/projectList/css/index.css'
|
|
@@ -239,6 +240,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ projectId: -1, // 项目id
|
|
|
activeName: '1', // 顶部tab切换
|
|
|
num: '',
|
|
|
image_url: image_url,
|
|
@@ -266,7 +268,6 @@ export default {
|
|
|
userInformation: localStorage.getItem('username'),
|
|
|
userNames: localStorage.getItem('realname'),
|
|
|
textarea: '', // 项目总目标
|
|
|
- projectId: Number(this.$route.query.id), // 项目id
|
|
|
form_query: {},
|
|
|
modify_project: false,
|
|
|
deleteVisible: false, // 删除项目弹框
|
|
@@ -275,12 +276,15 @@ export default {
|
|
|
requirement: {}
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['bizId'])
|
|
|
+ },
|
|
|
watch: {
|
|
|
activeName: {
|
|
|
handler(newV) {
|
|
|
Number(newV) > 0
|
|
|
- ? this.$router.push({ path: this.$route.path, query: { id: this.$route.query.id, page: newV }})
|
|
|
- : this.$router.push({ path: this.$route.path, query: { id: this.$route.query.id, page: '1' }})
|
|
|
+ ? this.$router.push({ path: this.$route.path, query: { ...this.$route.query, page: newV }})
|
|
|
+ : this.$router.push({ path: this.$route.path, query: { ...this.$route.query, page: '1' }})
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -288,16 +292,20 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.activeName = this.$route.query.page ? this.$route.query.page : '1'
|
|
|
})
|
|
|
- this.get_list()
|
|
|
+ this.analysisBizId_id()
|
|
|
this.initRequirementCreateDialog()
|
|
|
this.$store.state.data.status = true
|
|
|
- // this.$store.state.data.bizId = true
|
|
|
},
|
|
|
destroyed() {
|
|
|
this.$store.state.data.status = false
|
|
|
- // this.$store.state.data.bizId = false
|
|
|
},
|
|
|
methods: {
|
|
|
+ analysisBizId_id() { // 解析路由中的bizId_id
|
|
|
+ if (!this.$route.query.bizId_id) return
|
|
|
+ const bizId_id = analysisBizId_id(this.$route.query.bizId_id)
|
|
|
+ this.projectId = bizId_id[1]
|
|
|
+ this.get_list()
|
|
|
+ },
|
|
|
async changeArea(e) { // area修改
|
|
|
const projectInfo = _.cloneDeep(this.form_query)
|
|
|
const res = await projectUpdate({ projectInfo, user: this.user })
|
|
@@ -310,7 +318,7 @@ export default {
|
|
|
},
|
|
|
initRequirementCreateDialog() { // 初始化新建需求弹框
|
|
|
this.requirement.belongingProject = this.projectId // 这里传入项目id
|
|
|
- this.requirement.bizId = localStorage.getItem('bizId') // 这里传入业务线id
|
|
|
+ this.requirement.bizId = this.bizId // 这里传入业务线id
|
|
|
this.requirement.dependOnRelease = 0 // 这里传入是否依赖发版
|
|
|
},
|
|
|
closeDioang() { // 关闭新建需求弹框
|
|
@@ -322,16 +330,12 @@ export default {
|
|
|
async get_list() {
|
|
|
// 获取项目ID(查询)
|
|
|
this.user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
- this.projectId = this.$route.query.id
|
|
|
this.get_project_detail()
|
|
|
this.get_project_Milepost()
|
|
|
},
|
|
|
async get_project_detail() { // 获取项目详情
|
|
|
const res = await projectList({ id: this.projectId })
|
|
|
if (res.code === 200) {
|
|
|
- if (res.data[0].bizId !== Number(localStorage.getItem('bizId'))) {
|
|
|
- Utils.$emit('demo', res.data[0].bizId)
|
|
|
- }
|
|
|
this.form_query = res.data[0]
|
|
|
this.project_from = res.data[0]
|
|
|
this.form_query.status === 0 ? this.$set(this.form_query, 'statusString', '未开始') : ''
|