|
@@ -28,6 +28,7 @@
|
|
import { authorizeInstalladdOrUpdate, checkMachineCode } from '/@/api/authorizeModeling';
|
|
import { authorizeInstalladdOrUpdate, checkMachineCode } from '/@/api/authorizeModeling';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
import { otherInfoStore } from '/@/store/modules/other';
|
|
import { otherInfoStore } from '/@/store/modules/other';
|
|
|
|
+ import { incrementUseTypeList } from '/@/api/account';
|
|
|
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
@@ -68,7 +69,31 @@
|
|
|
|
|
|
const [registerForm, { validate, resetFields, setFieldsValue, updateSchema }] = useForm({
|
|
const [registerForm, { validate, resetFields, setFieldsValue, updateSchema }] = useForm({
|
|
labelWidth: 120,
|
|
labelWidth: 120,
|
|
- schemas: [...Addschemas, ...schemas, ...remarkschemas],
|
|
|
|
|
|
+ schemas: [
|
|
|
|
+ {
|
|
|
|
+ field: 'useType',
|
|
|
|
+ component: 'ApiSelect',
|
|
|
|
+ required: true,
|
|
|
|
+ label: '使用类型',
|
|
|
|
+ componentProps: {
|
|
|
|
+ // filterOption: onFilterOption,
|
|
|
|
+ // showSearch: true,
|
|
|
|
+ api: incrementUseTypeList,
|
|
|
|
+ labelField: 'name',
|
|
|
|
+ valueField: 'id',
|
|
|
|
+ immediate: true,
|
|
|
|
+ },
|
|
|
|
+ itemProps: {
|
|
|
|
+ autoLink: false,
|
|
|
|
+ },
|
|
|
|
+ colProps: {
|
|
|
|
+ span: 20,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ...Addschemas,
|
|
|
|
+ ...schemas,
|
|
|
|
+ ...remarkschemas,
|
|
|
|
+ ],
|
|
showActionButtonGroup: false,
|
|
showActionButtonGroup: false,
|
|
actionColOptions: {
|
|
actionColOptions: {
|
|
span: 24,
|
|
span: 24,
|
|
@@ -107,7 +132,7 @@
|
|
}
|
|
}
|
|
async function handleConfirm() {
|
|
async function handleConfirm() {
|
|
const { id, machineCode } = await validate();
|
|
const { id, machineCode } = await validate();
|
|
- let res = await checkMachineCode({ machineCode:machineCode.replace(/\s*/g,"") });
|
|
|
|
|
|
+ let res = await checkMachineCode({ machineCode: machineCode.replace(/\s*/g, '') });
|
|
console.log('res', res, !id);
|
|
console.log('res', res, !id);
|
|
if (!id && res && res.id) {
|
|
if (!id && res && res.id) {
|
|
createConfirm({
|
|
createConfirm({
|
|
@@ -136,8 +161,8 @@
|
|
console.log('validate', params);
|
|
console.log('validate', params);
|
|
const apiData = {
|
|
const apiData = {
|
|
...params,
|
|
...params,
|
|
- snCodes:params.snCodes && params.snCodes.replace(/\s*/g,""),
|
|
|
|
- machineCode:params.machineCode.replace(/\s*/g,""),
|
|
|
|
|
|
+ snCodes: params.snCodes && params.snCodes.replace(/\s*/g, ''),
|
|
|
|
+ machineCode: params.machineCode.replace(/\s*/g, ''),
|
|
userId: params.id,
|
|
userId: params.id,
|
|
};
|
|
};
|
|
let res = await authorizeInstalladdOrUpdate(apiData);
|
|
let res = await authorizeInstalladdOrUpdate(apiData);
|