瀏覽代碼

feat: 提交回退参数调整3

cuiyalong 10 月之前
父節點
當前提交
58ce0ac796
共有 1 個文件被更改,包括 17 次插入6 次删除
  1. 17 6
      frontend/src/views/CodeList.vue

+ 17 - 6
frontend/src/views/CodeList.vue

@@ -508,6 +508,17 @@ const getMarkWithRow = row => {
     }
     }
 }
 }
 
 
+const getLuaParams = row => {
+    const baseInfo = {
+        code: row.code,
+        site: row.site,
+        channel: row.channel,
+        modifyuser: row.modifyuser,
+        modifytime: row.modifytime,
+    }
+    return baseInfo
+}
+
 const editDialogMarkClick = (row) => {
 const editDialogMarkClick = (row) => {
     // 自定义关闭时间
     // 自定义关闭时间
     ElMessage({
     ElMessage({
@@ -575,9 +586,9 @@ const tableEvents = {
     },
     },
     handleSubmit(index, row) {
     handleSubmit(index, row) {
         onlyClickHighlight(row, '_action_clicked_submit')
         onlyClickHighlight(row, '_action_clicked_submit')
-        const mark = getMarkWithRow(row)
-        console.log(mark)
-        ServerActionUpdateCodeState({ cssmark: mark, state: 1 }).then(r => {
+        const lua = getLuaParams(row)
+        lua.state = 1
+        ServerActionUpdateCodeState({ lua: lua }).then(r => {
             if (r.err === 1) {
             if (r.err === 1) {
                 ElMessage({
                 ElMessage({
                     message: '提交成功',
                     message: '提交成功',
@@ -596,9 +607,9 @@ const tableEvents = {
     },
     },
     handleRollback(index, row) {
     handleRollback(index, row) {
         onlyClickHighlight(row, '_action_clicked_rollback')
         onlyClickHighlight(row, '_action_clicked_rollback')
-        const mark = getMarkWithRow(row)
-        console.log(mark)
-        ServerActionUpdateCodeState({ cssmark: mark, state: 0 }).then(r => {
+        const lua = getLuaParams(row)
+        lua.state = 0
+        ServerActionUpdateCodeState({ lua: lua }).then(r => {
             if (r.err === 1) {
             if (r.err === 1) {
                 ElMessage({
                 ElMessage({
                     message: '回退成功',
                     message: '回退成功',