|
|
@@ -16,11 +16,12 @@
|
|
|
<span class=" sp1 mt-5">{{ item.projectNumber }}<span class="grey font-14 ml-5">个</span></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <base-button class="ml-20 mt-20" icon="Edit" title="项目导入"
|
|
|
+ @click="showImport = true"/>
|
|
|
<div v-if='permissions.permissions?.projectAdd' class='flex flex-center flex-justify-start'>
|
|
|
<base-button class="ml-20 mt-20" icon="Plus" title="新增"
|
|
|
@click="showAdd = true"/>
|
|
|
- <base-button class="ml-20 mt-20" icon="Edit" title="项目导入"
|
|
|
- @click="showImport = true"/>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<avue-crud ref="crud"
|
|
|
@@ -107,7 +108,7 @@
|
|
|
</el-form-item>
|
|
|
<div class="flex flex-center mt-10">
|
|
|
<base-button class="mr-20" icon="Close" title="取消" type="0" @click="showAdd = false"/>
|
|
|
- <base-button icon="Check" title="保存" @click="projectSave"/>
|
|
|
+ <base-button icon="Check" title="保存" @click="projectSave"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
@@ -152,6 +153,7 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ disable: false,
|
|
|
showAdd: false,
|
|
|
showImport: false,
|
|
|
active: 0,
|
|
|
@@ -360,9 +362,15 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
projectSave () {
|
|
|
+ if (this.disable) {
|
|
|
+ this.$message.error('正在处理,请稍后...')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ this.disable = true
|
|
|
this.$api.project.projectAdd(this.projectForm).then(res => {
|
|
|
+ this.disable = false
|
|
|
if (res.code === 200) {
|
|
|
this.showAdd = false
|
|
|
this.$message.success(res.msg)
|