1 Star 0 Fork 0

DCloud / voteadmin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

综合各种场景:

  • 投票 1个问题,若干选项,可匿名,需要统计
  • 问卷 n个问题,若干选项,可匿名,需要统计
  • 试卷 n个问题,若干选项,不可匿名,需要标准答案,需要判对错,需要统计回答者的对错

表结构说明:

2个表,opendb-vote-question、opendb-vote-log。

  • opendb-vote-question questionnaire、question、option在一个表, questionnaire即问卷,下面有question即问题,question下面有option,共3层关系,通过parent_id约定父子关系。 每个questionnaire、每个question、每个option都是一条单独的记录。 每个question有下面5种类型,如果类型未涉及单选多选,那么这个question不会有子option {"text":"单选","value":"radio"}, {"text":"多选","value":"checkbox"}, {"text":"填空","value":"input"}, {"text":"单选和其他","value":"radioinput"}, {"text":"多选和其他","value":"checkboxinput"}

question表的parentKey也可用于表示父子题目,因为有的问题是选择了上一个问题的某个选项才会需要问的。此时把question_parent_option_id的parentKey指向那个option的_id

  • opendb-vote-log表的结构
{
	"arr_result":[
		{
			"question_id":"12321",
			"result_id":["123","789"],
			"result_other":""
		},
		{
			"question_id":"12321",
			"result_id":["123","789"]
		},
	],
	"create_time":123456
}
MIT License Copyright (c) 2020 DCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/dcloud/voteadmin.git
git@gitee.com:dcloud/voteadmin.git
dcloud
voteadmin
voteadmin
master

搜索帮助