|
@@ -33,14 +33,14 @@
|
|
|
</div>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
- <addMonthly :show.sync="show" :title="title" />
|
|
|
+ <addMonthly :show.sync="show" :title="title" @monthly_created="monthly_created" />
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import logoUrl from '@/assets/内页logo2@2x.png'
|
|
|
import addMonthly from './components/createdMonthly.vue'
|
|
|
-import { materialGetMaterialList, materialDeleteMaterial } from '@/api/monthly/index.js'
|
|
|
+import { materialGetMaterialList, materialDeleteMaterial, materialAddMaterial } from '@/api/monthly/index.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
addMonthly
|
|
@@ -102,6 +102,14 @@ export default {
|
|
|
this.$message({ type: 'info', message: '已取消删除' })
|
|
|
})
|
|
|
},
|
|
|
+ async monthly_created(data) {
|
|
|
+ console.log(data, 'cdbjksbkj')
|
|
|
+ const res = await materialAddMaterial()
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.materialGetMaterialList()
|
|
|
+ this.$message({ type: 'success', message: '创建成功!' })
|
|
|
+ }
|
|
|
+ },
|
|
|
addMonthly() {
|
|
|
this.title = '新建'
|
|
|
this.show = true
|