Parcourir la source

静态知识维护,复制

zhouna il y a 4 ans
Parent
commit
689c46e5f4

+ 5 - 8
src/components/cdssManage/AddMedicinePrompt.vue

@@ -211,10 +211,8 @@ export default {
       this.isEdit = isEdit;
       this.isCopy = isCopy;
       this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
-      isEdit && this.changeWord(data);
-      api
-        .getTremList({ id: data.id })
-        .then(res => {
+      (isEdit||isCopy) && this.changeWord(data);
+      api.getTremList({ id: data.id }).then(res => {
           if (res.data.code == '0') {
             const data = res.data.data;
             if (this.form.typeId === 82 || this.form.typeId === 83) {
@@ -614,10 +612,9 @@ export default {
     },
 
     //保存编辑 接口
-    sendSaveOrEdit(param) {
-      api
-        .saveTermPrompts(param)
-        .then(res => {
+    sendSaveOrEdit(param) {console.log(this.$route.params,param);
+      this.isCopy&&(param.id=undefined);
+      api.saveTermPrompts(param).then(res => {
           if (res.data.code === '0') {
             this.isSuccessUpload = 0; // 修改文件上传状态为0
             this.warning(res.data.msg || '保存成功', 'success');

+ 3 - 4
src/components/cdssManage/MedicinePrompt.vue

@@ -53,9 +53,8 @@
               size="small"
               @click="toEditProduct(scope.row)"
             >修改</el-button>
-            <!-- <span style="margin:0 3px;">|</span>
-                        <el-button v-if="scope.row.isDeleted=='Y' || scope.row.typeId === 82 || scope.row.typeId === 83" type="text" size="small" class="is-disabled">复制</el-button>
-            <el-button v-if="scope.row.isDeleted=='N'&&scope.row.typeId !== 82 && scope.row.typeId !== 83" type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>-->
+             <span style="margin:0 3px;">|</span>
+             <el-button type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>
             <span style="margin:0 3px;">|</span>
             <el-button
               v-if="scope.row.status===0"
@@ -214,7 +213,7 @@ export default {
           }
         : { currentPage: this.currentPage, pageSize: this.pageSize };
       this.$router.push({
-        name: 'AddMedicinePrompt',
+        name: 'AddMedicinePromptCDSS',
         params: Object.assign(pam, { data: row, isCopy: true })
       });
     },