放弃 选错了能力 仔细查看说明!!!
This commit is contained in:
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"dependi.npm.lockFileEnabled": false
|
||||
}
|
@ -1,36 +1,79 @@
|
||||
<script>
|
||||
import { bitable } from '@lark-opdev/block-bitable-api';
|
||||
import {
|
||||
bitable
|
||||
} from "@lark-opdev/block-bitable-api";
|
||||
import { ref, onMounted } from 'vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
ElSelect,
|
||||
ElOption,
|
||||
ElInputNumber,
|
||||
ElText,
|
||||
} from 'element-plus';
|
||||
import { Minus, Plus } from '@element-plus/icons-vue';
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ElButton,
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
ElSelect,
|
||||
ElOption,
|
||||
ElInputNumber,
|
||||
ElText,
|
||||
},
|
||||
setup() {
|
||||
const amount = ref(1)
|
||||
const handleChange = (value) => {
|
||||
console.log(value)
|
||||
}
|
||||
const waimoId = {
|
||||
tableId: 'tbluSufkcQm0noBz',
|
||||
viewId: 'vewLYvBFns',
|
||||
tagId: 'fld2xdCqrs',
|
||||
amountId: 'fldC9cnnAY',
|
||||
checkedId: 'fldJkHhQgQ',
|
||||
sortId: 'fldgsRl1q5',
|
||||
}
|
||||
const youxinId = {
|
||||
tableId: 'tbl9NPZQMl5IVHQ2',
|
||||
viewId: 'vewrOuK32q',
|
||||
tagId: 'fldrxqL8uz',
|
||||
amountId: 'fldsOIpOBk',
|
||||
checkedId: 'fldsuS6SuR',
|
||||
sortId: '----',
|
||||
}
|
||||
const amount = ref(1);
|
||||
const sort = ref(1);
|
||||
const message = ref('Hello World');
|
||||
const tag = ref('Hello World');
|
||||
const handleChange = (value) => {
|
||||
console.log(value)
|
||||
}
|
||||
|
||||
const formData = ref({ table: '' });
|
||||
const tableMetaList = ref([]);
|
||||
const getRecordId = async (id) => {
|
||||
const table = await bitable.base.getTableById(id.tableId); // 获取当前数据表实例
|
||||
const view = await table.getViewById(id.viewId); // 根据id随机获取一个视图实例
|
||||
const res = await view.getVisibleRecordIdList(sortInfo = {"fieldId": "排序","desc": false,},)
|
||||
console.log(res)
|
||||
}
|
||||
const getCurrent = async (id) => {
|
||||
const { tableId, recordId } = await bitable.base.getSelection();
|
||||
if (!tableId || !recordId) throw new Error("选区状态读取失败");
|
||||
const table = await bitable.base.getTableById(tableId);
|
||||
const amountValue = (await table.getCellValue(
|
||||
id.amountId,
|
||||
recordId
|
||||
));
|
||||
const sortValue = (await table.getCellValue(
|
||||
id.sortId,
|
||||
recordId
|
||||
));
|
||||
const tagValue = (await table.getCellValue(
|
||||
id.tagFieldId,
|
||||
recordId
|
||||
));
|
||||
const checkedValue = (await table.getCellValue(
|
||||
id.checkedFieldId,
|
||||
recordId
|
||||
));
|
||||
return {
|
||||
tag: tagValue[0]?.text ?? "error",
|
||||
amount: amountValue,
|
||||
checked: checkedValue,
|
||||
};
|
||||
}
|
||||
|
||||
const addRecord = async () => {
|
||||
const confirmRecord = async () => {
|
||||
const tableId = formData.value.table;
|
||||
if (tableId) {
|
||||
const table = await bitable.base.getTableById(tableId);
|
||||
@ -45,9 +88,11 @@ import { Minus, Plus } from '@element-plus/icons-vue';
|
||||
});
|
||||
|
||||
return {
|
||||
formData,
|
||||
tableMetaList,
|
||||
addRecord,
|
||||
tag,
|
||||
amount,
|
||||
message,
|
||||
sort,
|
||||
confirmRecord,
|
||||
};
|
||||
},
|
||||
};
|
||||
@ -55,10 +100,13 @@ import { Minus, Plus } from '@element-plus/icons-vue';
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<el-text id="id-msg" class="mx-1" type="success">Success</el-text>
|
||||
<el-text class="mx-1" type="success">{{ message }}</el-text>
|
||||
</div>
|
||||
<div>
|
||||
<h1 id="id-tag">Tag</h1>
|
||||
<p>第 {{ sort }} 个</p>
|
||||
</div>
|
||||
<div>
|
||||
<h1>{{ tag }}</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-input-number v-model="amount" :min="0" :step="1" @change="handleChange" size="large" />
|
||||
@ -66,7 +114,7 @@ import { Minus, Plus } from '@element-plus/icons-vue';
|
||||
<div>
|
||||
<el-button round @click="addRecord">返回</el-button>
|
||||
<el-button type="warning" round @click="addRecord">待定</el-button>
|
||||
<el-button type="success" round @click="addRecord">确认</el-button>
|
||||
<el-button type="success" round @click="confirmRecord">确认</el-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
67
id.txt
67
id.txt
@ -173,7 +173,7 @@ https://open.feishu.cn/open-apis/bitable/v1/apps/EciWbKOEXa68HIsnh5Ac7vZgnff/tab
|
||||
{
|
||||
"field_id": "fldi4luuNx",
|
||||
"field_name": "内库数量",
|
||||
"is_hidden": false,
|
||||
"is_hidden": true,
|
||||
"is_primary": false,
|
||||
"property": {
|
||||
"formatter": "0"
|
||||
@ -184,7 +184,7 @@ https://open.feishu.cn/open-apis/bitable/v1/apps/EciWbKOEXa68HIsnh5Ac7vZgnff/tab
|
||||
{
|
||||
"field_id": "fldZWiGZXA",
|
||||
"field_name": "已发放",
|
||||
"is_hidden": false,
|
||||
"is_hidden": true,
|
||||
"is_primary": false,
|
||||
"property": {
|
||||
"formatter": "0"
|
||||
@ -192,40 +192,59 @@ https://open.feishu.cn/open-apis/bitable/v1/apps/EciWbKOEXa68HIsnh5Ac7vZgnff/tab
|
||||
"type": 2,
|
||||
"ui_type": "Number"
|
||||
},
|
||||
{
|
||||
"field_id": "fldJkHhQgQ",
|
||||
"field_name": "已盘",
|
||||
"is_hidden": true,
|
||||
"is_primary": false,
|
||||
"property": null,
|
||||
"type": 7,
|
||||
"ui_type": "Checkbox"
|
||||
},
|
||||
{
|
||||
"field_id": "fldNX4fdT2",
|
||||
"field_name": "盘库人",
|
||||
"is_hidden": true,
|
||||
"is_primary": false,
|
||||
"property": {
|
||||
"multiple": false
|
||||
},
|
||||
"type": 11,
|
||||
"ui_type": "User"
|
||||
},
|
||||
{
|
||||
"field_id": "fld42z5rhX",
|
||||
"field_name": "日期",
|
||||
"is_hidden": true,
|
||||
"is_hidden": false,
|
||||
"is_primary": false,
|
||||
"property": {
|
||||
"date_formatter": "yyyy/MM/dd"
|
||||
},
|
||||
"type": 1002,
|
||||
"ui_type": "ModifiedTime"
|
||||
},
|
||||
{
|
||||
"field_id": "fldgsRl1q5",
|
||||
"field_name": "排序",
|
||||
"is_hidden": false,
|
||||
"is_primary": false,
|
||||
"property": {
|
||||
"auto_serial": {
|
||||
"type": "auto_increment_number"
|
||||
}
|
||||
},
|
||||
"type": 1005,
|
||||
"ui_type": "AutoNumber"
|
||||
},
|
||||
{
|
||||
"field_id": "fldVeLbl8I",
|
||||
"field_name": "已盘",
|
||||
"is_hidden": false,
|
||||
"is_primary": false,
|
||||
"property": null,
|
||||
"type": 7,
|
||||
"ui_type": "Checkbox"
|
||||
}
|
||||
],
|
||||
"page_token": "fld42z5rhX",
|
||||
"page_token": "fldVeLbl8I",
|
||||
"total": 9
|
||||
},
|
||||
"msg": "success"
|
||||
}
|
||||
|
||||
{
|
||||
"view_id": "vewLYvBFns",
|
||||
"field_names": [
|
||||
"规格",
|
||||
"外库数量",
|
||||
"排序",
|
||||
"已盘"
|
||||
],
|
||||
"sort": [
|
||||
{
|
||||
"field_name": "排序",
|
||||
"desc": false
|
||||
}
|
||||
],
|
||||
"automatic_fields": true
|
||||
}
|
Reference in New Issue
Block a user