Commit 646007b6 by duanguohui

优化

parent ec7084ce
......@@ -7606,6 +7606,11 @@
}
}
},
"moment": {
"version": "2.24.0",
"resolved": "https://registry.npm.taobao.org/moment/download/moment-2.24.0.tgz",
"integrity": "sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz",
......
......@@ -11,6 +11,7 @@
"axios": "^0.18.0",
"core-js": "^2.6.5",
"element-ui": "^2.9.1",
"moment": "^2.24.0",
"vue": "^2.6.10",
"vue-router": "^3.0.3",
"vuex": "^3.0.1"
......
......@@ -90,7 +90,7 @@ export default {
"herf": this.addForm.herf ? this.addForm.herf : '',
"id": 0,
"name": this.addForm.name,
"status": this.addForm.status,
"status": this.addForm.status ? '1' : '2',
"url": this.addForm.url,
"userName": JSON.parse(window.localStorage.getItem('userInfo')).data.userResponse.userName
}
......
......@@ -90,8 +90,8 @@
</div>
</div>
</template>
<script>
import moment from 'moment'
export default {
name: 'cookDetail',
data () {
......@@ -126,6 +126,8 @@ export default {
} else {
param.id = 0
param.status ? param.status = 'Y' : param.status = 'N'
param.starDate = moment(param.starDate).format('YYYY-MM-DD HH:MM:SS')
param.endDate = moment(param.endDate).format('YYYY-MM-DD HH:MM:SS')
this.$axios.post('/pccook/add/cook', param).then(()=>{
this.$message.success('新增成功')
this.goBack()
......
......@@ -69,7 +69,7 @@
label="操作">
<template slot-scope="scope">
<a href="javascript:;" @click="goEdit(scope.row.id, $event)" class="btn_edit">编辑</a>
<a href="javascript:;" @click="goDelete" class="btn_delete">删除</a>
<a href="javascript:;" @click="goDelete(scope.row.id, $event)" class="btn_delete">删除</a>
</template>
</el-table-column>
</el-table>
......@@ -119,14 +119,19 @@ export default {
id: id
}})
},
goDelete (e) {
goDelete (id, e) {
e.stopPropagation()
this.$confirm('提示', '确认删除此条信息?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios({
method: 'get',
url: '/pccook/delete/' + id,
}).then((res) => {
this.getList()
})
}).catch(() => {
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment