|
@@ -92,6 +92,7 @@
|
|
|
<el-button size="small" text type="success" @click="onOpenList(scope.row)" v-if="scope.row.status==1">数据记录</el-button>
|
|
|
<el-button size="small" text type="warning" @click="onOpenEdit(scope.row)" v-if="scope.row.status==0">修改</el-button>
|
|
|
<el-button size="small" text type="danger" @click="onRowDel(scope.row)" v-if="scope.row.status==0">删除</el-button>
|
|
|
+ <el-button size="small" text type="primary" @click="copy(scope.row)" >复制</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -197,6 +198,23 @@ export default defineComponent({
|
|
|
}).finally(() => (state.tableData.loading = false));
|
|
|
};
|
|
|
|
|
|
+ //复制数据
|
|
|
+ const copy=(row:TableDataRow)=>{
|
|
|
+ ElMessageBox.confirm("确定要复制该数据吗?", '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+
|
|
|
+ api.common.copy({sourceId:row.sourceId}).then(() => {
|
|
|
+ ElMessage.success('复制成功');
|
|
|
+ typeList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ }
|
|
|
+
|
|
|
//打开数据记录
|
|
|
const onOpenList=(row: TableDataRow)=>{
|
|
|
listDicRef.value.openDialog(row);
|
|
@@ -255,6 +273,7 @@ export default defineComponent({
|
|
|
editDicRef,
|
|
|
listDicRef,
|
|
|
queryRef,
|
|
|
+ copy,
|
|
|
onOpenList,
|
|
|
onOpenAdd,
|
|
|
onOpenEdit,
|