|
@@ -131,7 +131,7 @@ export default {
|
|
|
if (item.status === 2) {
|
|
if (item.status === 2) {
|
|
|
createChecklistItem(item).then((resp) => {
|
|
createChecklistItem(item).then((resp) => {
|
|
|
const { code, data, msg } = resp
|
|
const { code, data, msg } = resp
|
|
|
- if (code === 0) {
|
|
|
|
|
|
|
+ if (code === 200) {
|
|
|
this.formData = data
|
|
this.formData = data
|
|
|
// 新增数据成功更新itemList
|
|
// 新增数据成功更新itemList
|
|
|
delete item.status
|
|
delete item.status
|
|
@@ -146,7 +146,7 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
updateChecklistItem(item).then((resp) => {
|
|
updateChecklistItem(item).then((resp) => {
|
|
|
const { code, msg } = resp
|
|
const { code, msg } = resp
|
|
|
- if (code === 0) {
|
|
|
|
|
|
|
+ if (code === 200) {
|
|
|
this.$emit('actionUpdate')
|
|
this.$emit('actionUpdate')
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
} else {
|
|
} else {
|
|
@@ -174,7 +174,7 @@ export default {
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
deleteChecklistItemById(checklistId, itemId).then((resp) => {
|
|
deleteChecklistItemById(checklistId, itemId).then((resp) => {
|
|
|
const { code, msg } = resp
|
|
const { code, msg } = resp
|
|
|
- if (code === 0) {
|
|
|
|
|
|
|
+ if (code === 200) {
|
|
|
self.$emit('actionUpdate')
|
|
self.$emit('actionUpdate')
|
|
|
self.$forceUpdate()
|
|
self.$forceUpdate()
|
|
|
} else {
|
|
} else {
|
|
@@ -202,7 +202,7 @@ export default {
|
|
|
savePoint(point) {
|
|
savePoint(point) {
|
|
|
createChecklistItemPoint(point).then((resp) => {
|
|
createChecklistItemPoint(point).then((resp) => {
|
|
|
const { code, msg } = resp
|
|
const { code, msg } = resp
|
|
|
- if (code === 0) {
|
|
|
|
|
|
|
+ if (code === 200) {
|
|
|
point.editAble = false
|
|
point.editAble = false
|
|
|
this.$emit('actionUpdate')
|
|
this.$emit('actionUpdate')
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
@@ -216,7 +216,7 @@ export default {
|
|
|
saveEdit(point) {
|
|
saveEdit(point) {
|
|
|
updateChecklistItemPoint(point).then((resp) => {
|
|
updateChecklistItemPoint(point).then((resp) => {
|
|
|
const { code, msg } = resp
|
|
const { code, msg } = resp
|
|
|
- if (code === 0) {
|
|
|
|
|
|
|
+ if (code === 200) {
|
|
|
point.editAble = false
|
|
point.editAble = false
|
|
|
this.$emit('actionUpdate')
|
|
this.$emit('actionUpdate')
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
@@ -240,7 +240,7 @@ export default {
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
deleteChecklistItemPointById(checklistId, itemId, pointId).then((resp) => {
|
|
deleteChecklistItemPointById(checklistId, itemId, pointId).then((resp) => {
|
|
|
const { code, msg } = resp
|
|
const { code, msg } = resp
|
|
|
- if (code === 0) {
|
|
|
|
|
|
|
+ if (code === 200) {
|
|
|
this.$emit('actionUpdate')
|
|
this.$emit('actionUpdate')
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error(msg)
|
|
this.$message.error(msg)
|