|
@@ -319,27 +319,8 @@ import {
|
|
projectCreate
|
|
projectCreate
|
|
} from '@/api/projectIndex'
|
|
} from '@/api/projectIndex'
|
|
import '@/views/projectManage/publicCss/index.css'
|
|
import '@/views/projectManage/publicCss/index.css'
|
|
-export default {
|
|
|
|
- // beforeRouteLeave(to, from, next) {
|
|
|
|
- // // this.$nextTick(() => {
|
|
|
|
- // // // 这里需要elementui的支持,如果使用其他界面组件自行替换即可
|
|
|
|
- // // this.$confirm('正在离开本页面,本页面内所有未保存数据都会丢失', '警告', {
|
|
|
|
- // // distinguishCancelAndClose: true,
|
|
|
|
- // // confirmButtonText: '确定',
|
|
|
|
- // // cancelButtonText: '取消',
|
|
|
|
- // // type: 'warning'
|
|
|
|
- // // }).then(() => {
|
|
|
|
- // // // 正常跳转
|
|
|
|
- // // next(true)
|
|
|
|
- // // }).catch(() => {
|
|
|
|
- // // // 如果取消跳转地址栏会变化,这时保持地址栏不变
|
|
|
|
- // // window.history.go(1)
|
|
|
|
- // // })
|
|
|
|
- // // })
|
|
|
|
- // // next(false)
|
|
|
|
|
|
|
|
- // this.$store.state.data.status = false
|
|
|
|
- // },
|
|
|
|
|
|
+export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
curIndex: 1,
|
|
curIndex: 1,
|
|
@@ -354,16 +335,10 @@ export default {
|
|
priorityColors: ['#F56C6C', '#FF8952', '#F5E300', '#7ED321', '#61D3B8', '#69B3FF', '#BDBDBD'],
|
|
priorityColors: ['#F56C6C', '#FF8952', '#F5E300', '#7ED321', '#61D3B8', '#69B3FF', '#BDBDBD'],
|
|
rules_form: {
|
|
rules_form: {
|
|
name: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
|
name: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
|
- bizType: [
|
|
|
|
- { required: true, message: '项目类型不能为空', trigger: 'blur' }
|
|
|
|
- ],
|
|
|
|
|
|
+ bizType: [{ required: true, message: '项目类型不能为空', trigger: 'blur' }],
|
|
bizId: [{ required: true, message: '业务线不能为空', trigger: 'blur' }],
|
|
bizId: [{ required: true, message: '业务线不能为空', trigger: 'blur' }],
|
|
- priority: [
|
|
|
|
- { required: true, message: '优先级不能为空', trigger: 'blur' }
|
|
|
|
- ],
|
|
|
|
- projectOwner: [
|
|
|
|
- { required: true, message: '项目负责人不能为空', trigger: 'blur' }
|
|
|
|
- ]
|
|
|
|
|
|
+ priority: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
|
|
|
|
+ projectOwner: [{ required: true, message: '项目负责人不能为空', trigger: 'blur' }]
|
|
},
|
|
},
|
|
userInformation: localStorage.getItem('username'),
|
|
userInformation: localStorage.getItem('username'),
|
|
userNames: localStorage.getItem('realname'),
|
|
userNames: localStorage.getItem('realname'),
|
|
@@ -400,9 +375,30 @@ export default {
|
|
this.get_projectList()
|
|
this.get_projectList()
|
|
this.$store.state.data.status = true
|
|
this.$store.state.data.status = true
|
|
},
|
|
},
|
|
- destroyed() {
|
|
|
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ if (this.form.name !== '') {
|
|
|
|
+ // 这里需要elementui的支持,如果使用其他界面组件自行替换即可
|
|
|
|
+ this.$confirm('正在离开本页面,本页面内所有未保存数据都会丢失', '警告', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ // 正常跳转
|
|
|
|
+ next(true)
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ // 如果取消跳转地址栏会变化,这时保持地址栏不变
|
|
|
|
+ window.history.go(1)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ next(false)
|
|
|
|
+
|
|
this.$store.state.data.status = false
|
|
this.$store.state.data.status = false
|
|
},
|
|
},
|
|
|
|
+ // destroyed() {
|
|
|
|
+ // this.$store.state.data.status = false
|
|
|
|
+ // },
|
|
methods: {
|
|
methods: {
|
|
test2(item, e) {
|
|
test2(item, e) {
|
|
// 获取团队人员信息
|
|
// 获取团队人员信息
|