63 changed files with 5225 additions and 26 deletions
@ -0,0 +1,49 @@ |
|||
package authentication |
|||
|
|||
import ( |
|||
"appPlatform/middleware/grocerystore" |
|||
"appPlatform/overall" |
|||
"appPlatform/overall/publicmethod" |
|||
"fmt" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// 验证身份
|
|||
func (a *ApiMethod) SignCode(c *gin.Context) { |
|||
userKey := c.Request.Header.Get("user-key") |
|||
userToken := c.Request.Header.Get("user-token") |
|||
if userKey == "" || userToken == "" { |
|||
publicmethod.Result(1, userKey, c, "验证失败!未知识别符!") |
|||
return |
|||
} |
|||
var requestData SignCodeStr |
|||
err := c.ShouldBindJSON(&requestData) |
|||
if err != nil { |
|||
publicmethod.Result(100, err, c) |
|||
return |
|||
} |
|||
if requestData.Code == "" { |
|||
publicmethod.Result(1, err, c, "验证失败!未知识别符!") |
|||
return |
|||
} |
|||
redisFileKey := fmt.Sprintf("ScanCode:Aut:IdentRec_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, requestData.Code) |
|||
redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS4) |
|||
userRedisToken, isTrue := redisClient.HashGetAll(redisFileKey) |
|||
if !isTrue { |
|||
publicmethod.Result(1, userRedisToken, c, "验证失败!不是授权用户!1") |
|||
return |
|||
} |
|||
// sf := publicmethod.MapOut[string]()
|
|||
if userToken != userRedisToken["usertoken"] || userKey != userRedisToken["userkey"] { |
|||
// sf["userToken"] = userToken
|
|||
// sf["userToken_es"] = userRedisToken["usertoken"]
|
|||
// sf["userKey"] = userKey
|
|||
// sf["userkey_es"] = userRedisToken["userkey"]
|
|||
// publicmethod.Result(1, sf, c, "验证失败!不是授权用户!2")
|
|||
publicmethod.Result(1, err, c, "验证失败!不是授权用户!2") |
|||
return |
|||
} |
|||
redisClient.DelKey(redisFileKey) |
|||
publicmethod.Result(0, err, c) |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package authentication |
|||
|
|||
import ( |
|||
"appPlatform/overall/publicmethod" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
type ApiMethod struct{} |
|||
|
|||
// 身份验证
|
|||
func (a *ApiMethod) Index(c *gin.Context) { |
|||
outputCont := publicmethod.MapOut[string]() |
|||
outputCont["index"] = "身份验证" |
|||
publicmethod.Result(0, outputCont, c) |
|||
} |
|||
|
|||
type ApiEntry struct { |
|||
SingCodeApi ApiMethod |
|||
} |
|||
|
|||
var AppApiEntry = new(ApiEntry) |
|||
|
|||
// 验证字符串
|
|||
type SignCodeStr struct { |
|||
Code string `json:"code"` |
|||
} |
|||
@ -0,0 +1,214 @@ |
|||
package maptostruct |
|||
|
|||
import ( |
|||
"appPlatform/models/modelsschool" |
|||
"appPlatform/overall" |
|||
"appPlatform/overall/publicmethod" |
|||
"crypto/md5" |
|||
"encoding/json" |
|||
"fmt" |
|||
"strconv" |
|||
"strings" |
|||
"time" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"gorm.io/gorm/clause" |
|||
) |
|||
|
|||
/* |
|||
* |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-08-08 14:16:31 |
|||
@ 功能: 获取车场车位信息 |
|||
@ 参数 |
|||
|
|||
# |
|||
|
|||
@ 返回值 |
|||
|
|||
# |
|||
|
|||
@ 方法原型 |
|||
|
|||
# |
|||
*/ |
|||
func (a *ApiMethod) CharParking(c *gin.Context) { |
|||
var requestData SendParkCont |
|||
c.ShouldBindJSON(&requestData) |
|||
var charCont CharParkCont |
|||
requestData.Data = charCont |
|||
requestData.Ts = strconv.FormatInt(time.Now().Unix(), 10) |
|||
jsonByte, err := json.Marshal(requestData.Data) |
|||
signStrAll := fmt.Sprintf("%v%v%v%v", string(jsonByte), requestData.Ts, requestData.ParkId, requestData.AccessKey) |
|||
// signStrAll := fmt.Sprintf("%v%v%v", requestData.Ts, requestData.ParkId, requestData.AccessKey)
|
|||
//计算签名
|
|||
mdNew := md5.New() |
|||
mdNew.Write([]byte(signStrAll)) |
|||
signStrAllMd5 := fmt.Sprintf("%x", mdNew.Sum(nil)) |
|||
signStrAllMd5Big := strings.ToUpper(signStrAllMd5) |
|||
requestData.Sign = signStrAllMd5Big |
|||
|
|||
var toForData SendParkInfo |
|||
|
|||
toForData.Data = string(jsonByte) |
|||
toForData.ParkId = requestData.ParkId |
|||
toForData.Ts = requestData.Ts |
|||
toForData.Sign = signStrAllMd5Big |
|||
|
|||
sendDate, _ := json.Marshal(toForData) |
|||
|
|||
callBackByte := publicmethod.CurlPostJosn("http://1.116.211.94:8002/parkservapi/api_GetParkPlace", sendDate) |
|||
|
|||
var toForDataIng SendParkInfoIng |
|||
toForDataIng.Data = requestData.Data |
|||
toForDataIng.ParkId = requestData.ParkId |
|||
toForDataIng.Ts = requestData.Ts |
|||
toForDataIng.Sign = signStrAllMd5Big |
|||
sendDateing, _ := json.Marshal(toForDataIng) |
|||
|
|||
callBackByteIf := publicmethod.CurlPostJosn("http://1.116.211.94:8002/LPApi.asmx/api_GetGatesInfo", sendDateing) |
|||
outData := publicmethod.MapOut[string]() |
|||
outData["err"] = err |
|||
outData["signStrAll"] = signStrAll |
|||
outData["signStrAllMd5"] = signStrAllMd5 |
|||
outData["signStrAllMd5Big"] = signStrAllMd5Big |
|||
outData["requestData"] = requestData |
|||
outData["sendDate"] = string(sendDate) |
|||
outData["callBackByte"] = string(callBackByte) |
|||
outData["toForData"] = toForData |
|||
|
|||
outData["callBackByteIf"] = string(callBackByteIf) |
|||
// fmt.Printf("%v\n", outData)
|
|||
publicmethod.Result(0, outData, c) |
|||
} |
|||
|
|||
/* |
|||
* |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-08-16 16:39:13 |
|||
@ 功能: 迁移试卷数据 |
|||
@ 参数 |
|||
|
|||
# |
|||
|
|||
@ 返回值 |
|||
|
|||
# |
|||
|
|||
@ 方法原型 |
|||
|
|||
# |
|||
*/ |
|||
func (a *ApiMethod) TestPage(c *gin.Context) { |
|||
var testPageList []int64 |
|||
err := overall.CONSTANT_DB_Server.Model(&modelsschool.TestPaper{}).Select("tp_id").Find(&testPageList).Error |
|||
if err != nil { |
|||
publicmethod.Result(0, err, c) |
|||
return |
|||
} |
|||
countPage := len(testPageList) |
|||
fmt.Printf("余数---》%v\n", countPage) |
|||
if len(testPageList) > 0 { |
|||
var saveData []int64 |
|||
jibuqi := 0 |
|||
for i := 0; i < countPage; i++ { |
|||
if i != 0 && i%1000 == 0 { |
|||
saveData = append(saveData, testPageList[i]) |
|||
jibuqi++ |
|||
syncSeting.Add(1) |
|||
// time.Sleep(20 * time.Millisecond)
|
|||
go dengdai(saveData, jibuqi) |
|||
saveData = saveData[:0] |
|||
// break
|
|||
} else { |
|||
saveData = append(saveData, testPageList[i]) |
|||
} |
|||
} |
|||
|
|||
if len(saveData) > 0 { |
|||
syncSeting.Add(1) |
|||
go dengdai(saveData, jibuqi) |
|||
fmt.Printf("余数---》%v\n", len(saveData)) |
|||
} |
|||
syncSeting.Wait() |
|||
} |
|||
|
|||
// var countPages int64
|
|||
// overall.CONSTANT_DB_Tidb.Model(&modelsschool.TestPaper{}).Select("tp_id").Count(&countPages)
|
|||
publicmethod.Result(0, countPage, c) |
|||
} |
|||
|
|||
func dengdai(testPageList []int64, jibuqi int) { |
|||
defer syncSeting.Done() |
|||
// fmt.Printf("金晶科技了%v-------><---", jibuqi)
|
|||
var testPageListCont []modelsschool.TestPaper |
|||
errEs := overall.CONSTANT_DB_Server.Model(&modelsschool.TestPaper{}).Where("tp_id IN ?", testPageList).Find(&testPageListCont).Error |
|||
if errEs == nil { |
|||
var saveCont []modelsschool.TestPaper |
|||
for i := 0; i < len(testPageListCont); i++ { |
|||
saveCont = append(saveCont, testPageListCont[i]) |
|||
if i != 0 && i%10 == 0 { |
|||
overall.CONSTANT_DB_Tidb.Clauses(clause.OnConflict{DoNothing: true}).Create(&saveCont) |
|||
saveCont = saveCont[:0] |
|||
} |
|||
} |
|||
if len(saveCont) > 0 { |
|||
overall.CONSTANT_DB_Tidb.Clauses(clause.OnConflict{DoNothing: true}).Create(&saveCont) |
|||
} |
|||
// for _, v := range testPageListCont {
|
|||
// // var testPageCont modelsschool.TestPaper
|
|||
// // err := overall.CONSTANT_DB_Server.Where("tp_id = ?", v).First(&testPageCont).Error
|
|||
// // // fmt.Printf("金晶科技了%v---->%v\n", v, err)
|
|||
// // if err == nil {
|
|||
// overall.CONSTANT_DB_Tidb.Clauses(clause.OnConflict{DoNothing: true}).Create(&v)
|
|||
// // }
|
|||
// }
|
|||
} |
|||
|
|||
// var testPageListCont []modelsschool.TestPaper
|
|||
// err := overall.CONSTANT_DB_Server.Model(&modelsschool.TestPaper{}).Where("tp_id IN ?", testPageList).Find(&testPageListCont).Error
|
|||
// if err == nil {
|
|||
// // overall.CONSTANT_DB_Tidb.Create(&testPageListCont)
|
|||
// overall.CONSTANT_DB_Tidb.Clauses(clause.OnConflict{DoNothing: true}).Create(&testPageListCont)
|
|||
// }
|
|||
// time.Sleep(100 * time.Millisecond)
|
|||
} |
|||
|
|||
func TestPageTimeTask() { |
|||
var testPageList []int64 |
|||
err := overall.CONSTANT_DB_Server.Model(&modelsschool.TestPaper{}).Select("tp_id").Find(&testPageList).Error |
|||
if err != nil { |
|||
tadyTime := time.Now().Unix() |
|||
fmt.Printf("没有数据%v--%v\n", err, publicmethod.UnixTimeToDay(tadyTime, 11)) |
|||
return |
|||
} |
|||
countPage := len(testPageList) |
|||
// fmt.Printf("余数---》%v\n", countPage)
|
|||
if len(testPageList) > 0 { |
|||
var saveData []int64 |
|||
jibuqi := 0 |
|||
for i := 0; i < countPage; i++ { |
|||
if i != 0 && i%1000 == 0 { |
|||
saveData = append(saveData, testPageList[i]) |
|||
jibuqi++ |
|||
syncSeting.Add(1) |
|||
// time.Sleep(20 * time.Millisecond)
|
|||
go dengdai(saveData, jibuqi) |
|||
saveData = saveData[:0] |
|||
// break
|
|||
} else { |
|||
saveData = append(saveData, testPageList[i]) |
|||
} |
|||
} |
|||
|
|||
if len(saveData) > 0 { |
|||
syncSeting.Add(1) |
|||
go dengdai(saveData, jibuqi) |
|||
// fmt.Printf("余数---》%v\n", len(saveData))
|
|||
} |
|||
syncSeting.Wait() |
|||
} |
|||
|
|||
// var countPages int64
|
|||
// overall.CONSTANT_DB_Tidb.Model(&modelsschool.TestPaper{}).Select("tp_id").Count(&countPages)
|
|||
} |
|||
@ -0,0 +1,559 @@ |
|||
const opt = { |
|||
list: [ |
|||
{ |
|||
type: "grid", |
|||
columns: [ |
|||
{ |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
placeholder: "请输入姓名" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1690848993703", |
|||
item: |
|||
{ |
|||
label: "姓名" |
|||
} |
|||
}] |
|||
}, |
|||
{ |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
list: [ |
|||
{ |
|||
type: "radio", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "男", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "女", |
|||
value: "2" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0, |
|||
transformData: "number" |
|||
}, |
|||
name: "radio1690848996254", |
|||
item: |
|||
{ |
|||
label: "性别" |
|||
} |
|||
}], |
|||
type: "gridChild" |
|||
}, |
|||
{ |
|||
list: [ |
|||
{ |
|||
type: "select", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
appendToBody: true, |
|||
placeholder: "请选择民族" |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "汉族", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "回族", |
|||
value: "2" |
|||
}, |
|||
{ |
|||
label: "满族", |
|||
value: "3" |
|||
}, |
|||
{ |
|||
label: "维吾尔族", |
|||
value: "4" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "select1690849137964", |
|||
item: |
|||
{ |
|||
label: "民族" |
|||
} |
|||
}], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
} |
|||
}, |
|||
{ |
|||
list: [ |
|||
{ |
|||
type: "radio", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "已婚", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "未婚", |
|||
value: "2" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0, |
|||
transformData: "number" |
|||
}, |
|||
name: "radio1690849410161", |
|||
item: |
|||
{ |
|||
label: "婚姻状况" |
|||
} |
|||
}], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
type: "gridChild" |
|||
}, |
|||
{ |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1690849482442", |
|||
item: |
|||
{ |
|||
label: "联系电话" |
|||
} |
|||
}], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
} |
|||
}, |
|||
{ |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
placeholder: "请输入家庭住址" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1690849626122", |
|||
item: |
|||
{ |
|||
label: "家庭住址" |
|||
} |
|||
}], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
} |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{} |
|||
}, |
|||
{ |
|||
type: "divider", |
|||
control: |
|||
{}, |
|||
config: |
|||
{}, |
|||
item: |
|||
{ |
|||
label: "人员属性" |
|||
} |
|||
}, |
|||
{ |
|||
type: "tabs", |
|||
columns: [ |
|||
{ |
|||
label: "基本信息", |
|||
list: [ |
|||
{ |
|||
type: "upload", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "upload1690849946230", |
|||
item: |
|||
{ |
|||
label: "图片/文件" |
|||
} |
|||
}] |
|||
}, |
|||
{ |
|||
label: "行政组织关系", |
|||
list: [ |
|||
{ |
|||
type: "tinymce", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "tinymce1690849980035", |
|||
item: |
|||
{ |
|||
label: "富文本" |
|||
} |
|||
}] |
|||
}, |
|||
{ |
|||
label: "紧急联系人", |
|||
list: [ |
|||
{ |
|||
type: "title", |
|||
control: |
|||
{ |
|||
modelValue: "标题" |
|||
}, |
|||
config: |
|||
{} |
|||
}] |
|||
}, |
|||
{ |
|||
label: "教育经历", |
|||
list: [ |
|||
{ |
|||
type: "txt", |
|||
control: |
|||
{ |
|||
modelValue: "这是一段文字说明" |
|||
}, |
|||
config: |
|||
{} |
|||
}] |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
span: "" |
|||
} |
|||
}, |
|||
{ |
|||
type: "flex", |
|||
list: [ |
|||
{ |
|||
type: "treeSelect", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
data: [ |
|||
[] |
|||
], |
|||
renderAfterExpand: false |
|||
}, |
|||
config: |
|||
{ |
|||
optionsType: 0, |
|||
optionsFun: "" |
|||
}, |
|||
name: "treeSelect1690850331372", |
|||
item: |
|||
{ |
|||
label: "树形控件" |
|||
} |
|||
}], |
|||
tableData: [], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
addBtnText: "添加一行" |
|||
}, |
|||
name: "flex1690850046691" |
|||
}, |
|||
{ |
|||
type: "textarea", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "textarea1690850327911", |
|||
item: |
|||
{ |
|||
label: "多行文本" |
|||
} |
|||
}, |
|||
{ |
|||
type: "cascader", |
|||
control: |
|||
{ |
|||
modelValue: [] |
|||
}, |
|||
options: [ |
|||
[] |
|||
], |
|||
config: |
|||
{ |
|||
optionsType: 1, |
|||
optionsFun: "org/govthreeing", |
|||
method: "post", |
|||
label: "name", |
|||
value: "id", |
|||
transformData: "string" |
|||
}, |
|||
name: "cascader1690850727709", |
|||
item: |
|||
{ |
|||
label: "级联选择器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "rate", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "rate1690858082610", |
|||
item: |
|||
{ |
|||
label: "评分" |
|||
} |
|||
}, |
|||
{ |
|||
type: "slider", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "slider1690858085171", |
|||
item: |
|||
{ |
|||
label: "滑块" |
|||
} |
|||
}, |
|||
{ |
|||
type: "checkbox", |
|||
control: |
|||
{ |
|||
modelValue: [] |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "结果1", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "结果2", |
|||
value: "2" |
|||
}, |
|||
{ |
|||
label: "结果3", |
|||
value: "3" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "checkbox1690858133654", |
|||
item: |
|||
{ |
|||
label: "多选框组" |
|||
} |
|||
}, |
|||
{ |
|||
type: "select", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
appendToBody: true |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "select1690858188721", |
|||
item: |
|||
{ |
|||
label: "下拉选择框" |
|||
} |
|||
}, |
|||
{ |
|||
type: "datePicker", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
type: "date" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "datePicker1690858198926", |
|||
item: |
|||
{ |
|||
label: "日期选择器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "timePicker", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "timePicker1690858223852", |
|||
item: |
|||
{ |
|||
label: "时间选择器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "colorPicker", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "colorPicker1690858227551", |
|||
item: |
|||
{ |
|||
label: "取色器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "switch", |
|||
control: |
|||
{ |
|||
modelValue: false |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "switch1690858231044", |
|||
item: |
|||
{ |
|||
label: "开关" |
|||
} |
|||
}, |
|||
{ |
|||
type: "inputNumber", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "inputNumber1690858235582", |
|||
item: |
|||
{ |
|||
label: "计数器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "cascader", |
|||
control: |
|||
{ |
|||
modelValue: [] |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "cascader1690858239039", |
|||
item: |
|||
{ |
|||
label: "级联选择器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "slider", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "slider1690858246408", |
|||
item: |
|||
{ |
|||
label: "滑块" |
|||
} |
|||
}, |
|||
{ |
|||
type: "button", |
|||
control: |
|||
{ |
|||
label: "保存" |
|||
}, |
|||
config: |
|||
{} |
|||
}, |
|||
{ |
|||
type: "component", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "component1690858760867", |
|||
item: |
|||
{ |
|||
label: "自定义组件", |
|||
rules: [] |
|||
}, |
|||
customRules: [ |
|||
{ |
|||
type: "required", |
|||
message: "必填项1", |
|||
trigger: "blur" |
|||
}, |
|||
{ |
|||
type: "required", |
|||
message: "必填项2", |
|||
trigger: "blur" |
|||
}] |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,134 @@ |
|||
//基础
|
|||
const select ={ |
|||
list: [ |
|||
{ |
|||
type: "select", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
appendToBody: true |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "select1690944007204", |
|||
item: |
|||
{ |
|||
label: "下拉选择框" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
//固定选项
|
|||
const selectGuDing = { |
|||
list: [ |
|||
{ |
|||
type: "select", |
|||
control: |
|||
{ |
|||
modelValue: [], |
|||
appendToBody: true, |
|||
placeholder: "请选择您需要的内容", |
|||
multiple: true, |
|||
clearable: true, |
|||
disabled: true, |
|||
ziDingYi: "自定义字段" |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "男", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "女", |
|||
value: "2" |
|||
}, |
|||
{ |
|||
label: "跨性别", |
|||
value: "3" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0, |
|||
addAll: "下拉选择内容", |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.sssdf > 1", |
|||
linkResult: "disabled", |
|||
transformData: "number" |
|||
}, |
|||
name: "select1690944007204", |
|||
item: |
|||
{ |
|||
label: "下拉选择框", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//使用数据源
|
|||
const selectGuDingShujuyuan = { |
|||
list: [ |
|||
{ |
|||
type: "select", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
appendToBody: true |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 1, |
|||
optionsFun: "org/govthreeaboutman", |
|||
addAll: "选择全部", |
|||
label: "name", |
|||
value: "id", |
|||
transformData: "number" |
|||
}, |
|||
name: "select1691568880802", |
|||
item: |
|||
{ |
|||
label: "下拉选择框", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
let divideropt = { |
|||
list: [ |
|||
{ |
|||
type: "divider", |
|||
control: |
|||
{}, |
|||
config: |
|||
{}, |
|||
item: |
|||
{ |
|||
label: "分割线" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
let dividerAllopt = { |
|||
list: [ |
|||
{ |
|||
type: "divider", |
|||
control: |
|||
{ |
|||
direction: "horizontal", |
|||
contentPosition: "center", |
|||
borderStyle: "solid" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
span: 24, |
|||
linkKey: true |
|||
}, |
|||
item: |
|||
{ |
|||
label: "分割线" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,81 @@ |
|||
const oneText = { |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1690861187851", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//满配
|
|||
const oneAllText = { |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
placeholder: "占位1内容", |
|||
disabled: true |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
prepend: "文本前缀", |
|||
append: "文本后缀", |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$input1690861475666>1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "input1690861475666", |
|||
item: |
|||
{ |
|||
label: "单行文本", |
|||
showLabel: true, |
|||
rules: [ |
|||
{ |
|||
name: false |
|||
}] |
|||
}, |
|||
customRules: [ |
|||
{ |
|||
type: "required", |
|||
message: "必填项", |
|||
trigger: "blur" |
|||
}, |
|||
{ |
|||
type: "mobile", |
|||
message: "请输入手机号码", |
|||
trigger: "blur" |
|||
}] |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,190 @@ |
|||
const radioSmaill = { |
|||
list: [ |
|||
{ |
|||
type: "radio", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "radio1690867322720", |
|||
item: |
|||
{ |
|||
label: "单选框组" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//赋值
|
|||
const radioValue = { |
|||
list: [ |
|||
{ |
|||
type: "radio", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "男", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "女", |
|||
value: "2" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0, |
|||
transformData: "number", |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12 |
|||
}, |
|||
name: "radio1690867322720", |
|||
item: |
|||
{ |
|||
label: "单选框组", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//满配
|
|||
const radioAll = { |
|||
list: [ |
|||
{ |
|||
type: "radio", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
disabled: true |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "男", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "女", |
|||
value: "2" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0, |
|||
transformData: "number", |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkResult: "disabled", |
|||
linkValue: "$.radio1690867322720 > 1" |
|||
}, |
|||
name: "radio1690867322720", |
|||
item: |
|||
{ |
|||
label: "单选框组", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}], |
|||
showLabel: true |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
|
|||
//数据源
|
|||
const radioData = { |
|||
list: [ |
|||
{ |
|||
type: "radio", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
disabled: true |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "男", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "女", |
|||
value: "2" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 1, |
|||
transformData: "none", |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkResult: "disabled", |
|||
linkValue: "$.radio1690867322720 > 1", |
|||
optionsFun: "org/govthreeing", |
|||
label: "name", |
|||
value: "id" |
|||
}, |
|||
name: "radio1690867322720", |
|||
item: |
|||
{ |
|||
label: "单选框组", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}], |
|||
showLabel: true |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,659 @@ |
|||
let cardopt = { |
|||
list: [ |
|||
{ |
|||
type: "card", |
|||
list: [], |
|||
control: |
|||
{}, |
|||
config: |
|||
{}, |
|||
item: |
|||
{ |
|||
label: "卡片布局" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
let cardallopt = { |
|||
list: [ |
|||
{ |
|||
type: "card", |
|||
list: [], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 24 |
|||
}, |
|||
item: |
|||
{ |
|||
label: "卡片布局1" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
//卡片聂荣
|
|||
let cardsstatopt = { |
|||
list: [ |
|||
{ |
|||
type: "card", |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1692582254140", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}, |
|||
{ |
|||
type: "timePicker", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "timePicker1692582259714", |
|||
item: |
|||
{ |
|||
label: "时间选择器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "textarea", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "textarea1692582257011", |
|||
item: |
|||
{ |
|||
label: "多行文本" |
|||
} |
|||
}, |
|||
{ |
|||
type: "treeSelect", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
data: [], |
|||
renderAfterExpand: false |
|||
}, |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "treeSelect1692582282336", |
|||
item: |
|||
{ |
|||
label: "树形控件" |
|||
} |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 24 |
|||
}, |
|||
item: |
|||
{ |
|||
label: "卡片布局1" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,65 @@ |
|||
//基础版
|
|||
const colseopt = { |
|||
list: [ |
|||
{ |
|||
type: "colorPicker", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "colorPicker1691716670670", |
|||
item: |
|||
{ |
|||
label: "取色器" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//满配
|
|||
const manPeiopt = { |
|||
list: [ |
|||
{ |
|||
type: "colorPicker", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
colorFormat: "rgb" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
linkKey: true, |
|||
linkValue: "$.index>1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "colorPicker1691716670670", |
|||
item: |
|||
{ |
|||
label: "取色器", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,77 @@ |
|||
//图片文件
|
|||
|
|||
let uploadopt = { |
|||
list: [ |
|||
{ |
|||
type: "upload", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "upload1692580064168", |
|||
item: |
|||
{ |
|||
label: "图片/文件" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
//满配
|
|||
let uploadAllopt = { |
|||
list: [ |
|||
{ |
|||
type: "upload", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
action: "org/govthreeaboutman", |
|||
listType: "picture-card", |
|||
name: "上传字段名" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
tip: "提示文字", |
|||
btnText: "按钮文字 " |
|||
}, |
|||
name: "upload1692580064168", |
|||
item: |
|||
{ |
|||
label: "图片/文件", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
const doubleText = { |
|||
list: [ |
|||
{ |
|||
type: "textarea", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
placeholder: "占位内容", |
|||
rows: 5, |
|||
disabled: true |
|||
}, |
|||
config: |
|||
{ |
|||
className: "class_name", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$textarea1690861245769.>1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "textarea1690861245769", |
|||
item: |
|||
{ |
|||
label: "多行文本", |
|||
showLabel: false, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
const smaillDoubleText = { |
|||
list: [ |
|||
{ |
|||
type: "textarea", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
placeholder: "占位内容", |
|||
rows: 5, |
|||
disabled: false |
|||
}, |
|||
config: |
|||
{ |
|||
className: "class_name", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: false, |
|||
disabledAdd: false, |
|||
disabledEdit: false, |
|||
disabledDetail: false, |
|||
linkKey: false, |
|||
linkValue: "$textarea1690861245769.>1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "textarea1690861245769", |
|||
item: |
|||
{ |
|||
label: "多行文本", |
|||
showLabel: false, |
|||
rules: [] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,114 @@ |
|||
//基础状态
|
|||
const checkbox = { |
|||
list: [ |
|||
{ |
|||
type: "checkbox", |
|||
control: |
|||
{ |
|||
modelValue: [] |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "checkbox1690867750313", |
|||
item: |
|||
{ |
|||
label: "多选框组" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
//固定选项
|
|||
const checkboxGDXX = { |
|||
list: [ |
|||
{ |
|||
type: "checkbox", |
|||
control: |
|||
{ |
|||
modelValue: [] |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "男", |
|||
value: "1" |
|||
}, |
|||
{ |
|||
label: "女", |
|||
value: "2" |
|||
}, |
|||
{ |
|||
label: "跨性别", |
|||
value: "3" |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0, |
|||
optionsFun: "", |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 20 |
|||
}, |
|||
name: "checkbox1690867750313", |
|||
item: |
|||
{ |
|||
label: "多选框组" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//数据源
|
|||
const checkboxOptData = { |
|||
list: [ |
|||
{ |
|||
type: "checkbox", |
|||
control: |
|||
{ |
|||
modelValue: [] |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 1, |
|||
optionsFun: "org/govthreeaboutman", |
|||
label: "name", |
|||
value: "id", |
|||
transformData: "number", |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12 |
|||
}, |
|||
name: "checkbox1690940822941", |
|||
item: |
|||
{ |
|||
label: "多选框组", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,164 @@ |
|||
//子表
|
|||
|
|||
let tableopt = { |
|||
list: [ |
|||
{ |
|||
type: "table", |
|||
list: [], |
|||
tableData: [], |
|||
control: |
|||
{ |
|||
border: true |
|||
}, |
|||
config: |
|||
{ |
|||
addBtnText: "添加一行" |
|||
}, |
|||
name: "table1692578653387" |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
//满配
|
|||
let Allopt = { |
|||
list: [ |
|||
{ |
|||
type: "table", |
|||
list: [ |
|||
{ |
|||
name: "index", |
|||
type: "index", |
|||
item: |
|||
{ |
|||
label: "序号" |
|||
}, |
|||
control: |
|||
{}, |
|||
config: |
|||
{} |
|||
}], |
|||
tableData: [], |
|||
control: |
|||
{ |
|||
border: true, |
|||
mySetUp: 123456 |
|||
}, |
|||
config: |
|||
{ |
|||
addBtnText: "添加一行", |
|||
className: "自定义Class", |
|||
span: 12, |
|||
delBtnText: "删除一行", |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$index>1" |
|||
}, |
|||
name: "table1692578653387" |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
//添加表单
|
|||
let addTableOpt = { |
|||
list: [ |
|||
{ |
|||
type: "table", |
|||
list: [ |
|||
{ |
|||
name: "index", |
|||
type: "index", |
|||
item: |
|||
{ |
|||
label: "序号" |
|||
}, |
|||
control: |
|||
{}, |
|||
config: |
|||
{} |
|||
}, |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1692579453797", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}, |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1692579456835", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}], |
|||
tableData: [], |
|||
control: |
|||
{ |
|||
border: true, |
|||
mySetUp: 123456 |
|||
}, |
|||
config: |
|||
{ |
|||
addBtnText: "添加一行", |
|||
className: "自定义Class", |
|||
span: 12, |
|||
delBtnText: "删除一行", |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$index>1" |
|||
}, |
|||
name: "table1692578653387" |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,159 @@ |
|||
let divopt = { |
|||
list: [ |
|||
{ |
|||
type: "div", |
|||
control: |
|||
{}, |
|||
config: |
|||
{}, |
|||
list: [] |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
|
|||
//满配
|
|||
let divAllopt = { |
|||
list: [ |
|||
{ |
|||
type: "div", |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
textAlign: "right", |
|||
span: 24 |
|||
}, |
|||
list: [] |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
//配置组卷
|
|||
let divGroupopt = { |
|||
list: [ |
|||
{ |
|||
type: "colorPicker", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "colorPicker1692597441542", |
|||
item: |
|||
{ |
|||
label: "取色器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "timePicker", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "timePicker1692597438680", |
|||
item: |
|||
{ |
|||
label: "时间选择器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "div", |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
textAlign: "right", |
|||
span: 24 |
|||
}, |
|||
list: [ |
|||
{ |
|||
type: "radio", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "radio1692597425964", |
|||
item: |
|||
{ |
|||
label: "单选框组" |
|||
} |
|||
}, |
|||
{ |
|||
type: "select", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
appendToBody: true |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "select1692597423918", |
|||
item: |
|||
{ |
|||
label: "下拉选择框" |
|||
} |
|||
}, |
|||
{ |
|||
type: "rate", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "rate1692597422208", |
|||
item: |
|||
{ |
|||
label: "评分" |
|||
} |
|||
}] |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,75 @@ |
|||
let tinymceopt = { |
|||
list: [ |
|||
{ |
|||
type: "tinymce", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "tinymce1692580637828", |
|||
item: |
|||
{ |
|||
label: "富文本" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
let tinymcccckAllopt = { |
|||
list: [ |
|||
{ |
|||
type: "tinymce", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
placeholder: "占位内容", |
|||
height: "500", |
|||
width: "100", |
|||
imgUrl: "org/govthreeaboutman1", |
|||
blobUrl: "org/govthreeaboutman2" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
style: "label" |
|||
}, |
|||
name: "tinymce1692580637828", |
|||
item: |
|||
{ |
|||
label: "富文本1", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,65 @@ |
|||
//基础配置
|
|||
const switchopt = { |
|||
list: [ |
|||
{ |
|||
type: "switch", |
|||
control: |
|||
{ |
|||
modelValue: false |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "switch1691718873012", |
|||
item: |
|||
{ |
|||
label: "开关" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//满配
|
|||
const switchAllopt = { |
|||
list: [ |
|||
{ |
|||
type: "switch", |
|||
control: |
|||
{ |
|||
modelValue: false, |
|||
activeValue: "男", |
|||
inactiveValue: "女", |
|||
disabled: true |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.in>1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "switch1691718873012", |
|||
item: |
|||
{ |
|||
label: "开关" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,106 @@ |
|||
//弹性布局
|
|||
|
|||
let flexopt = { |
|||
list: [ |
|||
{ |
|||
type: "flex", |
|||
list: [], |
|||
tableData: [], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
addBtnText: "添加一行" |
|||
}, |
|||
name: "flex1692596274265" |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
//添加元素
|
|||
|
|||
let flexAddopt = { |
|||
list: [ |
|||
{ |
|||
type: "flex", |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1692596410497", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}, |
|||
{ |
|||
type: "timePicker", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "timePicker1692596417527", |
|||
item: |
|||
{ |
|||
label: "时间选择器" |
|||
} |
|||
}, |
|||
{ |
|||
type: "datePicker", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
type: "date" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "datePicker1692596415114", |
|||
item: |
|||
{ |
|||
label: "日期选择器" |
|||
} |
|||
}], |
|||
tableData: [], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
addBtnText: "添加一行", |
|||
className: "自定义Class", |
|||
span: 24, |
|||
delBtnText: "删除一行", |
|||
linkKey: false |
|||
}, |
|||
name: "flex1692596274265" |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
//按钮
|
|||
const buttonopt = { |
|||
list: [ |
|||
{ |
|||
type: "button", |
|||
control: |
|||
{ |
|||
label: "保存" |
|||
}, |
|||
config: |
|||
{} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
//满配按钮
|
|||
let buttonAllopt = { |
|||
list: [ |
|||
{ |
|||
type: "button", |
|||
control: |
|||
{ |
|||
label: "提交", |
|||
type: "warning", |
|||
key: "submit" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义样式", |
|||
span: 12, |
|||
textAlign: "center", |
|||
disabledAdd: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.index>1 " |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
//文字组件
|
|||
|
|||
const testopt = { |
|||
list: [ |
|||
{ |
|||
type: "txt", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//加配文字
|
|||
const textPulsopt = { |
|||
list: [ |
|||
{ |
|||
type: "txt", |
|||
control: |
|||
{ |
|||
modelValue: "文字组件内容编辑框" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义class", |
|||
span: 12 |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
//基础状态
|
|||
const optJichu = { |
|||
list: [ |
|||
{ |
|||
type: "datePicker", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
type: "date", |
|||
placeholder: "请选择时间", |
|||
format: "YYYYMMDD" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
linkKey: false |
|||
}, |
|||
name: "datePicker1691569007578", |
|||
item: |
|||
{ |
|||
label: "日期选择器标题", |
|||
showLabel: false, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//修改属性
|
|||
const optXiugai = { |
|||
list: [ |
|||
{ |
|||
type: "datePicker", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
type: "date", |
|||
placeholder: "请选择时间", |
|||
format: "YYYYMMDD" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
linkKey: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkValue: "$.datePicker1691569007578 < 1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "datePicker1691569007578", |
|||
item: |
|||
{ |
|||
label: "日期选择器标题", |
|||
showLabel: true, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,74 @@ |
|||
//基础模式
|
|||
const timeShiFen = { |
|||
list: [ |
|||
{ |
|||
type: "timePicker", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
placeholder: "占位内容", |
|||
format: "H:m" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12 |
|||
}, |
|||
name: "timePicker1691627090604", |
|||
item: |
|||
{ |
|||
label: "时间选择器1" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
//高配版
|
|||
const opt = { |
|||
list: [ |
|||
{ |
|||
type: "timePicker", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
placeholder: "占位内容", |
|||
format: "H:m" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.index>1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "timePicker1691627090604", |
|||
item: |
|||
{ |
|||
label: "时间选择器1", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,78 @@ |
|||
let gridopt = { |
|||
list: [ |
|||
{ |
|||
type: "grid", |
|||
columns: [ |
|||
{ |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
list: [] |
|||
}, |
|||
{ |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
list: [] |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
let gridAddopt = { |
|||
list: [ |
|||
{ |
|||
type: "grid", |
|||
columns: [ |
|||
{ |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
list: [] |
|||
}, |
|||
{ |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
list: [] |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
span: 16 |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,206 @@ |
|||
let tabsopt = { |
|||
list: [ |
|||
{ |
|||
type: "tabs", |
|||
columns: [ |
|||
{ |
|||
label: "Tab1", |
|||
list: [] |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
let tabsEmptyopt = { |
|||
list: [ |
|||
{ |
|||
type: "tabs", |
|||
columns: [ |
|||
{ |
|||
label: "Tab1", |
|||
list: [] |
|||
}, |
|||
{ |
|||
label: "标签名称1", |
|||
list: [] |
|||
}, |
|||
{ |
|||
label: "标签名称2", |
|||
list: [] |
|||
}, |
|||
{ |
|||
label: "标签名称3", |
|||
list: [] |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
span: 24, |
|||
linkKey: false |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
//标签页有内容
|
|||
let tabsContopt = { |
|||
list: [ |
|||
{ |
|||
type: "tabs", |
|||
columns: [ |
|||
{ |
|||
label: "Tab1", |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1692581910388", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}] |
|||
}, |
|||
{ |
|||
label: "标签名称1", |
|||
list: [] |
|||
}, |
|||
{ |
|||
label: "标签名称2", |
|||
list: [ |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1692581940524", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}, |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1692581942508", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}, |
|||
{ |
|||
type: "input", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "input1692581945189", |
|||
item: |
|||
{ |
|||
label: "单行文本" |
|||
} |
|||
}] |
|||
}, |
|||
{ |
|||
label: "标签名称3", |
|||
list: [ |
|||
{ |
|||
type: "radio", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "radio1692581949000", |
|||
item: |
|||
{ |
|||
label: "单选框组" |
|||
} |
|||
}, |
|||
{ |
|||
type: "checkbox", |
|||
control: |
|||
{ |
|||
modelValue: [] |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "checkbox1692581950900", |
|||
item: |
|||
{ |
|||
label: "多选框组" |
|||
} |
|||
}] |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
span: 24, |
|||
linkKey: false |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,59 @@ |
|||
//标题
|
|||
const titleopt = { |
|||
list: [ |
|||
{ |
|||
type: "title", |
|||
control: |
|||
{ |
|||
modelValue: "标题" |
|||
}, |
|||
config: |
|||
{} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
//满配标题
|
|||
const titlePulssssopt = { |
|||
list: [ |
|||
{ |
|||
type: "title", |
|||
control: |
|||
{ |
|||
modelValue: "标题1111111" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.intex > 1" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
//基础
|
|||
const treeSelectopt = { |
|||
list: [ |
|||
{ |
|||
type: "treeSelect", |
|||
control: |
|||
{ |
|||
modelValue: "", |
|||
data: [], |
|||
renderAfterExpand: false |
|||
}, |
|||
config: |
|||
{ |
|||
optionsType: 0 |
|||
}, |
|||
name: "treeSelect1691736048146", |
|||
item: |
|||
{ |
|||
label: "树形控件" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//数据源
|
|||
const treeDatyaopt = { |
|||
list: [ |
|||
{ |
|||
type: "treeSelect", |
|||
control: |
|||
{ |
|||
modelValue: [], |
|||
data: [], |
|||
renderAfterExpand: false, |
|||
placeholder: "暂未内容", |
|||
multiple: true, |
|||
disabled: true |
|||
}, |
|||
config: |
|||
{ |
|||
optionsType: 1, |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.index>1", |
|||
linkResult: "hidden", |
|||
optionsFun: "org/govthreeaboutman", |
|||
label: "name", |
|||
value: "id", |
|||
beforeRequest: (data, route) => |
|||
{ |
|||
// data经过处理后返回
|
|||
console.log('beforeRequest', data) |
|||
return data |
|||
}, |
|||
afterResponse: (res) => |
|||
{ |
|||
// res返回数据
|
|||
console.log('afterResponse', res) |
|||
return res |
|||
}, |
|||
transformData: "number" |
|||
}, |
|||
name: "treeSelect1691740231369", |
|||
item: |
|||
{ |
|||
label: "树形控件", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,76 @@ |
|||
const grid = { |
|||
list: [ |
|||
{ |
|||
type: "grid", |
|||
columns: [ |
|||
{ |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
list: [] |
|||
}, |
|||
{ |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
list: [] |
|||
}, |
|||
{ |
|||
list: [], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
} |
|||
}, |
|||
{ |
|||
list: [], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
type: "gridChild" |
|||
}, |
|||
{ |
|||
list: [], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
} |
|||
}, |
|||
{ |
|||
list: [], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
}, |
|||
type: "gridChild" |
|||
}, |
|||
{ |
|||
list: [], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
} |
|||
}, |
|||
{ |
|||
list: [], |
|||
attr: |
|||
{ |
|||
span: 12 |
|||
} |
|||
}], |
|||
control: |
|||
{}, |
|||
config: |
|||
{} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
//基础
|
|||
const slideropt = { |
|||
list: [ |
|||
{ |
|||
type: "slider", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "slider1691734730906", |
|||
item: |
|||
{ |
|||
label: "滑块" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
//配置项
|
|||
const sliderSetopt = { |
|||
list: [ |
|||
{ |
|||
type: "slider", |
|||
control: |
|||
{ |
|||
modelValue: 0, |
|||
min: 1, |
|||
max: 100, |
|||
step: 2 |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.index>1", |
|||
linkResult: "hidden" |
|||
}, |
|||
name: "slider1691734730906", |
|||
item: |
|||
{ |
|||
label: "滑块", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
//基础
|
|||
const casecaderopt = { |
|||
list: [ |
|||
{ |
|||
type: "cascader", |
|||
control: |
|||
{ |
|||
modelValue: [] |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 1, |
|||
optionsFun: "", |
|||
method: "post" |
|||
}, |
|||
name: "cascader1691719736761", |
|||
item: |
|||
{ |
|||
label: "级联选择器" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
|
|||
//数据源
|
|||
const cascaderDataopt = { |
|||
list: [ |
|||
{ |
|||
type: "cascader", |
|||
control: |
|||
{ |
|||
modelValue: [], |
|||
disabled: true |
|||
}, |
|||
options: [], |
|||
config: |
|||
{ |
|||
optionsType: 1, |
|||
optionsFun: "org/govthreeaboutman", |
|||
method: "post", |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.index>1", |
|||
linkResult: "hidden", |
|||
label: "name", |
|||
value: "id", |
|||
transformData: "number", |
|||
beforeRequest: (data, route) => |
|||
{ |
|||
// data经过处理后返回
|
|||
console.log('beforeRequest1212121', data) |
|||
return data |
|||
}, |
|||
afterResponse: (res) => |
|||
{ |
|||
// res返回数据
|
|||
console.log('afterResponse饭否和', res) |
|||
return res |
|||
} |
|||
}, |
|||
name: "cascader1691719736761", |
|||
item: |
|||
{ |
|||
label: "级联选择器", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
//固定选项
|
|||
const cascaderGuDingopt = { |
|||
list: [ |
|||
{ |
|||
type: "cascader", |
|||
control: |
|||
{ |
|||
modelValue: [], |
|||
disabled: true |
|||
}, |
|||
options: [ |
|||
{ |
|||
label: "男", |
|||
value: 1 |
|||
}, |
|||
{ |
|||
label: "女", |
|||
value: 2 |
|||
}], |
|||
config: |
|||
{ |
|||
optionsType: 0, |
|||
optionsFun: "", |
|||
method: "post", |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
editDisabled: true, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.index>1", |
|||
linkResult: "hidden", |
|||
label: "name", |
|||
value: "id", |
|||
transformData: "number", |
|||
beforeRequest: (data, route) => |
|||
{ |
|||
// data经过处理后返回
|
|||
console.log('beforeRequest1212121', data) |
|||
return data |
|||
}, |
|||
afterResponse: (res) => |
|||
{ |
|||
// res返回数据
|
|||
console.log('afterResponse饭否和', res) |
|||
return res |
|||
} |
|||
}, |
|||
name: "cascader1691719736761", |
|||
item: |
|||
{ |
|||
label: "级联选择器", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,66 @@ |
|||
//计算器
|
|||
const inputNumberopt = { |
|||
list: [ |
|||
{ |
|||
type: "inputNumber", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "inputNumber1691719538953", |
|||
item: |
|||
{ |
|||
label: "计数器" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
//全陪
|
|||
const AllNumberopt = { |
|||
list: [ |
|||
{ |
|||
type: "inputNumber", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 12, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.index>1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "inputNumber1691719538953", |
|||
item: |
|||
{ |
|||
label: "计数器", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
//基础
|
|||
const rateopt = { |
|||
list: [ |
|||
{ |
|||
type: "rate", |
|||
control: |
|||
{ |
|||
modelValue: 0 |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "rate1691734301601", |
|||
item: |
|||
{ |
|||
label: "评分" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
//配置版
|
|||
const rateoptDatopt = { |
|||
list: [ |
|||
{ |
|||
type: "rate", |
|||
control: |
|||
{ |
|||
modelValue: 0, |
|||
disabled: true, |
|||
max: 10 |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助细腻些", |
|||
span: 12, |
|||
disabledAdd: true, |
|||
disabledEdit: true, |
|||
disabledDetail: true, |
|||
linkKey: true, |
|||
linkValue: "$.index>1", |
|||
linkResult: "disabled" |
|||
}, |
|||
name: "rate1691734301601", |
|||
item: |
|||
{ |
|||
label: "评分", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "" |
|||
}, |
|||
config: |
|||
{} |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
let expanduseropt = { |
|||
list: [ |
|||
{ |
|||
type: "expand-user", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{}, |
|||
name: "expand-user1692597622203", |
|||
item: |
|||
{ |
|||
label: "选择用户" |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
|
|||
let expandUserAllopt = { |
|||
list: [ |
|||
{ |
|||
type: "expand-user", |
|||
control: |
|||
{ |
|||
modelValue: "" |
|||
}, |
|||
config: |
|||
{ |
|||
className: "自定义Class", |
|||
help: "帮助信息", |
|||
span: 24 |
|||
}, |
|||
name: "expand-user1692597622203", |
|||
item: |
|||
{ |
|||
label: "选择用户", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
message: "必填项", |
|||
trigger: "change" |
|||
}] |
|||
} |
|||
}], |
|||
form: |
|||
{ |
|||
size: "default", |
|||
name: "eeee", |
|||
labelWidth: "180px", |
|||
class: "form-row-3", |
|||
showColon: true |
|||
}, |
|||
config: |
|||
{ |
|||
addLoad: true |
|||
} |
|||
} |
|||
@ -0,0 +1,149 @@ |
|||
package publicapi |
|||
|
|||
import ( |
|||
"appPlatform/middleware/grocerystore" |
|||
"appPlatform/overall" |
|||
"appPlatform/overall/publicmethod" |
|||
"fmt" |
|||
"strconv" |
|||
"strings" |
|||
"unicode" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
/* |
|||
* |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-07-05 11:41:12 |
|||
@ 功能:获取汉字首字母 |
|||
@ 参数 |
|||
|
|||
# |
|||
|
|||
@ 返回值 |
|||
|
|||
# |
|||
|
|||
@ 方法原型 |
|||
|
|||
# |
|||
*/ |
|||
func (a *ApiMethod) ChineseInitial(c *gin.Context) { |
|||
var requestData publicmethod.PublicName |
|||
err := c.ShouldBindJSON(&requestData) |
|||
if err != nil { |
|||
publicmethod.Result(100, err, c) |
|||
return |
|||
} |
|||
if requestData.Name == "" { |
|||
publicmethod.Result(1, requestData.Name, c, "请输入关键字!") |
|||
return |
|||
} |
|||
var wordStr string |
|||
for _, v := range requestData.Name { |
|||
if unicode.Is(unicode.Han, v) { |
|||
firstWord := publicmethod.ChineseFirstWordCapitalize(fmt.Sprintf("%c", v)) |
|||
smallWord := strings.ToLower(firstWord) |
|||
// fmt.Printf("sddff--->%v----------->%v\n", firstWord, smallWord)
|
|||
wordStr = fmt.Sprintf("%v%v", wordStr, smallWord) |
|||
} else { |
|||
wordStr = fmt.Sprintf("%v%c", wordStr, v) |
|||
} |
|||
|
|||
} |
|||
// fmt.Printf("请输入关键字!----->%v\n", wordStr)
|
|||
// firstWord := publicmethod.ChineseFirstWordCapitalize(requestData.Name)
|
|||
// smallWord := strings.ToLower(firstWord)
|
|||
var keyField string |
|||
jbq := 0 |
|||
for _, kj := range wordStr { |
|||
if jbq < 1 { |
|||
if !unicode.IsNumber(kj) { |
|||
jbq++ |
|||
} |
|||
} |
|||
if jbq > 0 { |
|||
keyField = fmt.Sprintf("%v%c", keyField, kj) |
|||
} |
|||
|
|||
} |
|||
publicmethod.Result(0, keyField, c) |
|||
} |
|||
|
|||
/* |
|||
* |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-07-07 09:27:19 |
|||
@ 功能: 输出编号 |
|||
@ 参数 |
|||
|
|||
# |
|||
|
|||
@ 返回值 |
|||
|
|||
# |
|||
|
|||
@ 方法原型 |
|||
|
|||
# |
|||
*/ |
|||
func (a *ApiMethod) SendNumber(c *gin.Context) { |
|||
var requestData publicmethod.CommonId[int64] |
|||
err := c.ShouldBindJSON(&requestData) |
|||
if err != nil { |
|||
requestData.Id = 9 |
|||
} |
|||
if requestData.Id == 0 { |
|||
requestData.Id = 9 |
|||
} |
|||
uuid := publicmethod.GetUUid(requestData.Id) |
|||
var sendCont SendUUID |
|||
sendCont.UuId = uuid |
|||
sendCont.UuIdString = strconv.FormatInt(uuid, 10) |
|||
publicmethod.Result(0, sendCont, c) |
|||
} |
|||
|
|||
/* |
|||
* |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-07-20 11:41:00 |
|||
@ 功能: 生成身份验证唯一识别符 |
|||
@ 参数 |
|||
|
|||
# |
|||
|
|||
@ 返回值 |
|||
|
|||
# |
|||
|
|||
@ 方法原型 |
|||
|
|||
# |
|||
*/ |
|||
func (a *ApiMethod) GenerateSignCode(c *gin.Context) { |
|||
userKey := c.Request.Header.Get("user-key") |
|||
userToken := c.Request.Header.Get("user-token") |
|||
if userKey == "" || userToken == "" { |
|||
publicmethod.Result(1, userKey, c, "验证失败!未知识别符!") |
|||
return |
|||
} |
|||
uuid := publicmethod.GetUUid(6) |
|||
uuidStr := strconv.FormatInt(uuid, 10) |
|||
signCode := publicmethod.Sha1Encryption(uuidStr) |
|||
|
|||
var singCodeMd5 publicmethod.Md5Encryption |
|||
singCodeMd5.Md5EncryptionInit(signCode) |
|||
signCodeRedisKey := singCodeMd5.Md5EncryptionAlgorithm() |
|||
redisFileKey := fmt.Sprintf("ScanCode:Aut:IdentRec_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, signCodeRedisKey) |
|||
redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS4) |
|||
redisClient.SetRedisTime(180) |
|||
writeRedisData := map[string]interface{}{ |
|||
"userkey": userKey, |
|||
"usertoken": userToken, |
|||
} |
|||
redisClient.HashMsetAdd(redisFileKey, writeRedisData) |
|||
sendCode := publicmethod.MapOut[string]() |
|||
sendCode["code"] = signCode |
|||
publicmethod.Result(0, sendCode, c) |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package publicapi |
|||
|
|||
import ( |
|||
"appPlatform/overall/publicmethod" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
type ApiMethod struct{} |
|||
|
|||
// 公共函数入口
|
|||
func (a *ApiMethod) Index(c *gin.Context) { |
|||
outputCont := publicmethod.MapOut[string]() |
|||
outputCont["index"] = "公共函数入口" |
|||
publicmethod.Result(0, outputCont, c) |
|||
} |
|||
|
|||
// 输出UUID
|
|||
type SendUUID struct { |
|||
UuId int64 `json:"uuid"` |
|||
UuIdString string `json:"uuidstring"` |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
package authenticationroute |
|||
|
|||
//身份验证
|
|||
type ApiRouter struct{} |
|||
@ -0,0 +1,20 @@ |
|||
package authenticationroute |
|||
|
|||
import ( |
|||
"appPlatform/api/authentication" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
//实验
|
|||
|
|||
func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { |
|||
apiRouter := router.Group("signcode") |
|||
|
|||
var methodBinding = authentication.AppApiEntry.SingCodeApi |
|||
{ |
|||
apiRouter.GET("", methodBinding.Index) //入口
|
|||
apiRouter.POST("", methodBinding.Index) //入口
|
|||
apiRouter.POST("signcode", methodBinding.SignCode) //验证身份
|
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
package customerformrouter |
|||
|
|||
import ( |
|||
"appPlatform/api/version1" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// 权限矩阵PC端
|
|||
func (a *ApiRouter) RouterGroupPc(router *gin.RouterGroup) { |
|||
apiRouter := router.Group("customer_form") |
|||
|
|||
var methodBinding = version1.AppApiEntry.CustomerFormApi |
|||
{ |
|||
apiRouter.GET("", methodBinding.Index) //入口
|
|||
apiRouter.POST("", methodBinding.Index) //入口
|
|||
} |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
package customerformrouter |
|||
|
|||
//公共路由
|
|||
type ApiRouter struct{} |
|||
@ -0,0 +1,21 @@ |
|||
package public |
|||
|
|||
import ( |
|||
"appPlatform/api/version1" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// 权限矩阵PC端
|
|||
func (a *ApiRouter) RouterGroupPc(router *gin.RouterGroup) { |
|||
apiRouter := router.Group("public") |
|||
|
|||
var methodBinding = version1.AppApiEntry.PublicApi |
|||
{ |
|||
apiRouter.GET("", methodBinding.Index) //入口
|
|||
apiRouter.POST("", methodBinding.Index) //入口
|
|||
apiRouter.POST("chinese_initial", methodBinding.ChineseInitial) //获取汉字首字母
|
|||
apiRouter.POST("send_number", methodBinding.SendNumber) //输出编号
|
|||
apiRouter.POST("generate_sign_code", methodBinding.GenerateSignCode) //生成身份验证唯一识别符
|
|||
} |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
package public |
|||
|
|||
//公共路由
|
|||
type ApiRouter struct{} |
|||
@ -0,0 +1,74 @@ |
|||
package modelsschool |
|||
|
|||
import ( |
|||
"appPlatform/overall" |
|||
"strings" |
|||
) |
|||
|
|||
// 权限矩阵基础字段框架表
|
|||
type TestPaper struct { |
|||
Id int64 `json:"id" gorm:"primaryKey;column:tp_id;type:bigint(20) unsigned;not null;comment:Id;index"` |
|||
UserKey int64 `json:"tp_u_key" gorm:"column:tp_u_key;type:bigint(20) unsigned;default:0;not null;comment:员工唯一识别符"` |
|||
ExamKey int64 `json:"tp_exa_key" gorm:"column:tp_exa_key;type:bigint(20) unsigned;default:0;not null;comment:考试项目唯一识别符"` |
|||
RightKey string `json:"tp_right_key" gorm:"column:tp_right_key;type:mediumtext;default:'';comment:正确答案"` |
|||
UserReply string `json:"tp_reply" gorm:"column:tp_reply;type:mediumtext;default:'';comment:员工提交答案"` |
|||
Fraction int `json:"tp_fraction" gorm:"column:tp_fraction;type:int(5);default:1;not null;comment:分数"` |
|||
SumFraction int `json:"tp_sum_fraction" gorm:"column:tp_sum_fraction;type:int(5);default:1;not null;comment:总分"` |
|||
PasseLine int `json:"tp_pass_line" gorm:"column:tp_pass_line;type:int(3);default:1;not null;comment:及格线"` |
|||
FrequencyCount int `json:"tp_frequency" gorm:"column:tp_frequency;type:int(2);default:1;not null;comment:考试次数"` |
|||
DepartmentId int64 `json:"tp_bf_id" gorm:"column:tp_bf_id;type:bigint(20) unsigned;default:0;not null;comment:分厂"` |
|||
PosticsId int64 `json:"tp_ws_id" gorm:"column:tp_ws_id;type:bigint(20) unsigned;default:0;not null;comment:工段"` |
|||
DutiesId int64 `json:"tp_wp_id" gorm:"column:tp_wp_id;type:bigint(20) unsigned;default:0;not null;comment:职务"` |
|||
Group int64 `json:"tp_group" gorm:"column:tp_group;type:bigint(20) unsigned;default:0;not null;comment:集团"` |
|||
Start int64 `json:"tp_start" gorm:"column:tp_start;type:bigint(20) unsigned;default:0;not null;comment:开始考试时间"` |
|||
EiteTime int64 `json:"tp_eite" gorm:"column:tp_eite;type:bigint(20) unsigned;default:0;not null;comment:修改时间"` |
|||
SetUp int `json:"tp_set" gorm:"column:tp_set;type:int(1);default:1;not null;comment:状态(1:考试中;2:结束考试)"` |
|||
ExamCount int `json:"tp_exam_sum" gorm:"column:tp_exam_sum;type:int(4);default:1;not null;comment:考题总数"` |
|||
Grade int `json:"tp_grade" gorm:"column:tp_grade;type:int(1);default:1;not null;comment:考试评级(1:不及格;2:及格;3:良好;4:优秀)"` |
|||
UnifiedExamination int `json:"ps_gen_exa" gorm:"column:ps_gen_exa;type:int(1);default:1;not null;comment:统考(1:是;2:否)"` |
|||
} |
|||
|
|||
func (TestPaper *TestPaper) TableName() string { |
|||
return "test_paper" |
|||
} |
|||
|
|||
// 编辑内容
|
|||
func (cont *TestPaper) EiteCont(whereMap interface{}, saveData interface{}) (err error) { |
|||
err = overall.CONSTANT_DB_Master.Model(&cont).Where(whereMap).Updates(saveData).Error |
|||
return |
|||
} |
|||
|
|||
// 获取内容
|
|||
func (cont *TestPaper) GetCont(whereMap interface{}, field ...string) (err error) { |
|||
gormDb := overall.CONSTANT_DB_Master.Model(&cont) |
|||
if len(field) > 0 { |
|||
fieldStr := strings.Join(field, ",") |
|||
gormDb = gormDb.Select(fieldStr) |
|||
} |
|||
gormDb = gormDb.Where(whereMap) |
|||
err = gormDb.First(&cont).Error |
|||
return |
|||
} |
|||
|
|||
// 根据条件获取总数
|
|||
func (cont *TestPaper) CountCont(whereMap interface{}) (countId int64) { |
|||
overall.CONSTANT_DB_Master.Model(&cont).Where(whereMap).Count(&countId) |
|||
return |
|||
} |
|||
|
|||
// 读取全部信息
|
|||
func (cont *TestPaper) ContMap(whereMap interface{}, field ...string) (countAry []TestPaper, err error) { |
|||
gormDb := overall.CONSTANT_DB_Master.Model(&cont) |
|||
if len(field) > 0 { |
|||
fieldStr := strings.Join(field, ",") |
|||
gormDb = gormDb.Select(fieldStr) |
|||
} |
|||
err = gormDb.Where(whereMap).Find(&countAry).Error |
|||
return |
|||
} |
|||
|
|||
// 删除内容
|
|||
func (cont *TestPaper) DelCont(whereMap interface{}) (err error) { |
|||
err = overall.CONSTANT_DB_Master.Where(whereMap).Delete(&cont).Error |
|||
return |
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package scheduledtask |
|||
|
|||
import ( |
|||
"appPlatform/api/shiyan/maptostruct" |
|||
"fmt" |
|||
"time" |
|||
|
|||
"github.com/robfig/cron/v3" |
|||
) |
|||
|
|||
/* |
|||
* |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-08-17 10:13:56 |
|||
@ 功能: 定时任务模块 跟随主函数一起启动,执行周期性任务操作 |
|||
@ 参数 |
|||
|
|||
# |
|||
|
|||
@ 返回值 |
|||
|
|||
# |
|||
|
|||
@ 方法原型 |
|||
|
|||
# |
|||
*/ |
|||
func TimeTask() { |
|||
fmt.Println("------------准备启动定时任务--------------") |
|||
go func() { |
|||
c := cron.New(cron.WithSeconds()) //声明定时任务启动器
|
|||
/* |
|||
加载任务场景 |
|||
AddFunc("任务时间格式","执行的任务") |
|||
*/ |
|||
c.AddFunc("0 0 2 * * *", func() { |
|||
fmt.Printf("执行定时任务--同步试卷数据---->%v\n", time.Now().UTC()) |
|||
maptostruct.TestPageTimeTask() |
|||
}) //每3秒执行一个任务
|
|||
c.Start() //启动
|
|||
defer c.Stop() //设定全部执行后,最后关闭定时任务
|
|||
select {} |
|||
}() |
|||
fmt.Printf("定时任务启动成功!TIME:%v\n", time.Now().UTC()) |
|||
} |
|||
Loading…
Reference in new issue